Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
42e5de8
[crypto, stm32wb, stm32wba, stm32n6] Encode GCM lengths as 64-bit values
AlexLanzano Oct 13, 2026
9bfb88a
[crypto, stm32wb, stm32wba, stm32n6, test] Add Stop to AES ECB/CBC/CT…
AlexLanzano Oct 13, 2026
f419514
[crypto, stm32wb, stm32wba] Clear stale key words on Start and drain …
AlexLanzano Oct 13, 2026
0967eb3
[crypto, stm32n6] Reset CRYP with IPRST on every teardown path
AlexLanzano Oct 13, 2026
b1da06c
[crypto, test] Test the generic crypto API layer on the host
AlexLanzano Oct 13, 2026
4c73d1b
[crypto, test] Add AES decrypt, AAD/nonce length and key-size tests
AlexLanzano Oct 13, 2026
ed15e7a
[crypto, stm32wba, test] Reset HASH on HMAC timeouts and Deinit, add …
AlexLanzano Oct 13, 2026
c519a1d
[crypto, stm32wb, test] Erase PKA RAM on Deinit, add PKA argument tests
AlexLanzano Oct 13, 2026
2363385
[rng, test] Test RNG Generate with lengths that end mid-sample
AlexLanzano Oct 13, 2026
1a396d7
[flash, stm32l1, stm32wb0] Verify L1 unlock, lock WB0 with PAGEPROT, …
AlexLanzano Oct 13, 2026
8e06913
[flash, stm32f4, stm32h5, stm32f0, stm32wb, stm32c0, test] Fix flash …
AlexLanzano Oct 13, 2026
c249433
[flash, block, test] Require power-of-two SPI-NOR pages, add page-cro…
AlexLanzano Oct 14, 2026
8d9acef
[dma, uart, stm32wb, stm32wba, test] Fix DMA error dispatch and teard…
AlexLanzano Oct 14, 2026
141b8e7
[uart, i2c, stm32wb, stm32f0, stm32f4, stm32l1, pic32cz, test] Report…
AlexLanzano Oct 14, 2026
95a5ad8
[gpio, stm32wb, stm32wb0, pic32cz, test] Set pins atomically, add pin…
AlexLanzano Oct 14, 2026
3a9336e
[eth, stm32h5, stm32n6, test] Validate descriptor and buffer config, …
AlexLanzano Oct 14, 2026
d22459a
[timer, pwm, stm32wb, test] Stop SysTick on Deinit, reject undefined …
AlexLanzano Oct 14, 2026
eb0fd11
[sensor, display, test] Report cleanup errors in BMI270 and Sharp LCD…
AlexLanzano Oct 14, 2026
d30179e
[uart, flash, dma, stm32, test] Clear stale UART line errors before D…
AlexLanzano Oct 14, 2026
b6a2ea8
[dma, stm32] Skip GPDMA Deinit reset when the channel abort times out
AlexLanzano Oct 14, 2026
8e7e66c
[crypto, stm32wba, test] Return ENOTSUP for empty HMAC messages, fix …
AlexLanzano Oct 16, 2026
4eac50e
[block, flash] Accept WHAL_INTERNAL_DEV device handles in SD and SPI-…
AlexLanzano Oct 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions boards/peripheral/wolfHAL_peripheral.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ whal_PeripheralFlash_Cfg g_peripheralFlash[] = {
.name = "spi_nor_w25q64",
.dev = &g_whalSpiNorW25q64,
.sectorSz = 4096,
.pageSz = 256,
},
#endif
{0}, /* sentinel */
Expand Down
1 change: 1 addition & 0 deletions boards/peripheral/wolfHAL_peripheral.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ typedef struct {
const char *name;
whal_Flash *dev;
size_t sectorSz; /* Sector (erase) size in bytes */
size_t pageSz; /* Program page size in bytes */
} whal_PeripheralFlash_Cfg;

/* Peripheral sensor device test configuration */
Expand Down
1 change: 1 addition & 0 deletions boards/stm32f091rc_nucleo/wolfHAL_board.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ enum {
.cfg = (void *)&(const whal_Stm32f0_Flash_Cfg){ \
.startAddr = 0x08000000, \
.size = 0x40000, \
.pageSz = 0x800, \
.timeout = &g_whalTimeout, \
}, \
}
Expand Down
1 change: 1 addition & 0 deletions boards/stm32f302r8_nucleo/wolfHAL_board.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ enum {
.cfg = (void *)&(const whal_Stm32f3_Flash_Cfg){ \
.startAddr = 0x08000000, \
.size = 0x10000, \
.pageSz = 0x800, \
.timeout = &g_whalTimeout, \
}, \
}
Expand Down
3 changes: 3 additions & 0 deletions boards/stm32wb55xx_nucleo/wolfHAL_board.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ extern whal_Spi g_whalSpi;
extern whal_Crypto g_whalCrypto;
extern whal_I2c g_whalI2c;
extern whal_Pwm g_whalPwm;
#ifdef BOARD_DMA
extern whal_Dma g_whalDma1;
#endif

extern whal_Timeout g_whalTimeout;
extern volatile uint32_t g_tick;
Expand Down
6 changes: 5 additions & 1 deletion docs/writing_a_driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ the HMAC key for the outer hash pass).
Each algorithm defines a vtable with typed function pointers. The available
operations depend on the algorithm category:

**Block ciphers** have `Oneshot`, `Start`, and `Process`:
**Block ciphers** have `Oneshot`, `Start`, `Process`, and `Stop`:

```c
typedef struct {
Expand All @@ -1193,6 +1193,7 @@ typedef struct {
const void *iv);
whal_Error (*Process)(whal_AesCbc *dev,
const void *in, void *out, size_t sz);
whal_Error (*Stop)(whal_AesCbc *dev);
} whal_AesCbcDriver;
```

Expand Down Expand Up @@ -1272,6 +1273,8 @@ typedef struct {
for AEAD, digest for hash/HMAC). Only present on algorithms that need a
finalization step. Block ciphers (ECB, CBC, CTR) do not have Finalize
because each Process call produces complete output.
- **Stop** ends a block cipher (ECB, CBC, CTR) streaming session. It disables
the engine and clears the key and IV from the hardware.

Unsupported parameter combinations (e.g. AES-192 on hardware that only
supports 128/256) return `WHAL_ENOTSUP`.
Expand Down Expand Up @@ -1332,6 +1335,7 @@ Streaming (block cipher):
whal_AesCbc_Start(BOARD_AES_CBC_DEV, WHAL_CRYPTO_ENCRYPT, key, 32, iv);
whal_AesCbc_Process(BOARD_AES_CBC_DEV, block1, out1, 16);
whal_AesCbc_Process(BOARD_AES_CBC_DEV, block2, out2, 16);
whal_AesCbc_Stop(BOARD_AES_CBC_DEV);
```

### Math Primitives
Expand Down
2 changes: 1 addition & 1 deletion src/block/sdhc_spi_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ whal_Error whal_SdhcSpi_Init(whal_Block *blockDev)
cfg = (whal_SdhcSpi_Cfg *)blockDev->cfg;
#endif

if (!cfg->spiDev || !cfg->spiComCfg || !cfg->gpioDev)
if (!cfg->spiComCfg)
return WHAL_EINVAL;

slow = *cfg->spiComCfg;
Expand Down
9 changes: 9 additions & 0 deletions src/crypto/aes_cbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,12 @@ whal_Error whal_AesCbc_Process(whal_AesCbc *dev,
return WHAL_ENOTSUP;
return dev->driver->Process(dev, in, out, sz);
}

whal_Error whal_AesCbc_Stop(whal_AesCbc *dev)
{
if (!dev)
return WHAL_EINVAL;
if (!dev->driver || !dev->driver->Stop)
return WHAL_ENOTSUP;
return dev->driver->Stop(dev);
}
9 changes: 9 additions & 0 deletions src/crypto/aes_ctr.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,12 @@ whal_Error whal_AesCtr_Process(whal_AesCtr *dev,
return WHAL_ENOTSUP;
return dev->driver->Process(dev, in, out, sz);
}

whal_Error whal_AesCtr_Stop(whal_AesCtr *dev)
{
if (!dev)
return WHAL_EINVAL;
if (!dev->driver || !dev->driver->Stop)
return WHAL_ENOTSUP;
return dev->driver->Stop(dev);
}
9 changes: 9 additions & 0 deletions src/crypto/aes_ecb.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,12 @@ whal_Error whal_AesEcb_Process(whal_AesEcb *dev,
return WHAL_ENOTSUP;
return dev->driver->Process(dev, in, out, sz);
}

whal_Error whal_AesEcb_Stop(whal_AesEcb *dev)
{
if (!dev)
return WHAL_EINVAL;
if (!dev->driver || !dev->driver->Stop)
return WHAL_ENOTSUP;
return dev->driver->Stop(dev);
}
Loading
Loading