BoundedAuthorityProtocol.RoleAttestation.V1 (Bounded Authority Protocol v1.0.0)

Copy Markdown View Source

Explicit entry point for the byte-distinct role-attestation profile (bap-role-attestation/1).

Summary

Producers

Assembles a role attestation at profile maxima.

Assembles a role attestation under caller bounds.

Builds the deterministic role-attestation signing input.

Decoders

Boundedly decodes a role attestation without evaluating trust.

Verifiers

Verifies a role attestation against caller-supplied attestor trust, subject binding, and now.

Producers

assemble_compact(signing_input, signature)

@spec assemble_compact(BoundedAuthorityProtocol.V1.SigningInput.t(), binary()) ::
  {:ok, binary()} | {:error, :invalid}

Assembles a role attestation at profile maxima.

assemble_compact(signing_input, signature, limits)

@spec assemble_compact(
  BoundedAuthorityProtocol.V1.SigningInput.t(),
  binary(),
  BoundedAuthorityProtocol.V1.Bounds.t() | map()
) :: {:ok, binary()} | {:error, :invalid}

Assembles a role attestation under caller bounds.

Since 0.9.0, assembly also refuses, with {:error, :invalid}, a signature that no conforming signer emits: an Ed25519 signature whose S is not below the group order or whose R is non-canonical or of small order (erratum 3). It never rewrites the signature bytes it accepts.

attestation_signing_input(attestation, limits)

Builds the deterministic role-attestation signing input.

Decoders

decode_attestation(compact, limits)

@spec decode_attestation(binary(), BoundedAuthorityProtocol.V1.Bounds.t() | map()) ::
  {:ok, BoundedAuthorityProtocol.RoleAttestation.V1.DecodedAttestation.t()}
  | {:error, :invalid}

Boundedly decodes a role attestation without evaluating trust.

Verifiers

verify_attestation(compact, expected)

Verifies a role attestation against caller-supplied attestor trust, subject binding, and now.