An variant of EdDSA which allows for iterative derivation of key pairs. More...
Go to the source code of this file.
Macros | |
#define | CURVE "Ed25519" |
Functions | |
void | GNUNET_CRYPTO_edx25519_key_clear (struct GNUNET_CRYPTO_Edx25519PrivateKey *pk) |
Clear memory that was used to store a private key. More... | |
void | GNUNET_CRYPTO_edx25519_key_create_from_seed (const void *seed, size_t seedsize, struct GNUNET_CRYPTO_Edx25519PrivateKey *pk) |
Create a new private key for Edx25519 from a given seed. More... | |
void | GNUNET_CRYPTO_edx25519_key_create (struct GNUNET_CRYPTO_Edx25519PrivateKey *pk) |
Create a new private key. More... | |
void | GNUNET_CRYPTO_edx25519_key_get_public (const struct GNUNET_CRYPTO_Edx25519PrivateKey *priv, struct GNUNET_CRYPTO_Edx25519PublicKey *pub) |
Extract the public key for the given private key. More... | |
enum GNUNET_GenericReturnValue | GNUNET_CRYPTO_edx25519_sign_ (const struct GNUNET_CRYPTO_Edx25519PrivateKey *priv, const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose, struct GNUNET_CRYPTO_Edx25519Signature *sig) |
This function operates the basically same way as the signature function for EdDSA. More... | |
enum GNUNET_GenericReturnValue | GNUNET_CRYPTO_edx25519_verify_ (uint32_t purpose, const struct GNUNET_CRYPTO_EccSignaturePurpose *validate, const struct GNUNET_CRYPTO_Edx25519Signature *sig, const struct GNUNET_CRYPTO_Edx25519PublicKey *pub) |
Verify Edx25519 signature. More... | |
static void | derive_h (const struct GNUNET_CRYPTO_Edx25519PublicKey *pub, const void *seed, size_t seedsize, struct GNUNET_HashCode *phc) |
Derive the 'h' value for key derivation, where 'h = H(P ∥ seed) mod n' and 'n' is the size of the cyclic subroup. More... | |
void | GNUNET_CRYPTO_edx25519_private_key_derive (const struct GNUNET_CRYPTO_Edx25519PrivateKey *priv, const void *seed, size_t seedsize, struct GNUNET_CRYPTO_Edx25519PrivateKey *result) |
Derive a private scalar from a given private key and a label. More... | |
void | GNUNET_CRYPTO_edx25519_public_key_derive (const struct GNUNET_CRYPTO_Edx25519PublicKey *pub, const void *seed, size_t seedsize, struct GNUNET_CRYPTO_Edx25519PublicKey *result) |
Derive a public key from a given public key and a label. More... | |
An variant of EdDSA which allows for iterative derivation of key pairs.
Definition in file crypto_edx25519.c.
#define CURVE "Ed25519" |
Definition at line 35 of file crypto_edx25519.c.
|
static |
Derive the 'h' value for key derivation, where 'h = H(P ∥ seed) mod n' and 'n' is the size of the cyclic subroup.
pub | public key for deriviation | |
seed | seed for key the deriviation | |
seedsize | the size of the seed | |
[out] | phc | if not NULL, the output of H() will be written into return h_mod_n (allocated by this function) |
NOTE: While (H)KDF calls this value a salt it is not necessary for it to be a random value. It is more common to use a NULL value here (https://www.rfc-editor.org/rfc/rfc8446#section-7.1) But it is safe either way (See RFC 5869)
Definition at line 217 of file crypto_edx25519.c.
References GNUNET_CRYPTO_kdf(), pub, salt, and seed.
Referenced by GNUNET_CRYPTO_edx25519_private_key_derive(), and GNUNET_CRYPTO_edx25519_public_key_derive().