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:
signer | algorithm | Key | Use |
|---|---|---|---|
hmac | hmac-sha256 | Shared secret | Development and tests |
tpm | es256 | Non-exportable TPM 2.0 key | Production (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§
- Hmac
Signer - 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_ATTESTand the attestation key’s ES256 signature over it (hexr || s). Same encoding as the Python SDK’sQuote.
Constants§
- DEFAULT_
PCRS - PCRs quoted by default: the firmware and boot-loader measurements.
- ES256
provenance.algorithmfor ECDSA P-256 with SHA-256. The signature is the 64-byter || s(each big-endian, zero-padded to 32 bytes) as lowercase hex, as in JWS ES256.- HMAC_
SHA256 provenance.algorithmfor 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.