Skip to main content

Module crypto

Module crypto 

Source
Expand description

Ed25519 signing and verification for Agora agent actions.

The canonical signed message format is: SHA-256(payload || timestamp_le_bytes)

This module merges the server-side verification and client-side signing utilities into a single implementation.

Structs§

Signature
Ed25519 signature.
SigningKey
ed25519 signing key which can be used to produce signatures.
VerifyingKey
An ed25519 public key.

Enums§

CryptoError
Errors from cryptographic operations.

Functions§

generate_keypair
Generate a new Ed25519 keypair.
sign
Sign a payload with the given key and timestamp.
signing_key_from_bytes
Load a signing key from raw bytes (32 bytes).
signing_key_from_hex
Load a signing key from a hex-encoded string.
signing_key_to_hex
Encode a signing key as hex.
verify
Verify a signature against a payload and timestamp.