Documentation
¶
Overview ¶
Package dsse implements the DSSE pre-authentication encoding (PAE), Ed25519 signing over PAE bytes, and the Week-1 leaf hash, exactly per docs/export-format-v1.md §1.2:
pae = "DSSEv1" SP LEN(payloadType) SP payloadType SP LEN(payload) SP payload
where LEN is the decimal ASCII byte length and SP is a single 0x20. The payload is framed as opaque length-prefixed bytes: no canonicalization step exists (receipt-schema-v1.md §2, Q27).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LeafHash ¶
LeafHash returns the Week-1 leaf hash: SHA-256 over the PAE bytes (export-format-v1.md §1.2).
func PAE ¶
PAE returns the DSSE v1 pre-authentication encoding of payloadType and payload. Lengths are byte lengths, written in decimal ASCII; separators are single 0x20 bytes; nothing is escaped or canonicalized.
Types ¶
type JWK ¶
JWK is an Ed25519 public key in JWK form (RFC 8037): kty OKP, crv Ed25519, x = base64url(raw 32-byte public key), no padding.
func JWKFromPublic ¶
JWKFromPublic returns the JWK for an Ed25519 public key.
func (JWK) Thumbprint ¶
Thumbprint returns the RFC 7638 JWK thumbprint: SHA-256 over the JSON object containing exactly the required members (crv, kty, x for OKP keys) in lexicographic order with no whitespace, base64url-encoded without padding.
The construction string is built by hand rather than via encoding/json so the member order and absence of escaping are explicit; base64url values never need JSON escaping.