From: Sadoon Albader Date: Tue, 3 Oct 2023 18:18:42 +0000 (+0300) Subject: fix huge bug with C poly1305 function call X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6b0e077bb9fe542bbb04013f6cbcfa6e664cc84b;p=openpower-isa.git fix huge bug with C poly1305 function call --- diff --git a/crypto/poly1305/poly1305-rand-test.c b/crypto/poly1305/poly1305-rand-test.c index ad527062..7a056c30 100644 --- a/crypto/poly1305/poly1305-rand-test.c +++ b/crypto/poly1305/poly1305-rand-test.c @@ -24,7 +24,7 @@ int main(int argc, char **argv){ for (int i = 0; i < msg_size; i++) msg[i] = random() & 0x000000FF; - poly1305_auth(mac, msg, sizeof(msg), key); + poly1305_auth(mac, msg, msg_size, key); for (int i = 0; i < msg_size; i++) printf("%u%s", msg[i], (i == msg_size-1) ? "\n" : "," );