shirudo attest challenge#
Make a credential challenge that only the TPM holding both the target’s endorsement key and its attestation key can answer.
Runs on: operator host, offline. It computes the credential in software and uses no TPM. Requires: an evidence document from the target. Changes measured state: no.
Usage#
shirudo attest challenge --evidence=<evidence> (-o <challenge> | --output=<challenge>)
(--ek-ca=<bundle> | --ek-name=<name> | --trust-presented-ek)
[--ak-name=<name>]
Every option takes its value after = or as the next argument, and
-o is --output.
Description#
Enrollment pins the target’s attestation key. challenge binds that key
to the target’s endorsement key:
It reads the attestation and endorsement keys from the evidence. With
--ak-namethe attestation key must be that one, and with--ek-namethe endorsement key.It checks that the endorsement key’s name matches its public area and that the key has the TCG default template under the endorsement policy.
It decides whether to trust the endorsement key:
With
--ek-ca, the endorsement certificate in the evidence must describe the key and chain to an issuer in the PEM bundle.With
--ek-name, the pinned name vouches for the key.With
--trust-presented-ek, the key is accepted as presented.
Without any of the three, the check fails.
It makes a random 32-byte credential, protects it for the endorsement key and the attestation key name, writes the challenge to
--outputwith mode 0600 and printschallenge: <path>andcredential: <hex>.
Give the challenge to shirudo attest --challenge=<challenge> on the
target. Its evidence then carries the recovered credential, and
attest verify --expect-credential=<hex> --ak-name=<name> checks it.
Options#
Option |
Argument |
Description |
|---|---|---|
|
|
Required. Evidence from the target. |
|
|
Required. Where to write the challenge. |
|
|
The attestation key the challenge is for. |
|
|
Issuers the endorsement certificate must chain to. |
|
|
An endorsement key name known out of band. |
|
none |
Accept an endorsement key that nothing vouches for. |
Exit status#
Status |
Meaning |
|---|---|
0 |
The challenge was written. |
1 |
A check failed ( |
2 |
A usage error: |
Examples#
Make a challenge for a target whose TPM vendor roots you hold:
operator$ shirudo attest challenge --evidence=ev.json --ak-name=<ak-name> --ek-ca=<tpm-vendor-roots> --output=challenge.json
<ak-name> is .ak.name of the evidence (shirudo attest) and
<tpm-vendor-roots> a PEM bundle of the TPM manufacturers’ issuing
certificates.