![]() |
Nilorea Library
C utilities for networking, threading, graphics
|
Curve25519 primitives: X25519 key agreement and Ed25519 signatures. More...
Go to the source code of this file.
Macros | |
| #define | N_ECC_AVAILABLE N_OSSL_HAVE_RAW_EVP_25519 |
| 1 when the linked library provides Curve25519 through the raw-key EVP API (OpenSSL 1.1.1+, LibreSSL 3.7+), 0 otherwise. | |
| #define | N_ECC_KEY_LEN 32 |
| raw X25519/Ed25519 key length in bytes | |
| #define | N_ECC_SIG_LEN 64 |
| Ed25519 signature length in bytes. | |
Functions | |
| int | n_ed25519_keypair (unsigned char *priv, unsigned char *pub) |
| generate an Ed25519 keypair as N_ECC_KEY_LEN-byte raw private and public keys. | |
| int | n_ed25519_sign (const unsigned char *priv, const unsigned char *msg, size_t len, unsigned char *sig) |
| Ed25519 sign len bytes of msg with the N_ECC_KEY_LEN-byte raw private key into sig (N_ECC_SIG_LEN bytes). | |
| int | n_ed25519_verify (const unsigned char *pub, const unsigned char *msg, size_t len, const unsigned char *sig) |
| Ed25519 verify the N_ECC_SIG_LEN-byte sig over len bytes of msg under the N_ECC_KEY_LEN-byte raw public key. | |
| int | n_x25519_derive (const unsigned char *priv, const unsigned char *peer_pub, unsigned char *shared) |
| X25519 ECDH: derive the N_ECC_KEY_LEN-byte shared secret from our raw private key and the peer's raw public key. | |
| int | n_x25519_keypair (unsigned char *priv, unsigned char *pub) |
| generate an X25519 keypair as N_ECC_KEY_LEN-byte raw private and public keys. | |
Curve25519 primitives: X25519 key agreement and Ed25519 signatures.
Definition in file n_ecc.h.