Skip to content

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

de-nordic
Copy link
Collaborator

No description provided.

@de-nordic de-nordic requested a review from davidvincze as a code owner June 17, 2025 19:56
@de-nordic de-nordic force-pushed the why-do-i-even-care branch 2 times, most recently from 49ac2fd to 46b5b6a Compare June 18, 2025 08:20
Copy link
Collaborator

@nvlsianpu nvlsianpu left a 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;
Copy link
Collaborator

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)

Copy link
Collaborator Author

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.

@de-nordic de-nordic marked this pull request as draft June 25, 2025 13:44
@de-nordic de-nordic force-pushed the why-do-i-even-care branch from 46b5b6a to 096f97d Compare July 17, 2025 16:19
@de-nordic de-nordic marked this pull request as ready for review July 17, 2025 16:19
@de-nordic de-nordic added the crypto Encryption support label Jul 17, 2025
@de-nordic de-nordic requested review from nvlsianpu and nordicjm July 22, 2025 08:08
@@ -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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*exchange, also below

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;
Copy link
Collaborator

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]>
@de-nordic de-nordic force-pushed the why-do-i-even-care branch from 096f97d to 4a842c4 Compare July 22, 2025 11:31
@de-nordic de-nordic requested a review from nordicjm July 22, 2025 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crypto Encryption support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants