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.
- Signing
Key - ed25519 signing key which can be used to produce signatures.
- Verifying
Key - An ed25519 public key.
Enums§
- Crypto
Error - Errors from cryptographic operations.
Constants§
- SIGNATURE_
WINDOW_ SECS - How far a signed request’s timestamp may be from the server’s clock, in seconds, either way. Sign with the current time (0.74)
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.
- timestamp_
in_ window - Whether
timestampis withinSIGNATURE_WINDOW_SECSofnow(both Unix seconds) (0.74) - verify
- Verify a signature against a payload and timestamp.