- The new specification and code now indeed implements implicit-rejection Fujisaki-Okamoto for IND-CCA2, much in the same manner as Kyber. Good.
- As far as I can see, the domain separation byte constants for functions I, J, G, and H (Table 1) are not documented anywhere.
- The "biased" fixed-weight sampling function GenerateRandomSupport() is implemented differently from the explanation in Section 3.2: Given a uniform input x, 0 <= x < 2^32, instead of computing x mod n (on line 2 of rand), it computes floor((x * n) / 2^32). These have different distributions -- I am not sure which version Section 6.2.3 ("Security proof with non uniform randomness sampling") is analyzing, or both.
- The new function, SampleFixedWeightVect$, used to sample the secret key (x and y) via rejection sampling, is not documented anywhere except in the source code. I reverse-engineered it from the implementation; this is more complex than it needs to be, and somewhat wasteful on XOF output (I don't understand why the implementation doesn't process XOF output with SHAKE256's block size). However, the output distribution looks right.
- There are numerous oddities -- the rejection sampler uses big-endian conversion from 3 bytes, while the biased sampler uses little-endian conversion from 4-byte chunks. An implementor can't guess things like this. I suggest stating the endianness convention in the specification and using the same endianness convention in all parts of the algorithm (preferably little-endian, as in FIPS 203 and 204).
- From an engineering perspective, it is preferable to have only one function for sampling fixed-weight vectors, and in my opinion, it should be a rejection sampler. The arguments for the biased function being "better in hardware" do not make sense to me (and I have substantial experience with PQC hardware). Clearly, only having to implement *one* function for this purpose would be preferable from a hardware perspective, and the rejection sampling variant actually seems more efficient (uses less XOF output and has simpler logic).
- Authors implement their own PRNG, so this implementation can't use the same KAT generation logic as other KEMs. Suggest _internal() - style interfaces for testability, as used in FIPS 203.
Cheers,
-markku