Skip to main content

Module crypto

Module crypto 

Source
Expand description

Typed v2 signing transcripts for every registered object code (mirrors Go crypto_v2.go).

Enums§

V2ObjectType
The closed v2 signed-object registry (SPEC-v2 §4).

Functions§

key_id_v2
Full 256-bit v2 key ID: hex(SHA-256(“ratify-key-id-v2\0” || ed25519 || ml_dsa_65)).
public_key_v2
Derive the hybrid public key of a private key (both components validated).
v2_mldsa_context
ML-DSA-65 context string “ratify-protocol/2/XXXX”.
v2_signing_message
M = “ratify-protocol-signature\0\x02” || code_be16 || SHA-384(signable).
valid_v2_id
64 lowercase hexadecimal characters (a full v2 key ID).
verify_v2_message
Strict AND verification of both components over an already-computed transcript message, which must be exactly the 77-byte v2 signing message for object_type (v2_signing_message); the ML-DSA-65 context is derived from object_type. For bindings that compute M themselves. Every failure, including a message that is not a transcript for object_type, is invalid_signature.
verify_v2_statement
Strict AND verification of both components under a registered code.
verify_v2_statement_code
Strict AND verification of both components. An unregistered code is unsupported_object_type; every other failure is invalid_signature.