-
Notifications
You must be signed in to change notification settings - Fork 44
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
[nrf noup] For Attestation, use message instead of hash #180
base: main
Are you sure you want to change the base?
[nrf noup] For Attestation, use message instead of hash #180
Conversation
@@ -241,6 +241,9 @@ attest_token_encode_start(struct attest_token_encode_ctx *me, | |||
me->opt_flags = opt_flags; | |||
me->key_select = key_select; | |||
|
|||
if (opt_flags & TOKEN_OPT_SIGN_MESSAGE) { |
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.
Should I make sure this is only added for nRF54L15, or should we use sign_message for all chips?
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 think that it makes sense to keep the default as is and not use sign_message.
But we need to have this as an option in TFM. We can sync with a call tomorrow or something and we can find a way to do that.
lib/ext/t_cose/inc/t_cose_common.h
Outdated
@@ -496,6 +496,14 @@ struct t_cose_parameters { | |||
*/ | |||
#define T_COSE_OPT_DECODE_ONLY 0x00000008 | |||
|
|||
/** | |||
* By defualt, the cose t_cose_sign1_sign will calculate the hash |
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.
"defualt" -> "default"
And the function t_cose_sign1_sign doesnt exit now.
@@ -241,6 +241,9 @@ attest_token_encode_start(struct attest_token_encode_ctx *me, | |||
me->opt_flags = opt_flags; | |||
me->key_select = key_select; | |||
|
|||
if (opt_flags & TOKEN_OPT_SIGN_MESSAGE) { |
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 think that it makes sense to keep the default as is and not use sign_message.
But we need to have this as an option in TFM. We can sync with a call tomorrow or something and we can find a way to do that.
c9cd993
to
dc8b931
Compare
The t_cose library only had support for signing a hash/digest. Adding support for signing message instead by using the option T_COSE_OPT_SIGN_MESSAGE. Signed-off-by: Sigurd Hellesvik <[email protected]>
For attestation, sign the full token instead of the hash of the token. Signed-off-by: Sigurd Hellesvik <[email protected]>
dc8b931
to
9c1a5ad
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.
Why are we making changes to lib/ext/t_cose
as a noup while it exists upstream?
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.
Good point. I will make a PR upstream instead, and then fix this PR accordingly.
Also updated T_COSE library to support this