Expand description
VES v1.0 Cryptographic Operations
Implements:
- RFC 8785 JSON Canonicalization Scheme (JCS) via
serde_jcs - Domain-separated hashing per VES spec
- Ed25519 signing for agent signatures
- AES-256-GCM payload encryption (VES-ENC-1)
- X25519 ECDH key wrapping
- Merkle tree hashing
Modules§
- canonicalize
- RFC 8785 JSON Canonicalization Scheme (JCS)
- domain
- Domain separation prefixes (must match sequencer)
- encrypt
- Payload encryption per VES-ENC-1
- hash
- Domain-separated SHA-256 hashing per VES v1.0
- merkle
- Merkle tree hashing per VES v1.0 Section 10
- sign
- Ed25519 signing and verification per VES v1.0
Enums§
- Crypto
Error - Errors that can occur during VES cryptographic operations
Constants§
- ZERO_
HASH - 32 bytes of zeros – used for plaintext payloads in cipher hash field
Functions§
- bytes_
to_ hex - Convert bytes to hex string with 0x prefix
- encode_
string - Encode string with length prefix (VES
ENC_STR) - hex_
to_ bytes - Convert hex string (with or without 0x prefix) to bytes
- u32_be
- Encode u32 as big-endian bytes
- u64_be
- Encode u64 as big-endian bytes
- uuid_
to_ bytes - Convert UUID string to 16-byte array