RFR: 8298387: Implementing ML-DSA signature algorithm [v7]

Andrey Turbanov aturbanov at openjdk.org
Tue Oct 15 19:35:20 UTC 2024


On Tue, 15 Oct 2024 18:41:59 GMT, Ben Perez <bperez at openjdk.org> wrote:

>> Java implementation of ML-DSA, the FIPS 204 post-quantum signature scheme https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.204.pdf. Depends on https://github.com/openjdk/jdk/pull/21167
>
> Ben Perez has updated the pull request incrementally with one additional commit since the last revision:
> 
>   pack in-place and unpack with an offset

src/java.base/share/classes/sun/security/provider/ML_DSA.java line 668:

> 666:         int[][] t1Hat = vectorConstMul(1 << mlDsa_d, pk.t1());
> 667:         mlDsaVectorNtt(t1Hat);
> 668:         int[][] wApprox = vectorSub(aHatZ,nttConstMultiply(cHat, t1Hat));

Suggestion:

        int[][] wApprox = vectorSub(aHatZ, nttConstMultiply(cHat, t1Hat));

src/java.base/share/classes/sun/security/provider/ML_DSA.java line 1145:

> 1143: 
> 1144:     private boolean[][] makeHint(int[][] z, int[][] r) {
> 1145:         int[][] v1 = vectorAdd(r,z);

Suggestion:

        int[][] v1 = vectorAdd(r, z);

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21364#discussion_r1801804649
PR Review Comment: https://git.openjdk.org/jdk/pull/21364#discussion_r1801804993


More information about the security-dev mailing list