Skip to main content

encode_service_jwt_hybrid

Function encode_service_jwt_hybrid 

Source
pub fn encode_service_jwt_hybrid(
    claims: &Claims,
    ed: &SigningKey,
    ml_dsa: &MlDsaSigningKey,
    ml_dsa_vk: &MlDsaVerifyingKey,
) -> String
Expand description

Encode a composite ML-DSA-65-Ed25519 service WIT (typ: "wit+jwt").

Per draft-ietf-jose-pq-composite-sigs, the signature is ml_dsa_sig (3309 bytes) ∥ ed25519_sig (64 bytes) over base64url(header).base64url(payload), and the kid is the composite_kid thumbprint binding the exact key pair — the shape parse_composite_dispatch and decode_composite verify. Automatically assigns a jti if the claims don’t already have one.