Exact public Ed25519 JWK encoding, decoding, and RFC 7638 thumbprints.
Every documented function here refuses a key that fails
BoundedAuthorityProtocol.Ed25519.acceptable_public_key?/1 (non-canonical, small-order or
off-curve) with the closed {:error, :invalid}, so no such key can enter a JWK, a holder
confirmation thumbprint, or a key fingerprint.
Summary
Functions
Decodes an exact public Ed25519 OKP JWK carrying an acceptable key.
Encodes one acceptable raw 32-byte Ed25519 public key as the canonical public OKP JWK.
Returns the canonical base64url RFC 7638 thumbprint.
Returns the exact RFC 7638 public OKP thumbprint preimage.
Functions
@spec decode_public(binary(), BoundedAuthorityProtocol.V1.Bounds.t() | map()) :: {:ok, binary()} | {:error, :invalid}
Decodes an exact public Ed25519 OKP JWK carrying an acceptable key.
@spec encode_public(binary(), BoundedAuthorityProtocol.V1.Bounds.t() | map()) :: {:ok, binary()} | {:error, :invalid}
Encodes one acceptable raw 32-byte Ed25519 public key as the canonical public OKP JWK.
@spec thumbprint(binary(), BoundedAuthorityProtocol.V1.Bounds.t() | map()) :: {:ok, binary()} | {:error, :invalid}
Returns the canonical base64url RFC 7638 thumbprint.
@spec thumbprint_preimage(binary(), BoundedAuthorityProtocol.V1.Bounds.t() | map()) :: {:ok, binary()} | {:error, :invalid}
Returns the exact RFC 7638 public OKP thumbprint preimage.