rokdocs
v0.1

rok::core::crypto::ed25519

Ed25519 (RFC 8032 5.1): pure EdDSA over edwards25519 with SHA-512.

Structs

Ed25519

pub struct Ed25519

Ed25519 signatures: 32-byte seeds and public keys, 64-byte signatures.

  • pub fn public_key(seed: Bytes) throws (ValueError) -> List<u8>
  • pub fn sign(seed: Bytes, msg: Bytes) throws (ValueError) -> List<u8>

    The signature R || S of msg (deterministic).

  • pub fn verify(public_key: Bytes, msg: Bytes, sig: Bytes) -> bool

    Whether sig is a valid signature of msg under public_key: canonical A, S < L, and the encoding of [S]B - [k]A equal to R byte for byte (cofactorless, RFC 8032 5.1.7).