-
Notifications
You must be signed in to change notification settings - Fork 792
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
[dice,cwt] Add CWT implementation #24835
Conversation
I unintentionally close the former PR (#24824) while resolving the conflicts. WRT to the dup of #24754, the thought is to have a reference implementation & output, for cross checking against the auto-codegen. |
645bd60
to
682b807
Compare
I am not sure I understand why you want to have a manual C implementation. If you want to have a reference implementation and output, I would suggest to follow the same approach as for the X509 certificates: have a reference rust implementation (easier to review in my opinion) and check that the rust and autogenerated C implementation yield the same results. |
I agree with @pamaury here. The reference rust implementation would be more consistent with how the X.509 certs are implemented too, and we can reuse the rust implementation in host code to parse the device generated certs as well. Also there should be unittests generated for your device code as well to test its correctness. If this is really just a stepping stone until #24754 is implemented, and all the manually implemented code will be replaced shortly, could you please comment exactly the locations in the code that will be replaced by #24754? |
Thanks for the input. And to align with the X509 implementation (codegen, unit test, verifier), I'll set the manual CDI implementation to "draft" for now, till we complete all the related changes. |
682b807
to
8df6d0d
Compare
66a60c2
to
e94fabf
Compare
Verification result for this implementation.
|
@tommychiu-github What is the tool you used to verify this chain? the |
Yes, I'm using hwtrust tool from the Android source tree - https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:tools/security/remote_provisioning/hwtrust/src/;l=1 |
c9ed06e
to
9d93ac1
Compare
9d570ec
to
b26205b
Compare
2c64cde
to
35f9a82
Compare
Should this PR be empty? or should be rebased on top of #24754 to use the autogenerated code? or will a new PR be opened to make use of the autogenerated CWT builder code in #24754 to implement theses functions: |
No, it should't be closed. However github do it for me when I try to "sync fork" from the upstrem. |
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 commit message will be fleshed out once all dependencies are merged.
44f1f32
to
d8af8fb
Compare
I think you can update this PR and replace with autogen code now that it has been merged @tommychiu-github |
2aeb636
to
ebb7c31
Compare
Update the latest offline verification result.
|
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.
mostly, LGTM. A few things should be cleaned up first, then we can get this merged.
Flesh out the CDI_0/1 generating APIs by the auto-gen CWT templates. Signed-off-by: Tommy Chiu <[email protected]>
ebb7c31
to
f8a8be4
Compare
Thanks @tommychiu-github ! |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin earlgrey_1.0.0
git worktree add -d .worktree/backport-24835-to-earlgrey_1.0.0 origin/earlgrey_1.0.0
cd .worktree/backport-24835-to-earlgrey_1.0.0
git switch --create backport-24835-to-earlgrey_1.0.0
git cherry-pick -x f8a8be48c2104976943e1ff95ba7d8e0469040a3 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin earlgrey_1.0.0
git worktree add -d .worktree/backport-24835-to-earlgrey_1.0.0 origin/earlgrey_1.0.0
cd .worktree/backport-24835-to-earlgrey_1.0.0
git switch --create backport-24835-to-earlgrey_1.0.0
git cherry-pick -x f8a8be48c2104976943e1ff95ba7d8e0469040a3 |
Add some helper functions and a CDI_* builder manually.
Some of the changes in the builder will be replaced by a following RP on opentitantool > codegen feature.