EdKey

Ed25519 signing key that implements ISigningKey.

Declared in src/libs/libsec/security/EdKey.hpp
Inherits ISigningKey
Group security

Detailed description

EdKey generates Ed25519 key pairs, signs and verifies, and encrypts with a hybrid scheme: an ephemeral X25519 key agreement followed by XChaCha20-Poly1305. The key is two raw byte arrays, so the class needs no private implementation object. The destructor overwrites the secret key with zeros.

The key ID is the SHA-256 hash of the raw public key, as upper-case hex. An EdKey reads and writes PEM-like text with ED25519 PUBLIC KEY and ED25519 PRIVATE KEY labels, and can also be built from raw key bytes, for example from a BIP39 derivation.

Ed25519 is the default algorithm. Callers normally get an EdKey from KeyFactory, which chooses EdKey when the PEM text names Ed25519.

See also ISigningKey, RSAKey, KeyFactory.

In this section