Reuses the E5 bit-packer FSM for ST_ENC_C2, generalized over region: - coeff source: cp_coeff_src = bank_t[UPSUM] (v) for C2, bank_se (u) for C1 - bit width: cp_d already = dv_rt for C2 else du_rt - poly count: cp_poly_max = 1 (single v) for C2, K for C1 - ct write pointer cp_wa CONTINUES from c1_bytes into C2 (not reset), so c2 lands right after c1. c1 ends on a whole-byte/poly boundary (256*du/8 integral), so cp_buf/nbits are empty at the C1->C2 handoff. FSM tail: ST_ENC_V -> ST_ENC_C2 -> ST_DONE. TB: verify_e7 compares the full ct (c1||c2, CTB bytes) to KAT.ct byte-exact via the dbg_ct tap. Combined with the E0 ss==KAT.ss check this is the full end-to-end Encaps KAT (ct==KAT.ct && ss==KAT.ss). Verified end-to-end for K=2/3/4, cases 0-2 (K2) / 0-1 (K3,K4): ct==KAT.ct && ss==KAT.ss. ML-KEM Encaps complete. KeyGen unregressed.
85 KiB
85 KiB