Skip to content

rtl8735b: add plaintext-key AES-GCM device test alongside HUK, selected by devId - #612

Open
dgarske wants to merge 2 commits into
wolfSSL:masterfrom
dgarske:aes_plain
Open

rtl8735b: add plaintext-key AES-GCM device test alongside HUK, selected by devId#612
dgarske wants to merge 2 commits into
wolfSSL:masterfrom
dgarske:aes_plain

Conversation

@dgarske

@dgarske dgarske commented Jul 30, 2026

Copy link
Copy Markdown
Member

Summary

Extends the AmebaPro2 RTL8735B HUK example (rtl8735b/) with a plaintext-key AES-GCM test that uses the new WOLFSSL_RTL8735B_AES crypto-callback device, registered alongside the HUK device and selected per Aes by devId. Companion to wolfSSL PR wolfSSL/wolfssl#10970 (required to build).

What it adds

  • Enables WOLFSSL_RTL8735B_AES in user_settings.h and registers wc_Rtl8735b_AesRegister(WC_RTL8735B_AES_DEVID) next to wc_Rtl8735b_HukRegister(WC_HUK_DEVID).
  • A plaintext AES-GCM check: reproduces a published McGrew GCM vector on the HW engine (key used verbatim), then encrypts the same 32 key bytes through both devices and shows the plaintext ciphertext differs from the HUK device-bound ciphertext -- demonstrating run-time selection by devId.

Testing

On the RealTek RTL8735B (AmebaPro2 EVB): 67/67 PASS, including the plaintext AES-GCM vector match and HUK coexistence.

wolfSSL/wolfssl#10970

@dgarske dgarske self-assigned this Jul 30, 2026
Copilot AI review requested due to automatic review settings July 30, 2026 16:13

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.

Pull request overview

Adds an optional second crypto-callback device for RTL8735B that exercises AES-GCM using a plaintext caller-supplied key (selected by devId) alongside the existing HUK-bound device, and documents/controls it via build settings.

Changes:

  • Enable WOLFSSL_RTL8735B_AES in the RTL8735B example settings to compile plaintext-key AES tests.
  • Add an AES-GCM known-answer test (published vector) plus a “coexistence” demonstration comparing ciphertext across the plaintext device vs HUK device.
  • Document the new second-device behavior and selection mechanism (devId) in the RTL8735B README.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
rtl8735b/user_settings.h Enables the plaintext-key AES device build flag alongside the existing HUK setup.
rtl8735b/README.md Documents the second crypto-callback device and how devId selects plaintext vs HUK behavior.
rtl8735b/main.c Implements plaintext-key AES-GCM KAT + coexistence demo and registers/unregisters the second device.

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

Comment thread rtl8735b/main.c Outdated
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.

2 participants