-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hash: add more configurable hash algorithm for public key digest #611
Conversation
560ef3a
to
de2e420
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dongx1x can you fix the formatting (cargo fmt
) and also add SM3_256 as an hash algorithm (that one is also supported by the server side: https://github.com/keylime/keylime/blob/master/keylime/common/algorithms.py)?
Otherwise the change LGTM.
c268dc4
to
f0fd09a
Compare
The current public key digest is using SHA1 and SHA256, and the digest will extend to TPM PCR 16. But from TPM2, SHA1 is not mandatory anymore, so this patch makes the hash algorithm configurable. Reference: TCG PC Client Platform TPM Profile Specification for TPM 2.0, Section 4.6 https://trustedcomputinggroup.org/wp-content/uploads/PC-Client-Specific-Platform-TPM-Profile-for-TPM-2p0-v1p05p_r14_pub.pdf Signed-off-by: Dong, Xiaocheng <[email protected]>
Sure, updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current public key digest is using SHA1 and SHA256, and the digest will extend to TPM PCR 16. But from TPM2, SHA1 is not mandatory anymore, so this patch makes the hash algorithm configurable.
Reference:
TCG PC Client Platform TPM Profile Specification for TPM 2.0, Section 4.6 https://trustedcomputinggroup.org/wp-content/uploads/PC-Client-Specific-Platform-TPM-Profile-for-TPM-2p0-v1p05p_r14_pub.pdf