Miscalculations on secp384 curve

Hanno Böck hanno at hboeck.de
Fri Dec 11 11:19:05 CET 2015


Hi,

Attached is an example elliptic curve multiplication that will produce
a wrong result in nettle.

It's a multiplication of these coordinates
23000000000000000000000000000000000000000000000000110011C2DD0000000000000000000
46BE3FEF75FCA4BD52CE28EC3F1483A05EE154965B05282F9029E14277409908C0EBAAD2CA5449FFA61FEC78473816BC
with this scalar
23000000000000C1DD3FF800E83E2CACA1010A21


The example code will do the calculation with both openssl and nettle
and will produce different results (I have verified the result
with nss, which produces the same result as openssl).

Compile with
gcc nettle-nistp384-miscalc.c -lhogweed -lgmp  -lcrypto

-- 
Hanno Böck
http://hboeck.de/

mail/jabber: hanno at hboeck.de
GPG: BBB51E42
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nettle-nistp384-miscalc.c
Type: text/x-c++src
Size: 1896 bytes
Desc: not available
URL: <http://lists.lysator.liu.se/pipermail/nettle-bugs/attachments/20151211/cb022af5/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.lysator.liu.se/pipermail/nettle-bugs/attachments/20151211/cb022af5/attachment.sig>


More information about the nettle-bugs mailing list