RFR: JDK-8338587 - Internal XOF Methods for SHAKE128 and SHAKE256 [v3]

Andrey Turbanov aturbanov at openjdk.org
Tue Aug 27 12:52:07 UTC 2024


On Tue, 27 Aug 2024 12:35:24 GMT, Ferenc Rakoczi <duke at openjdk.org> wrote:

>> In preparation for the new PQC algorithms implementations, internal XOF (eXtendable Output Function) methods are added to the SHAKE128 and SHAKE256 implementations.
>
> Ferenc Rakoczi has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fixed comment, added test contributed by Weijun

src/java.base/share/classes/sun/security/provider/SHA3.java line 441:

> 439:     }
> 440: 
> 441:     public static abstract class SHA3XOF extends SHA3 {

let's use blessed modifiers order
Suggestion:

    public abstract static class SHA3XOF extends SHA3 {

src/java.base/share/classes/sun/security/provider/SHA3.java line 446:

> 444:         }
> 445:         public void update(byte in) {
> 446:             if (squeezeOffset  != -1) {

Suggestion:

            if (squeezeOffset != -1) {

src/java.base/share/classes/sun/security/provider/SHA3.java line 452:

> 450:         }
> 451:         public void update(byte[] in, int off, int len) {
> 452:             if (squeezeOffset  != -1) {

Suggestion:

            if (squeezeOffset != -1) {

src/java.base/share/classes/sun/security/provider/SHA3.java line 459:

> 457: 
> 458:         public void update(byte[] in) {
> 459:             if (squeezeOffset  != -1) {

Suggestion:

            if (squeezeOffset != -1) {

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20631#discussion_r1732789842
PR Review Comment: https://git.openjdk.org/jdk/pull/20631#discussion_r1732790433
PR Review Comment: https://git.openjdk.org/jdk/pull/20631#discussion_r1732790658
PR Review Comment: https://git.openjdk.org/jdk/pull/20631#discussion_r1732790854



More information about the security-dev mailing list