From 8dd554d2c429016f15a10da5220dc91d953aec7c Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 24 Dec 2018 15:25:34 +0100 Subject: [PATCH] Leverage sodium_add() --- test/default/sign.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/test/default/sign.c b/test/default/sign.c index cb41e203..7f25f531 100644 --- a/test/default/sign.c +++ b/test/default/sign.c @@ -1053,15 +1053,8 @@ static void add_l(unsigned char * const S) 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10 }; - unsigned char c = 0U; - unsigned int i; - unsigned int s; - for (i = 0U; i < 32U; i++) { - s = S[i] + l[i] + c; - S[i] = (unsigned char) s; - c = (s >> 8) & 1; - } + sodium_add(S, l, sizeof l); } int main(void)