bindings/ed25519

Types

Public or secret key

pub type Key =
  BitArray

Computed signature

pub type Signature =
  BitArray

Functions

pub fn derive_public_key(sk: BitArray) -> BitArray

Derive the public signing key from the secret key

pub fn generate_key_pair() -> #(BitArray, BitArray)

Generate a secret/public key pair

Returned tuple contains #(random_secret_key, derived_public_key)

pub fn on_curve(key: BitArray) -> Bool

Returns whether a given key lies on the ed25519 curve.

pub fn signature(
  m: BitArray,
  sk: BitArray,
  pk: BitArray,
) -> BitArray

Sign a message

pub fn valid_signature(
  sig: BitArray,
  m: BitArray,
  pk: BitArray,
) -> Bool

Validate a signed message

Search Document