Skip to main content

Crate protocol_7h3

Crate protocol_7h3 

Source

Modules§

http
HTTP binding for 7h3 Protocol — signs and verifies per-request envelopes.
keys
Key infrastructure for 7h3 Protocol — discovery, rotation, revocation.
queue
Queue binding — signed message envelope for Kafka/SQS/Pub-Sub transit.
webhook
Webhook binding — lightweight per-payload Ed25519/HMAC signing. Signs “${timestamp_ms}.${body}” to bind time and content together.

Structs§

AipMcpGatewayOptions
AipMcpGatewayRuntime
JsonRpcBridgeConfig
JsonRpcError
JsonRpcPolicyContext
JsonRpcRequestLike
JsonRpcResponseLike
ProtocolBody
ProtocolDiagnostic
ProtocolEnvelope
ProtocolHeader
ProtocolSignature

Enums§

JsonRpcId

Constants§

MAX_CLOCK_SKEW_MS
How far into the future a timestamp may sit before it is rejected. Without this ceiling MAX_TTL_MS bounds nothing: a sender can post-date timestamp_ms by a year and still pass a 24h ttl_ms, keeping the envelope valid — and replayable — long after any replay store has forgotten its nonce.
MAX_TTL_MS
Ceiling on ttlMs — a huge TTL keeps an envelope replayable (and its nonce pinned in every replay store) far beyond any legitimate messaging window.

Functions§

canonicalize_envelope
create_aip_mcp_gateway_runtime
create_envelope
create_signed_task_from_jsonrpc
decode_envelope
encode_envelope_compact
jsonrpc_response_from_envelope
random_nonce
Cryptographically secure random nonce (96 bits, hex-encoded). Nonces back replay protection, so they must come from the OS CSPRNG — never a timestamp or a non-cryptographic PRNG.
sign_canonical_payload_ed25519
sign_canonical_payload_hmac
sign_envelope_ed25519
sign_envelope_hmac
validate_envelope
verify_canonical_payload_ed25519
verify_canonical_payload_hmac
verify_envelope_ed25519
verify_envelope_hmac