Skip to content

Lpc55s69 hwpuf simplified - #11700

Open
twcook86 wants to merge 3 commits into
wolfSSL:masterfrom
twcook86:lpc55s69_hwpuf_simplified
Open

twcook86 wants to merge 3 commits into
wolfSSL:masterfrom
twcook86:lpc55s69_hwpuf_simplified

Conversation

@twcook86

@twcook86 twcook86 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Description

This adds a simplified lpc55s69 hardware puf api to wolfCrypt, which supports generating/retrieving keys of size 16, 24, 32 bytes.

Note: this pr goes with wolfSSL/wolfBoot#787

Testing

Tested on hardware with device attestation example in wolfBoot.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

Copilot AI balanced review requested due to automatic review settings October 9, 2026 07:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The PSA seed override remains unprotected, the new API breaks C++ linkage, and its Zeroize documentation contradicts its implementation.

4 open findings
What changed in this PR

Adds a simplified LPC55S69 hardware PUF API for generating and retrieving 16-, 24-, and 32-byte keys.

Changes:

  • Adds HWPUF lifecycle, key-management APIs, error codes, and documentation.
  • Updates NXP HashCrypt AES and SHA-256 test handling.
  • Preserves custom PSA random-block generators.
File Description
.wolfssl_known_macro_extras Registers the HWPUF feature macro.
wolfcrypt/​src/​aes.c Ensures HashCrypt retains raw AES keys.
wolfcrypt/​src/​error.c Adds HWPUF error strings.
wolfcrypt/​src/​include.am Distributes the HWPUF source.
wolfcrypt/​src/​port/​nxp/​README.md Documents HWPUF usage and lifecycle.
wolfcrypt/​src/​port/​nxp/​hashcrypt_port.c Adds HashCrypt AES-CTR key setup.
wolfcrypt/​src/​port/​nxp/​hwpuf_port.c Implements the HWPUF API.
wolfcrypt/​test/​test.c Skips an incompatible interleaved SHA-256 test.
wolfssl/​wolfcrypt/​error-crypt.h Defines HWPUF error codes.
wolfssl/​wolfcrypt/​include.am Registers the HWPUF header.
wolfssl/​wolfcrypt/​port/​nxp/​hwpuf_port.h Declares the HWPUF API.
wolfssl/​wolfcrypt/​port/​psa/​psa.h Guards a custom RNG block override.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread wolfssl/wolfcrypt/port/nxp/hwpuf_port.h
Comment thread wolfssl/wolfcrypt/port/psa/psa.h
Comment thread wolfcrypt/src/port/nxp/README.md Outdated
Comment thread wolfcrypt/src/port/nxp/hwpuf_port.c Outdated
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report

gcc-arm-cortex-m4

  • FLASH: .rodata.CSWTCH.1 +24 B, .rodata.str1.1 +91 B (+0.1%, 207,967 B / 262,144 B, total: 79% used)

gcc-arm-cortex-m4-crypto-only

  • FLASH: .rodata.CSWTCH.1 +24 B, .rodata.str1.1 +91 B (+0.1%, 180,880 B / 262,144 B, total: 69% used)

gcc-arm-cortex-m4-openssl-compat

  • FLASH: .rodata +96 B, .text +128 B (+0.0%, 792,860 B / 1,048,576 B, total: 76% used)

gcc-arm-cortex-m4-pkcs7

  • FLASH: .rodata.CSWTCH.1 +24 B, .rodata.str1.1 +91 B (+0.1%, 221,777 B / 262,144 B, total: 85% used)

gcc-arm-cortex-m4-pq

  • FLASH: .rodata +120 B (+0.0%, 308,776 B / 1,048,576 B, total: 29% used)

gcc-arm-cortex-m4-rsa-only

  • FLASH: .rodata +112 B (+0.0%, 341,144 B / 1,048,576 B, total: 33% used)

gcc-arm-cortex-m4-tls13

  • FLASH: .rodata.CSWTCH.1 +24 B, .rodata.str1.1 +91 B (+0.0%, 247,185 B / 262,144 B, total: 94% used)

gcc-arm-cortex-m7

  • FLASH: .rodata.CSWTCH.1 +24 B, .rodata.str1.1 +91 B (+0.1%, 207,967 B / 262,144 B, total: 79% used)

gcc-arm-cortex-m7-pq

  • FLASH: .rodata +120 B (+0.0%, 309,736 B / 1,048,576 B, total: 30% used)

gcc-arm-cortex-m7-tls13

  • FLASH: .rodata.CSWTCH.1 +24 B, .rodata.str1.1 +91 B (+0.0%, 247,249 B / 262,144 B, total: 94% used)

linuxkm-standard

  • Data: __patchable_function_entries +48 B (+0.1%, 51,656 B)

stm32-sim-stm32h753

@twcook86 twcook86 self-assigned this Oct 9, 2026

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #11700

Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfcrypt-port-bugs, wolfssl-src, wolfssl-bugs
Coverage: 4 of 8 in-scope changed file(s) opened by the reviewer; not opened: wolfcrypt/src/error.c, wolfssl/wolfcrypt/error-crypt.h, wolfssl/wolfcrypt/port/nxp/hwpuf_port.h, wolfssl/wolfcrypt/port/psa/psa.h

Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Review tier: Lite

Comment thread wolfcrypt/test/test.c
@twcook86 twcook86 assigned wolfSSL-Bot and unassigned twcook86 Oct 9, 2026
@twcook86
twcook86 requested a review from dgarske October 9, 2026 15:54
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.

5 participants