Module nettle::ed25519[][src]

Expand description

D.J. Bernstein’s “Twisted” Edwards curve Ed25519.

Constants

ED25519_KEY_SIZE

Size of a public or secret Ed25519 key in bytes.

ED25519_SIGNATURE_SIZE

Size of a Ed25519 signature in bytes.

Functions

private_key

Generates a new Ed25519 private key.

public_key

Computes the public key for a given private Ed25519 key. Fails if one of the buffer is not ED25519_KEY_SIZE bytes large.

sign

Signs the message msg using the given public/private, producing signature. Fails if public or private is not ED25519_KEY_SIZE bytes large or if signature is not ED25519_SIGNATURE_SIZE bytes.

verify

Verifies signature of message msg using public. Returns true if the signature is valid. Fails if public is not ED25519_KEY_SIZE bytes large or signature is not ED25519_SIGNATURE_SIZE bytes.