shirudo attest predict#
Compute the measurement register value a target reaches from the certificates it enrolls, the upatches it restores at boot and the events after boot.
Runs on: operator host, offline. It uses no TPM and no target state. Requires: the certificates the target enrolls. Changes measured state: no.
Usage#
shirudo attest predict --cert=<certificate>... [--upatch=<file>]...
[--expect=[java:]<name>=<digest>]... [--tree-root=<digest>]
[--event=<event>]...
[--bind-pcr=9=<value> --bind-pcr=11=<value>
--writer-public=<modulus>] [--json]
Every option takes its value after = or as the next argument. On a
host where enforcement is up the image gate refuses --cert.
Description#
predict recomputes what init and later commands measure:
The init event covers the digest of the enrolled certificate set (every
--cert, in any order), the set of upatches archived at boot (every--upatchand--expect) and the upatch tree root.The register starts at zero and is extended with the init event. The result is
register_at_boot.Each
--event, in the order given, extends it further. The result isregister_after_events.With the PCR 9 and 11 values at binding and the writer’s public key,
predictalso computes the register’s TPM name, the anchor record and the PCR 9 value after the anchor.
The certificate set must be exactly the set the target enrolls: the primary certificate and every vouched one.
Pass register_at_boot or register_after_events to
upatch load --expect-chain or attest verify --expect-chain.
Events#
|
Event |
|---|---|
|
|
|
|
|
|
|
|
|
an operation |
|
a key revocation. |
The eventlog entry of each event (Eventlog events) carries the values.
Output#
Line |
Value |
|---|---|
|
digest of the upatch set archived at boot |
|
the init event |
|
the register after |
|
the register after the |
|
the register’s TPM name, the anchor record and PCR 9 after it,
only with |
Options#
Option |
Argument |
Description |
|---|---|---|
|
|
Required. A certificate the target enrolls. Repeat for each, up to 16. |
|
|
An artifact archived on the target at boot. Repeatable, each
upatch name once across |
|
|
An archived upatch by name and payload digest, |
|
|
The upatch tree projection root at boot. Default: all zero. |
|
|
An event after boot. Repeatable, applied in order. |
|
none |
Print the values as one JSON object with |
|
|
PCR values the register was bound under. Give both. |
|
|
The 384-byte RSA modulus of the init record’s writer key. Required
with |
Exit status#
Status |
Meaning |
|---|---|
0 |
The values were printed. |
1 |
The register’s write policy could not be computed, or memory ran out. |
2 |
A usage error: no |
Examples#
Predict the register at boot for a target that enrolls one certificate and restores nothing:
operator$ shirudo attest predict --cert=cert.der
set_digest: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
init_event: 1014642f2d76b1eb10b4872c4299a70e191be0eb2958de65a7098bfe92a93124
register_at_boot: 33ec2c3ed20693c2e40131e693a11b169b91efd8f7438f86313c915e512121e5
Predict the register of a target that enrolls two certificates, after one load:
operator$ shirudo attest predict --cert=cert.der --cert=own.der --event=load:basic=46f3d9f5f6568bddb7692cad28e99a86a3104192d8a2251f9ef9ec6d593c2035
set_digest: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
init_event: cb206abf8e514bc714fc69f372d464d2c7512f1489431aed2319551c5ed34b9a
register_at_boot: d1bdb80f7c0cfc1560f0a5a0b974d282bfd05fc95852b7649d59a054b450aa51
register_after_events: ff0eb201e073fdeeba80a4b268f039bea58ec6dd2998e6651c4834ee99f3e103
On that target, status showed Chain: d1bdb80f... after boot and
ff0eb201... after upatch load basic.upatch.