Available on crate feature
twisted_ed25519 only.Expand description
Twisted Ed25519 encryption keys (Ristretto255 scalar).
Used by Movement confidential assets and adjacent protocols. The private key is a
Ristretto255 scalar s; the corresponding public (“encryption”) key is pk = s⁻¹·H
where H is the domain-separated secondary generator
H_RISTRETTO_COMPRESSED (= TS HASH_BASE_POINT, also the on-chain constant).
This is not an Ed25519 signing key. It produces no signatures; it’s a key for the
Twisted ElGamal encryption scheme used by confidential-assets et al.
§Security
The private key zeroizes on drop (curve25519-dalek Scalar implements Zeroize)
and has a redacted Debug impl so accidental logging never leaks key bytes.
Structs§
- Twisted
Ed25519 Private Key - A Twisted Ed25519 private key (Ristretto255 scalar).
- Twisted
Ed25519 Public Key - A Twisted Ed25519 public (encryption) key — a Ristretto255 point.
Constants§
- DECRYPTION_
KEY_ DERIVATION_ MESSAGE - Domain string signed by an account’s Ed25519 key to derive a deterministic confidential decryption key.
- H_
RISTRETTO_ COMPRESSED - Compressed encoding of the secondary generator H for Twisted
ElGamal/ Twisted Ed25519. Matches TSHASH_BASE_POINTand the on-chain constant. - TWISTED_
ED25519_ PRIVATE_ KEY_ LENGTH - Length, in bytes, of a Twisted Ed25519 private key (a Ristretto255 scalar).
- TWISTED_
ED25519_ PUBLIC_ KEY_ LENGTH - Length, in bytes, of a Twisted Ed25519 public key (a compressed Ristretto255 point).
Functions§
- h_
ristretto - Decompressed form of
H_RISTRETTO_COMPRESSED.