Expand description
The ACT envelope: encoding, signing and verification.
An ACT is a CBOR map with four keys:
{
"v": uint, ; format version, currently 1
"alg": tstr, ; signature algorithm, currently "Ed25519"
"claims": bstr, ; CBOR-encoded ActClaims - the signed bytes
"sig": bstr, ; 64-byte raw Ed25519 signature over "claims"
"kid": tstr, ; optional key identifier, for rotation
}The signature covers the claims byte string exactly as it appears, not a
re-serialization of the decoded claims. A verifier therefore never needs to
reproduce the issuer’s encoding decisions byte for byte, which is the usual
source of signature failures in formats that sign a canonicalized structure.
v and alg exist because neither superseded format carried either. Without
a version there is no way to roll a format change out, and without an
algorithm identifier there is no way to migrate off Ed25519.
Structs§
- ActEnvelope
- The outer envelope, as it appears on the wire.
- Verifier
- What a verifier requires of a token.
Constants§
- ALGORITHM_
ED25519 - The only signature algorithm this version defines.
- FORMAT_
VERSION - Current ACT format version.
- MAX_
ACT_ BYTES - Maximum accepted size of an encoded ACT, in bytes.
Functions§
- claims_
to_ signing_ payload - Encodes claims into the exact byte string the signature must cover.
- envelope_
from_ parts - Assembles an envelope from claims bytes and a detached signature.
- verify
- Verifies an encoded ACT and returns its claims.
Type Aliases§
- Public
KeyBytes - A raw Ed25519 public key.