RFR: 8346129: Simplify EdDSA & XDH curve name usage [v4]

Weijun Wang weijun at openjdk.org
Fri Mar 7 19:10:55 UTC 2025


On Wed, 5 Mar 2025 20:20:10 GMT, Anthony Scarpino <ascarpino at openjdk.org> wrote:

>> Hi,
>> 
>> I need a review for the following change. Naming conventions for EdDSA and XDH have inconsistencies between DisabledAlgorithms and KeyPairGenerator. These internal changes help make it more consistent when parsing the actual curve being used vs the broader algorithm name.
>> 
>> thanks
>> 
>> Tony
>
> Anthony Scarpino has updated the pull request incrementally with one additional commit since the last revision:
> 
>   rename getNamedCurveFromKey

src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java line 274:

> 272:                     yield List.of();
> 273:                 }
> 274:                 yield List.of(nc.getNameAndAliases());

Do you want to add `EC` itself to the list? I am asking because for EdDSA you added both the algorithm name and the parameter set name.

src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java line 276:

> 274:                 yield List.of(nc.getNameAndAliases());
> 275:             }
> 276:             default -> List.of(key.getAlgorithm(), KeyUtil.getAlgorithm(key));

What if these 2 are the same string?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23647#discussion_r1985559677
PR Review Comment: https://git.openjdk.org/jdk/pull/23647#discussion_r1985560326


More information about the security-dev mailing list