From: Thomas Pornin Date: Thu, 18 Oct 2018 15:50:03 +0000 (+0200) Subject: Changed speed benchmark for i31 to a 521-bit modulus. X-Git-Url: https://bearssl.org/gitweb//home/git/?a=commitdiff_plain;h=431629d869126b4fd605e371039cb341b3f811f7;p=BearSSL Changed speed benchmark for i31 to a 521-bit modulus. --- diff --git a/test/test_speed.c b/test/test_speed.c index f7c7b0b..0e885db 100644 --- a/test/test_speed.c +++ b/test/test_speed.c @@ -1229,14 +1229,20 @@ static void test_speed_i31(void) { static const unsigned char bp[] = { - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, + /* A 521-bit prime integer (order of the P-521 curve). */ + 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xBC, 0xE6, 0xFA, 0xAD, 0xA7, 0x17, 0x9E, 0x84, - 0xF3, 0xB9, 0xCA, 0xC2, 0xFC, 0x63, 0x25, 0x51 + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFA, 0x51, 0x86, 0x87, 0x83, 0xBF, 0x2F, + 0x96, 0x6B, 0x7F, 0xCC, 0x01, 0x48, 0xF7, 0x09, + 0xA5, 0xD0, 0x3B, 0xB5, 0xC9, 0xB8, 0x89, 0x9C, + 0x47, 0xAE, 0xBB, 0x6F, 0xB7, 0x1E, 0x91, 0x38, + 0x64, 0x09 }; unsigned char tmp[60 + sizeof bp]; - uint32_t p[10], x[10], y[10], z[10], uu[30], p0i; + uint32_t p[20], x[20], y[20], z[20], uu[60], p0i; int i; long num;