]> git.ipfire.org Git - thirdparty/nettle.git/commit
Reorganize eddsa, based on patch by Daiki Ueno.
authorNiels Möller <nisse@lysator.liu.se>
Mon, 30 Dec 2019 21:43:48 +0000 (22:43 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Mon, 30 Dec 2019 21:43:48 +0000 (22:43 +0100)
commit1a85646bdb96855b261280bcf814c01e2b8d462d
tree3ba0bc867c0ec488863dcb5bf234f86b6db9004f
parentd1d7d737457eaba5b51a98457cac06982638a8fd
Reorganize eddsa, based on patch by Daiki Ueno.

* eddsa-internal.h (struct ecc_eddsa): New struct for eddsa
parameters.
ed25519-sha512.c (_nettle_ed25519_sha512): New parameter struct.
* eddsa-expand.c (_eddsa_expand_key): Replace input
struct nettle_hash with struct ecc_eddsa, and generalize for
ed448. Update all callers.
* eddsa-sign.c (_eddsa_sign): Likewise.
* eddsa-verify.c (_eddsa_verify): Likewise.
* eddsa-compress.c (_eddsa_compress): Store sign bit in most
significant bit of last byte, as specified by RFC 8032.
* eddsa-decompress.c (_eddsa_decompress): Corresponding update.
Also generalize to support ed448, and make validity checks
stricter.
* testsuite/eddsa-sign-test.c (test_ed25519_sign): New function.
(test_main): Use it.
* testsuite/eddsa-verify-test.c (test_ed25519): New function.
(test_main): Use it.
14 files changed:
ChangeLog
Makefile.in
ed25519-sha512-pubkey.c
ed25519-sha512-sign.c
ed25519-sha512-verify.c
ed25519-sha512.c [new file with mode: 0644]
eddsa-compress.c
eddsa-decompress.c
eddsa-expand.c
eddsa-internal.h
eddsa-sign.c
eddsa-verify.c
testsuite/eddsa-sign-test.c
testsuite/eddsa-verify-test.c