Expand description
The JWS format profile (SIGNATIF §8, Annex E): JSON Web Signature, compact serialization, detached content (RFC 7515).
The reference stack’s envelope: the payload is external (the JCS
canonical bytes the co-signatures attest), the signing input is
ASCII(BASE64URL(header)) "." BASE64URL(payLoad) with the payload
carried out of band, per RFC 7515 detached-content signing.
Supported algorithms: EdDSA (Ed25519) and ES256 (ECDSA P-256) —
matched to the classical algorithms in the registry.
Enums§
- JwsAlg
- JWS algorithm identifiers.
Functions§
- detached_
signing_ input - Produce the detached JWS signing input:
BASE64URL(UTF8(ASCII(header))) "." BASE64URL(payload), where the payload is the external content (typically the JCS canonical bytes). - sign_
detached_ ed25519 - Sign the detached input with Ed25519 and return the compact JWS (header.sig — the payload segment stays with the content).
- sign_
detached_ es256 - Sign the detached input with ECDSA P-256 (
ES256). JWS ES256 signatures are the P1363-style fixed-width 64-byter || sencoding (RFC 7515 §3.4), not DER. - verify_
detached_ ed25519 - Verify a detached compact JWS against its external payload.
- verify_
detached_ es256 - Verify a detached compact ES256 JWS against its external payload.