Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Nettle
nettle
Commits
5d4859c0
Commit
5d4859c0
authored
Mar 19, 2015
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated EdDSA documentation.
parent
49105649
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
20 deletions
+12
-20
ChangeLog
ChangeLog
+2
-0
nettle.texinfo
nettle.texinfo
+10
-20
No files found.
ChangeLog
View file @
5d4859c0
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.
...
...
nettle.texinfo
View file @
5d4859c0
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment