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

Artur Barashev abarashev at openjdk.org
Tue Feb 25 14:49:01 UTC 2025


On Mon, 24 Feb 2025 21:25:48 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 two additional commits since the last revision:
> 
>  - undo comment
>  - review comments and remove aliases

src/java.base/share/classes/sun/security/util/AbstractAlgorithmConstraints.java line 92:

> 90:             if (algorithm.equalsIgnoreCase(a)) {
> 91:                 return false;
> 92:             }

We already do case-insensitive match here because `algorithms` is a case-insensitive TreeMap constructed above in `getAlgorithms()`. Existing code is also faster because it's a tree lookup instead of a linear iteration. This whole file can stay unchanged if we removed aliases already.

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

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


More information about the security-dev mailing list