Repository navigation
Fix ML-KEM inverse NTT overflow - #12273
Conversation
|
retest this please |
|
ec6c5b2 to
44d805c
Compare
|
retest this please |
1 similar comment
|
retest this please |
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #12273
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs
Not reviewed (no scan target covers them): wolfcrypt/src/port/arm/armv8-32-mlkem-asm.S, wolfcrypt/src/port/arm/armv8-32-mlkem-asm_c.c, wolfcrypt/src/port/arm/armv8-mlkem-asm.S, wolfcrypt/src/port/arm/armv8-mlkem-asm.asm, wolfcrypt/src/port/arm/armv8-mlkem-asm_c.c, wolfcrypt/src/port/arm/thumb2-mlkem-asm.S, wolfcrypt/src/port/arm/thumb2-mlkem-asm_c.c
Coverage: 2 of 2 in-scope changed file(s) opened by the reviewer
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Max
|
The assembly code is generated from scripts. |
|
The corresponding assembly generator changes are in wolfSSL/scripts#728 |
Description
Barrett-reduce the four-input sums after the len=4 inverse NTT layer. This keeps the following len=8 additions and subtractions within the signed 16-bit range for ML-KEM-1024.
Apply the same reduction to the WOLFSSL_MLKEM_INVNTT_UNROLL path and regenerate the AArch64, Arm32, and Thumb-2 assembly implementations with the equivalent reduction.
Add a fixed ML-KEM-1024 public API regression vector that previously produced different encapsulation and decapsulation shared secrets.
Testing