Skip to content

Commit 3bfa952

Browse files
committed
8283795: Add TLSv1.3 and CNSA 1.0 algorithms to implementation requirements
Reviewed-by: jnimeh
1 parent 1ef77cd commit 3bfa952

9 files changed

+43
-14
lines changed

src/java.base/share/classes/java/security/AlgorithmParameters.java

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -48,12 +48,19 @@
4848
* obtained via a call to {@code getEncoded}.
4949
*
5050
* <p> Every implementation of the Java platform is required to support the
51-
* following standard {@code AlgorithmParameters} algorithms:
51+
* following standard {@code AlgorithmParameters} algorithms. For the "EC"
52+
* algorithm, implementations must support the curves in parentheses. For the
53+
* "RSASSA-PSS" algorithm, implementations must support the parameters in
54+
* parentheses.
5255
* <ul>
5356
* <li>{@code AES}</li>
57+
* <li>{@code ChaCha20-Poly1305}</li>
5458
* <li>{@code DESede}</li>
5559
* <li>{@code DiffieHellman}</li>
5660
* <li>{@code DSA}</li>
61+
* <li>{@code EC} (secp256r1, secp384r1)</li>
62+
* <li>{@code RSASSA-PSS} (MGF1 mask generation function and SHA-256 or SHA-384
63+
* hash algorithms)</li>
5764
* </ul>
5865
* These algorithms are described in the <a href=
5966
* "{@docRoot}/../specs/security/standard-names.html#algorithmparameters-algorithms">

src/java.base/share/classes/java/security/KeyFactory.java

+3
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@
7272
* <ul>
7373
* <li>{@code DiffieHellman}</li>
7474
* <li>{@code DSA}</li>
75+
* <li>{@code EC}</li>
7576
* <li>{@code RSA}</li>
77+
* <li>{@code RSASSA-PSS}</li>
78+
* <li>{@code X25519}</li>
7679
* </ul>
7780
* These algorithms are described in the <a href=
7881
* "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms">

src/java.base/share/classes/java/security/KeyPairGenerator.java

+8-4
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,16 @@
113113
* supply their own implementations of key pair generators.
114114
*
115115
* <p> Every implementation of the Java platform is required to support the
116-
* following standard {@code KeyPairGenerator} algorithms and keysizes in
117-
* parentheses:
116+
* following standard {@code KeyPairGenerator} algorithms. For the "EC"
117+
* algorithm, implementations must support the curves in parentheses. For other
118+
* algorithms, implementations must support the key sizes in parentheses.
118119
* <ul>
119-
* <li>{@code DiffieHellman} (1024, 2048, 4096)</li>
120+
* <li>{@code DiffieHellman} (1024, 2048, 3072, 4096)</li>
120121
* <li>{@code DSA} (1024, 2048)</li>
121-
* <li>{@code RSA} (1024, 2048, 4096)</li>
122+
* <li>{@code EC} (secp256r1, secp384r1)</li>
123+
* <li>{@code RSA} (1024, 2048, 3072, 4096)</li>
124+
* <li>{@code RSASSA-PSS} (2048, 3072, 4096)</li>
125+
* <li>{@code X25519}</li>
122126
* </ul>
123127
* These algorithms are described in the <a href=
124128
* "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms">

src/java.base/share/classes/java/security/MessageDigest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -87,6 +87,7 @@
8787
* <ul>
8888
* <li>{@code SHA-1}</li>
8989
* <li>{@code SHA-256}</li>
90+
* <li>{@code SHA-384}</li>
9091
* </ul>
9192
* These algorithms are described in the <a href=
9293
* "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms">

src/java.base/share/classes/java/security/Signature.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,20 @@
100100
* supply their own implementations of digital signature algorithms.
101101
*
102102
* <p> Every implementation of the Java platform is required to support the
103-
* following standard {@code Signature} algorithms:
103+
* following standard {@code Signature} algorithms. For the "RSASSA-PSS"
104+
* algorithm, implementations must support the parameters in parentheses. For
105+
* the "SHA256withECDSA" and "SHA384withECDSA" algorithms, implementations must
106+
* support the curves in parentheses.
104107
* <ul>
108+
* <li>{@code RSASSA-PSS} (MGF1 mask generation function and SHA-256 or SHA-384
109+
* hash algorithms)</li>
105110
* <li>{@code SHA1withDSA}</li>
106111
* <li>{@code SHA256withDSA}</li>
112+
* <li>{@code SHA256withECDSA} (secp256r1)</li>
113+
* <li>{@code SHA384withECDSA} (secp384r1)</li>
107114
* <li>{@code SHA1withRSA}</li>
108115
* <li>{@code SHA256withRSA}</li>
116+
* <li>{@code SHA384withRSA}</li>
109117
* </ul>
110118
* These algorithms are described in the <a href=
111119
* "{@docRoot}/../specs/security/standard-names.html#signature-algorithms">

src/java.base/share/classes/javax/crypto/Cipher.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@
148148
* <li>{@code AES/CBC/PKCS5Padding} (128)</li>
149149
* <li>{@code AES/ECB/NoPadding} (128)</li>
150150
* <li>{@code AES/ECB/PKCS5Padding} (128)</li>
151-
* <li>{@code AES/GCM/NoPadding} (128)</li>
151+
* <li>{@code AES/GCM/NoPadding} (128, 256)</li>
152+
* <li>{@code ChaCha20-Poly1305}</li>
152153
* <li>{@code DESede/CBC/NoPadding} (168)</li>
153154
* <li>{@code DESede/CBC/PKCS5Padding} (168)</li>
154155
* <li>{@code DESede/ECB/NoPadding} (168)</li>

src/java.base/share/classes/javax/crypto/KeyAgreement.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,14 @@
5757
* specific or as specified by the standard key agreement algorithm.
5858
*
5959
* <p> Every implementation of the Java platform is required to support the
60-
* following standard {@code KeyAgreement} algorithm:
60+
* following standard {@code KeyAgreement} algorithms. For the "ECDH"
61+
* algorithm, implementations must support the curves in parentheses.
6162
* <ul>
6263
* <li>{@code DiffieHellman}</li>
64+
* <li>{@code ECDH} (secp256r1, secp384r1)</li>
65+
* <li>{@code X25519}</li>
6366
* </ul>
64-
* This algorithm is described in the <a href=
67+
* These algorithms are described in the <a href=
6568
* "{@docRoot}/../specs/security/standard-names.html#keyagreement-algorithms">
6669
* KeyAgreement section</a> of the
6770
* Java Security Standard Algorithm Names Specification.

src/java.base/share/classes/javax/crypto/KeyGenerator.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@
9696
* following standard {@code KeyGenerator} algorithms with the keysizes in
9797
* parentheses:
9898
* <ul>
99-
* <li>{@code AES} (128)</li>
99+
* <li>{@code AES} (128, 256)</li>
100+
* <li>{@code ChaCha20}</li>
100101
* <li>{@code DESede} (168)</li>
101102
* <li>{@code HmacSHA1}</li>
102103
* <li>{@code HmacSHA256}</li>

src/java.base/share/classes/javax/net/ssl/SSLContext.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@
3939
* secure random bytes.
4040
*
4141
* <p> Every implementation of the Java platform is required to support the
42-
* following standard {@code SSLContext} protocol:
42+
* following standard {@code SSLContext} protocols:
4343
* <ul>
4444
* <li>{@code TLSv1.2}</li>
45+
* <li>{@code TLSv1.3}</li>
4546
* </ul>
46-
* This protocol is described in the <a href=
47+
* These protocols are described in the <a href=
4748
* "{@docRoot}/../specs/security/standard-names.html#sslcontext-algorithms">
4849
* SSLContext section</a> of the
4950
* Java Security Standard Algorithm Names Specification.

0 commit comments

Comments
 (0)