-
Notifications
You must be signed in to change notification settings - Fork 160
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
Implement TPM2_Commit #287
Comments
Now I'm implementing the test code of TPM2_Commit, but not work.
https://github.com/akakou/go-tpm/blob/tpm2-commit/direct/tpm2/commit_test.go |
Can you try removing the space between the comma-separated type annotations at https://github.com/akakou/go-tpm/blob/dafdbfea0c93185d68e8afe8eccf4c520fa48456/direct/tpm2/tpm2.go#L625? I.e., SignHandle handle `gotpm:"handle,auth"` |
Thank you! It's one of the bugs and I fixed it.
Do you have any idea? |
I added to create a key that is not the primary key because the basic sample program needs to run However, the program has the same error as before... |
looks like an ill-formed error code to me. Handle indices start at 1, so "handle 0" doesn't make a lot of sense. I'm assuming the test code got back raw error code 0x95, but we should investigate whether there's a bug in the error interpretation stack. Filed #290 to follow up on our side. Confession: I still don't understand ECDAA. Please correct me where my crypto veers astray 😅 P1: tpm2b.ECCPoint{
Point: tpms.ECCPoint{
X: tpm2b.ECCParameter{
Buffer: []byte{
0x1, 0x1,
},
},
Y: tpm2b.ECCParameter{
Buffer: []byte{0x1, 0x1},
},
},
Size: 8,
}, P1 doesn't look like a real ECC point to me. Is 0x0101,0x0101 a legitimate BNP256 point? Second issue, looks like you added TPM2B_ECC_Point but there is some subtlety about marshalling I need to point out: // TPM2BECCPoint represents a TPM2B_ECC_POINT.
// See definition in Part 2: Structures, section 11.2.5.3.
type TPM2BECCPoint struct {
Size uint16
Point TPMSECCPoint
} In go-tpm tpmdirect, sized 2Bs' sizes are never passed in by the user. Instead they are computed on the fly. Can you fix this to // TPM2BECCPoint represents a TPM2B_ECC_POINT.
// See definition in Part 2: Structures, section 11.2.5.3.
type TPM2BECCPoint struct {
Point TPMSECCPoint `gotpm:"sized"`
} The |
Thank you! You are right and I fixed them. Specifically, I fixed them as:
|
But the program calls the same error... |
I compared worked TPM2_Commit(tpm2-tools) and this library. These are the binaries: go-tpm
tpm2-tools
|
Sorry...I had added the unnecessary parameter to the request of TPM2_Commit. |
So I fixed it and it works. |
It is implemented at #296, so I closed this issue. |
It needs when implementing ECDAA(e.g. #278 (comment)).
https://manpages.ubuntu.com/manpages/jammy/man1/tpm2_commit.1.html
The text was updated successfully, but these errors were encountered: