-
Notifications
You must be signed in to change notification settings - Fork 17
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
tpm2: Create TPM2 keys with noDA attribute if no user auth is required #352
tpm2: Create TPM2 keys with noDA attribute if no user auth is required #352
Conversation
By default, all TPM2 keys are protected by the TPM's dictionary attack protection logic. Given that the user auth mode is immutable, we should take advantage of this to create keys that require no user auth with the noDA attribute, so that they aren't protected by the TPM's dictionary attack protection logic. This means that these keys will still be recoverable, even if the TPM is in lockout mode.
14fc136
to
b5882cd
Compare
I can't request a review from you @tonyespy, but I thought you might be interested in this one :) |
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.
thanks, small comment
@@ -160,7 +160,7 @@ func makeSealedKeyData(tpm *tpm2.TPMContext, params *makeSealedKeyDataParams, se | |||
} | |||
|
|||
// Seal the symmetric key and nonce. | |||
priv, pub, importSymSeed, err := sealer.CreateSealedObject(symKey[:], nameAlg, authPolicyDigest) | |||
priv, pub, importSymSeed, err := sealer.CreateSealedObject(symKey[:], nameAlg, authPolicyDigest, !requireAuthValue) |
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.
probably worth having a comment here explaining !RequireAuthValue policy/logic
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.
I've added a comment here now.
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.
thanks
By default, all TPM2 keys are protected by the TPM's dictionary attack
protection logic. Given that the user auth mode is immutable, we should
take advantage of this to create keys that require no user auth with the
noDA attribute, so that they aren't protected by the TPM's dictionary
attack protection logic. This means that these keys will still be
recoverable, even if the TPM is in lockout mode.