-
Notifications
You must be signed in to change notification settings - Fork 789
Making key decryption nicer #2344
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
base: main
Are you sure you want to change the base?
Conversation
49ac2fd
to
46b5b6a
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.
1st and 3rd commits LGTM
#endif | ||
#if !defined(MCUBOOT_ENCRYPT_KW) | ||
uint8_t *cp; | ||
uint8_t *cpend; | ||
size_t len; |
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.
code which is using depends on #if defined(MCUBOOT_ENCRYPT_RSA)
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. I have converted it to draft, because this is unfinished. I have accidentally pushed it as non-draft.
46b5b6a
to
096f97d
Compare
@@ -35,6 +35,7 @@ extern "C" { | |||
|
|||
#if defined(MCUBOOT_USE_TINYCRYPT) | |||
typedef uintptr_t bootutil_ecdh_p256_context; | |||
typedef bootutil_ecdh_p256_context bootutil_key_xchange_ctx; |
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.
*exchange, also below
boot/bootutil/src/encrypted.c
Outdated
uint8_t private_key[EC_PRIVK_LEN]; | ||
uint8_t counter[BOOT_ENC_BLOCK_SIZE]; | ||
#endif | ||
#if !defined(MCUBOOT_ENCRYPT_KW) | ||
bootutil_key_xchange_ctx pk_ctx; |
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.
alignment here is off
The commit uses typedef to define common name for key exchange in order to reduce number of local definitions and #ifdef in code. Signed-off-by: Dominik Ermel <[email protected]>
Allows to reuse size_t variables. Signed-off-by: Dominik Ermel <[email protected]>
096f97d
to
4a842c4
Compare
No description provided.