Package com.amazon.corretto.crypto.utils
Class MlDsaUtils
- java.lang.Object
-
- com.amazon.corretto.crypto.utils.MlDsaUtils
-
public final class MlDsaUtils extends java.lang.ObjectPublic utility methods
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]computeMu(java.security.PublicKey publicKey, byte[] message)Computes mu as defined on line 6 of Algorithm 7 and line 7 of Algorithm 8 in NIST FIPS 204.static byte[]expandPrivateKey(java.security.PrivateKey key)Returns an expanded ML-DSA private key, whether the key passed in is based on a seed or expanded.
-
-
-
Method Detail
-
computeMu
public static byte[] computeMu(java.security.PublicKey publicKey, byte[] message)Computes mu as defined on line 6 of Algorithm 7 and line 7 of Algorithm 8 in NIST FIPS 204.See FIPS 204
- Parameters:
publicKey- ML-DSA public keymessage- byte array of the message over which to compute mu- Returns:
- a byte[] of length 64 containing mu
-
expandPrivateKey
public static byte[] expandPrivateKey(java.security.PrivateKey key)
Returns an expanded ML-DSA private key, whether the key passed in is based on a seed or expanded. It returns the PKCS8-encoded expanded key.- Parameters:
key- an ML-DSA private key- Returns:
- a byte[] containing the PKCS8-encoded seed private key
-
-