Skip to content

Conversation

@JacobBarthelmeh
Copy link
Contributor

ZD21110

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds DHUK-based wrapping/unwrapping for the token seed when persisting it to storage (STM32U5), so the seed used for deriving the token key is not stored in plaintext.

Changes:

  • Introduced DHUK AES-CBC wrapping format for the stored token seed (length + IV + ciphertext).
  • Routed token load/store seed read/write through new DHUK-aware helpers when WOLFSSL_STM32U5_DHUK is enabled.
  • Minor clarifying comment in user login path about re-deriving the token key from PIN + seed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

FIELD_SIZE(WP11_Token, userLastFailedLogin) +
FIELD_SIZE(WP11_Token, userFailLoginTimeout) +
#ifdef WOLFSSL_STM32U5_DHUK
(sizeof(word32) + 16 + PIN_SEED_SZ) + /* length + IV + encrypted seed */
Copy link
Contributor

Choose a reason for hiding this comment

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

Line length

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants