diff --git a/src/java.base/share/classes/javax/crypto/KeyAgreement.java b/src/java.base/share/classes/javax/crypto/KeyAgreement.java
index d82c0d53459be..e833aa62f5eef 100644
--- a/src/java.base/share/classes/javax/crypto/KeyAgreement.java
+++ b/src/java.base/share/classes/javax/crypto/KeyAgreement.java
@@ -659,7 +659,7 @@ public final int generateSecret(byte[] sharedSecret, int offset)
* {@code generateSecret} to change the private information used in
* subsequent operations.
*
- * @param algorithm the requested secret-key algorithm. This is different
+ * @param algorithm the requested secret key algorithm. This is different
* from the {@code KeyAgreement} algorithm provided to the
* {@code getInstance} method. See the SecretKey Algorithms section in the
*
@@ -677,9 +677,9 @@ public final int generateSecret(byte[] sharedSecret, int offset)
* @exception IllegalStateException if this key agreement has not been
* initialized or if {@code doPhase} has not been called to supply the
* keys for all parties in the agreement
- * @exception NoSuchAlgorithmException if the specified secret-key
+ * @exception NoSuchAlgorithmException if the specified secret key
* algorithm is not supported
- * @exception InvalidKeyException if the shared secret-key material cannot
+ * @exception InvalidKeyException if the shared secret key material cannot
* be used to generate a secret key of the specified algorithm (e.g.,
* the key material is too short)
* @spec security/standard-names.html Java Security Standard Algorithm Names
diff --git a/src/java.base/share/classes/javax/crypto/KeyAgreementSpi.java b/src/java.base/share/classes/javax/crypto/KeyAgreementSpi.java
index f0b908c3797b9..84d68a39725cf 100644
--- a/src/java.base/share/classes/javax/crypto/KeyAgreementSpi.java
+++ b/src/java.base/share/classes/javax/crypto/KeyAgreementSpi.java
@@ -205,7 +205,7 @@ protected abstract int engineGenerateSecret(byte[] sharedSecret,
* {@code generateSecret} to change the private information used in
* subsequent operations.
*
- * @param algorithm the requested secret-key algorithm. This is different
+ * @param algorithm the requested secret key algorithm. This is different
* from the {@code KeyAgreement} algorithm provided to the
* {@code getInstance} method. See the SecretKey Algorithms section in the
*
@@ -223,7 +223,7 @@ protected abstract int engineGenerateSecret(byte[] sharedSecret,
* @exception IllegalStateException if this key agreement has not been
* initialized or if {@code doPhase} has not been called to supply the
* keys for all parties in the agreement
- * @exception NoSuchAlgorithmException if the specified secret-key
+ * @exception NoSuchAlgorithmException if the specified secret key
* algorithm is not supported
* @exception InvalidKeyException if the shared secret key material cannot
* be used to generate a secret key of the requested algorithm type (e.g.,