-
Notifications
You must be signed in to change notification settings - Fork 159
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
Basic Sealing and Unsealing #246
Comments
I don't think the current implementation of Lines 575 to 580 in d331077
Since I propose that we improve |
Alternative: deprecate go-tpm's (Why is there no TPM2_Seal command? Because a sealed blob is just another type of TPM object, which can always be created either by the TPM itself with |
@chrisfenner Thanks for the reply and the explanations. I don't think there are any security issues added, as currently it would be possible to unseal by: tpm2_load -C 0x81000001 -u test.pub -r test.priv -c test.ctx
tpm2_startauthsession --policy-session -S session.dat
tpm2_policypassword -S session.dat
tpm2_unseal -c test.ctx -p session:session.dat+"" So there is no security difference from my perspective. It is also a question of usability. And I think it is always a good idea to be as compatible as possible to tpm2-tools. Remark: I manually added FlagUserWithAuth, but it does not seem to work that simple. |
@chrisfenner I think deprecating inPublic := tpm2.Public{
Type: tpm2.AlgKeyedHash,
NameAlg: sessionHashAlgTpm,
Attributes: tpm2.FlagFixedTPM | tpm2.FlagFixedParent | tpm2.FlagUserWithAuth,
AuthPolicy: nil,
}
private, public, _, _, _, err := tpm2.CreateKeyWithSensitive(rw, parentHandle, PCRSelection{}, "", "", inPublic, sensitive)
// Check err
// Store private/public
@tobuh I would say that this library seeks to (eventually) have parity with the TCG's ESAPI which is part of If you want a higher-level API that makes this sealing stuff easier, we have |
I know the example for complete seal and unsealing workflow, including policies. However, just simple tpm2.Seal() und tpm2.Unseal() does not work. For example, I would expect the following to work:
But I receive this error:
error code 0x2f : authValue or authPolicy is not available for selected entity
I would expect something similar (and compatible) to this:
Is there something I do wrong?
The text was updated successfully, but these errors were encountered: