Skip to content

Commit 873f8a6

Browse files
jonathan-gibbonsdjelinskihns
committed
8305406: Add @SPEC tags in java.base/java.* (part 2)
Co-authored-by: Daniel Jeliński <djelinski@openjdk.org> Co-authored-by: Hannes Wallnöfer <hannesw@openjdk.org> Reviewed-by: valeriep
1 parent 1476f6c commit 873f8a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+311
-51
lines changed

src/java.base/share/classes/com/sun/crypto/provider/AESKeyWrap.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
* <a href=https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-38F.pdf>
3838
* "Recommendation for Block Cipher Modes of Operation: Methods for Key Wrapping"</a>
3939
* and represents AES cipher in KW mode.
40+
*
41+
* @spec https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-38F.pdf
42+
* Recommendation for Block Cipher Modes of Operation: Methods for Key Wrapping
4043
*/
4144
class AESKeyWrap extends FeedbackCipher {
4245

src/java.base/share/classes/com/sun/crypto/provider/AESKeyWrapPadded.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
* <a href=https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-38F.pdf>
4040
* "Recommendation for Block Cipher Modes of Operation: Methods for Key Wrapping"</a>
4141
* and represents AES cipher in KWP mode.
42+
*
43+
* @spec https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-38F.pdf
44+
* Recommendation for Block Cipher Modes of Operation: Methods for Key Wrapping
4245
*/
4346
class AESKeyWrapPadded extends FeedbackCipher {
4447

src/java.base/share/classes/com/sun/crypto/provider/KWUtil.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
* This class acts as the base class for AES KeyWrap algorithms as defined
3232
* in <a href=https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-38F.pdf>
3333
* "Recommendation for Block Cipher Modes of Operation: Methods for Key Wrapping"
34+
*
35+
* @spec https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-38F.pdf
36+
* Recommendation for Block Cipher Modes of Operation: Methods for Key Wrapping
3437
*/
3538
class KWUtil {
3639

src/java.base/share/classes/com/sun/crypto/provider/KeyWrapCipher.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
* This class is the impl class for AES KeyWrap algorithms as defined in
3737
* <a href=https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-38F.pdf>
3838
* "Recommendation for Block Cipher Modes of Operation: Methods for Key Wrapping"
39+
*
40+
* @spec https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-38F.pdf
41+
* Recommendation for Block Cipher Modes of Operation: Methods for Key Wrapping
3942
*/
4043
abstract class KeyWrapCipher extends CipherSpi {
4144

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 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
@@ -227,6 +227,9 @@
227227
* Calling {@link SecureRandom#generateSeed(int)} will directly read
228228
* from this system default entropy source.
229229
*
230+
* @spec https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-90Ar1.pdf
231+
* Recommendation for Random Number Generation Using Deterministic Random Bit Generators
232+
*
230233
* @since 9
231234
*/
232235
public class DrbgParameters {

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1996, 2022, 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
@@ -86,6 +86,10 @@
8686
* Security Appendix</a>
8787
* of the <cite>Java Object Serialization Specification</cite> for more information.
8888
*
89+
* @spec serialization/index.html Java Object Serialization Specification
90+
* @spec https://www.rfc-editor.org/info/rfc5280
91+
* RFC 5280: Internet X.509 Public Key Infrastructure Certificate
92+
* and Certificate Revocation List (CRL) Profile
8993
* @see PublicKey
9094
* @see PrivateKey
9195
* @see KeyPair
@@ -124,6 +128,7 @@ public interface Key extends java.io.Serializable {
124128
* Java Security Standard Algorithm Names Specification</a>
125129
* for information about standard key algorithm names.
126130
*
131+
* @spec security/standard-names.html Java Security Standard Algorithm Names
127132
* @return the name of the algorithm associated with this key.
128133
*/
129134
String getAlgorithm();

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 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
@@ -44,6 +44,7 @@
4444
* Security Appendix</a>
4545
* of the <cite>Java Object Serialization Specification</cite> for more information.
4646
*
47+
* @spec serialization/index.html Java Object Serialization Specification
4748
* @see Key
4849
* @see KeyFactory
4950
* @see javax.crypto.spec.SecretKeySpec

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@
140140
* <li>{@link SecureRandomSpi#engineReseed(SecureRandomParameters)}
141141
* </ul>
142142
*
143+
* @spec https://www.rfc-editor.org/info/rfc4086
144+
* RFC 4086: Randomness Requirements for Security
145+
* @spec https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.140-2.pdf
146+
* Security Requirements for Cryptographic Modules
147+
*
143148
* @see java.security.SecureRandomSpi
144149
* @see java.util.Random
145150
*

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ private static String getProviderProperty(String key, Provider provider) {
423423
*
424424
* @return the value of the specified property.
425425
*
426+
* @spec security/standard-names.html Java Security Standard Algorithm Names
426427
* @deprecated This method used to return the value of a proprietary
427428
* property in the master file of the "SUN" Cryptographic Service
428429
* Provider in order to determine how to parse algorithm-specific
@@ -657,6 +658,7 @@ public static Provider getProvider(String name) {
657658
* if the filter is not in the required format
658659
* @throws NullPointerException if filter is {@code null}
659660
*
661+
* @spec security/standard-names.html Java Security Standard Algorithm Names
660662
* @see #getProviders(java.util.Map)
661663
* @since 1.3
662664
*/
@@ -734,6 +736,7 @@ public static Provider[] getProviders(String filter) {
734736
* if the filter is not in the required format
735737
* @throws NullPointerException if filter is {@code null}
736738
*
739+
* @spec security/standard-names.html Java Security Standard Algorithm Names
737740
* @see #getProviders(java.lang.String)
738741
* @since 1.3
739742
*/

src/java.base/share/classes/java/security/cert/CRL.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1998, 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
@@ -56,6 +56,8 @@ public abstract class CRL {
5656
* "{@docRoot}/../specs/security/standard-names.html">
5757
* Java Security Standard Algorithm Names</a> document
5858
* for information about standard CRL types.
59+
*
60+
* @spec security/standard-names.html Java Security Standard Algorithm Names
5961
*/
6062
protected CRL(String type) {
6163
this.type = type;

0 commit comments

Comments
 (0)