On Fri, 14 Feb 2025 18:44:38 GMT, Anthony Scarpino <ascarp...@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

src/java.base/share/classes/sun/security/util/KeyUtil.java line 180:

> 178:      If the key is a sub-algorithm of a larger group of algorithms, this 
> method
> 179:      will return that sub-algorithm.  For example, key.getAlgorithm() 
> returns
> 180:      "EdDSA", but the underlying key maybe "Ed448".  For

s/maybe/may be/

src/java.base/share/classes/sun/security/util/KeyUtil.java line 184:

> 182:      "EdDSA" means all curves for DAC, but when using it with
> 183:      KeyPairGenerator, EdDSA means Ed25519.
> 184:      */

Use the common form for comments here, i.e.:


/**
 * ...
 */

src/java.base/share/classes/sun/security/util/KeyUtil.java line 189:

> 187:             case EdECKey ed -> ed.getParams().getName();
> 188:             case XECKey xe -> ((NamedParameterSpec) 
> xe.getParams()).getName();
> 189:             default -> key.getAlgorithm();

Do you also want to add cases for ML-KEM and ML-DSA keys?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23647#discussion_r1963656076
PR Review Comment: https://git.openjdk.org/jdk/pull/23647#discussion_r1963654110
PR Review Comment: https://git.openjdk.org/jdk/pull/23647#discussion_r1963654898

Reply via email to