RFR: 8346736: Java Security Standard Algorithm Names spec should include key algorithm names

Sean Mullan mullan at openjdk.org
Mon Jan 6 18:37:38 UTC 2025


On Mon, 6 Jan 2025 16:12:36 GMT, Weijun Wang <weijun at openjdk.org> wrote:

> Add links to the new Key Algorithms section in the Java Security Standard Algorithm Names Specification.

src/java.base/share/classes/java/security/Key.java line 123:

> 121:     /**
> 122:      * Returns the standard algorithm name for this key. For
> 123:      * example, "DSA" would indicate that this key is a DSA key.

Suggest changing this to something more commonly in use than "DSA" like "RSA" or "EC".

src/java.base/share/classes/java/security/spec/EncodedKeySpec.java line 81:

> 79:      * <a href="{@docRoot}/../specs/security/standard-names.html#asymmetrickey-algorithms">
> 80:      * Java Security Standard Algorithm Names Specification</a>
> 81:      * for information about standard asymmetric key algorithm names.

Suggest adding an @spec line as in `Key.getAlgorithm()`. Same comment applies to other changes.

src/java.base/share/classes/javax/crypto/KEM.java line 231:

> 229:          *          for information about standard secret key algorithm names.
> 230:          *          Use "Generic" if the output will be used as the input keying
> 231:          *          material of a key derivation function (KDF).

Add link to KDF API?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22929#discussion_r1904474469
PR Review Comment: https://git.openjdk.org/jdk/pull/22929#discussion_r1904490287
PR Review Comment: https://git.openjdk.org/jdk/pull/22929#discussion_r1904493590


More information about the security-dev mailing list