Skip to content

auth: support policy session hash in PCR authorization#3597

Open
chench246 wants to merge 1 commit into
tpm2-software:masterfrom
chench246:master
Open

auth: support policy session hash in PCR authorization#3597
chench246 wants to merge 1 commit into
tpm2-software:masterfrom
chench246:master

Conversation

@chench246

Copy link
Copy Markdown

The implicit policy session created for pcr: authorization currently uses the default session hash algorithm. When a policy digest was created with a different hash algorithm, the TPM rejects the authorization with TPM_RC_POLICY_FAIL.

Extend the pcr: authorization mini-language to allow selecting the hash algorithm used by the implicit PCR policy session:

pcr:<pcr-spec>[@<policy-session-hash>][=<raw-pcr-file>]

For example:

pcr:sm3_256:0,2@sm3_256

This allows a PCR policy whose digest was created with a non-default hash algorithm, such as sm3_256, to be satisfied through -P/--auth. The implicit session hash is only overridden when the optional @<policy-session-hash> suffix is supplied.

Extend the pcr: authorization mini-language with an optional policy session hash suffix so implicit PCR policy sessions can use a non-default hash algorithm, for example pcr:sm3_256:0,2@sm3_256.

This keeps the existing pcr:<pcr-spec>[=<raw-pcr-file>] behavior unchanged when no suffix is present, and avoids adding command-specific authorization options.

Signed-off-by: chench246 <chench246@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant