-
Notifications
You must be signed in to change notification settings - Fork 21
use DHUK to wrap/unwrap seed value used for token #159
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: master
Are you sure you want to change the base?
Conversation
b2735cf to
9d097b4
Compare
9d097b4 to
760bae8
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.
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_DHUKis 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 */ |
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.
Line length
ZD21110