Skip to main content

Module signer

Module signer 

Source
Expand description

Signing back ends for provenance signatures.

ProvenanceSigner builds the signing payload and the provenance block; a Signer turns the payload bytes into a signature. Two are defined:

signeralgorithmKeyUse
hmachmac-sha256Shared secretDevelopment and tests
tpmes256Non-exportable TPM 2.0 keyProduction (PhyTAU)

HmacSigner lives here. The TPM signer is in the separate phytrace-tpm crate so that the SDK does not link the TPM software stack unless a deployment needs it. The Python SDK defines the same signers with the same signer, algorithm and signature encodings.

Structs§

HmacSigner
HMAC-SHA256 with a shared secret. The verifier needs the same secret, so this proves nothing about which device signed; use it for development and tests only.
Quote
A TPM2 quote: the TPM-generated TPMS_ATTEST and the attestation key’s ES256 signature over it (hex r || s). Same encoding as the Python SDK’s Quote.

Constants§

DEFAULT_PCRS
PCRs quoted by default: the firmware and boot-loader measurements.
ES256
provenance.algorithm for ECDSA P-256 with SHA-256. The signature is the 64-byte r || s (each big-endian, zero-padded to 32 bytes) as lowercase hex, as in JWS ES256.
HMAC_SHA256
provenance.algorithm for HMAC-SHA256, signature as lowercase hex.

Traits§

Signer
Produces and checks provenance signatures over signing-payload bytes.

Functions§

to_hex
Lowercase hex encoding of bytes.