diff --git a/ChangeLog b/ChangeLog index ee4eebae9d749fe8a30074e92467c6df1f90d956..4e25f2b6811431f916d094f8c6494053079a9069 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2015-03-19 Niels Möller <nisse@diamant.hack.org> + * nettle.texinfo: Updated EdDSA documentation. + * Makefile.in (DISTFILES): Added version.h.in, libnettle.map.in, and libhogweed.map.in (latter two patch by Nikos). (version.h): New make target. diff --git a/nettle.texinfo b/nettle.texinfo index 607122819fe353855425e1eff42209211e32c32f..08812fa31522957cd778811cca77aab269f77d0d 100644 --- a/nettle.texinfo +++ b/nettle.texinfo @@ -4260,6 +4260,7 @@ This function is intended to be compatible with the function @end deftypefun @subsubsection EdDSA +@cindex eddsa EdDSA is a signature scheme proposed by D.~J.~Bernstein et al. in 2011. It is defined using a ``Twisted Edwards curve'', of the form @math{-x^2 @@ -4278,9 +4279,9 @@ forge signatures. EdDSA also avoids the use of a randomness source by generating the needed signature nonce from a hash of the private key and the message, which means that the message is actually hashed twice when creating a signature. If signing huge messages, it is possible to hash -the message first and pass the short message digest as input to the -signa and verify functions, however, the hash collision resilience is -then lost. +the message first and pass the short message digest as input to the sign +and verify functions, however, the resilience to hash collision is then +lost. @defvr Constant ED25519_KEY_SIZE The size of a private or public Ed25519 key, 32 octets. @@ -4290,27 +4291,16 @@ The size of a private or public Ed25519 key, 32 octets. The size of an Ed25519 signature, 64 octets. @end defvr -@deftp {Context struct} {struct ed25519_private_key} -@deftpx {Context struct} {struct ed25519_public_key} -These structs represent a private and public key, respectively, expanded -into an internal representation. -@end deftp - -@deftypefun void ed25519_sha512_set_private_key (struct ed25519_private_key *@var{priv}, const uint8_t *@var{key}) -Expands a private key (@code{ED25519_KEY_SIZE} octets) into the internal -representation. -@end deftypefun - -@deftypefun void ed25519_sha512_sign (const struct ed25519_private_key *@var{priv}, size_t @var{length}, const uint8_t *@var{msg}, uint8_t *@var{signature}) -Signs a message using the provided private key. +@deftypefun void ed25519_sha512_public_key (uint8_t *@var{pub}, const uint8_t *@var{priv}) +Computes the public key corresponding to the given private key. Both +input and output are of size @code{ED25519_KEY_SIZE}. @end deftypefun -@deftypefun int ed25519_sha512_set_public_key (struct ed25519_public_key *@var{pub}, const uint8_t *@var{key}) -Expands a public key (@code{ED25519_KEY_SIZE} octets) into the internal -representation. Returns 1 on success, 0 on failure. +@deftypefun void ed25519_sha512_sign (const uint8_t *@var{pub}, const uint8_t *@var{priv}, size_t @var{length}, const uint8_t *@var{msg}, uint8_t *@var{signature}) +Signs a message using the provided key pair. @end deftypefun -@deftypefun int ed25519_sha512_verify (const struct ed25519_public_key *@var{pub}, size_t @var{length}, const uint8_t *@var{msg}, const uint8_t *@var{signature}) +@deftypefun int ed25519_sha512_verify (const uint8_t *@var{pub}, size_t @var{length}, const uint8_t *@var{msg}, const uint8_t *@var{signature}) Verifies a message using the provided public key. Returns 1 if the signature is valid, otherwise 0. @end deftypefun