feat(mlkem_top): KeyGen stage 4 - H(ek) + full dk, end-to-end KAT pass
Add ST_H stage: second sha3_top (mb_en=1) computes H(ek) over 800B ek as 6 pre-padded SHA3-256 rate blocks. Per block: assemble 136 bytes (h_padbyte applies 0x06...0x80 padding on final block) into h_block_r, feed (hold valid until mb_ready drops), wait permute; capture digest on last block into hek_r. Full dk readback tap: dk = dk_pke(768) || ek(800) || H(ek)(32) || z(32) = 1632B. End-to-end TB (tb_mlkem_kg_kat_xsim, no force/release): drive KAT count=0 d/z, run full KeyGen FSM (IDLE->G->A->C->N->M->E->H->DONE), verify: ek == KAT pk (800B) byte-exact dk == KAT sk (1632B) byte-exact Done in 21403 cycles. ML-KEM-512 KeyGen complete and KAT-verified. Prior stage TBs (2c/2e/2f) still pass (no regression).
This commit is contained in:
1632
sync_rtl/top/TB/vectors/c000_dk_full_bytes.hex
Normal file
1632
sync_rtl/top/TB/vectors/c000_dk_full_bytes.hex
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user