Class MLDSAPrivateKeyParameters
java.lang.Object
org.bouncycastle.crypto.params.AsymmetricKeyParameter
org.bouncycastle.crypto.params.MLDSAKeyParameters
org.bouncycastle.crypto.params.MLDSAPrivateKeyParameters
- All Implemented Interfaces:
Destroyable, CipherParameters
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionMLDSAPrivateKeyParameters(MLDSAParameters params, byte[] encoding) MLDSAPrivateKeyParameters(MLDSAParameters params, byte[] rho, byte[] K, byte[] tr, byte[] s1, byte[] s2, byte[] t0, byte[] t1) MLDSAPrivateKeyParameters(MLDSAParameters params, byte[] rho, byte[] K, byte[] tr, byte[] s1, byte[] s2, byte[] t0, byte[] t1, byte[] seed) MLDSAPrivateKeyParameters(MLDSAParameters params, byte[] encoding, MLDSAPublicKeyParameters pubKey) -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Zeroize the secret key material held by this object.byte[]byte[]getK()getParametersWithFormat(int format) Deprecated.intbyte[]Deprecated.UsegetEncoded()instead.byte[]byte[]getRho()byte[]getS1()byte[]getS2()byte[]getSeed()byte[]getT0()byte[]getT1()byte[]getTr()booleanwithPreferredFormat(int format) Return a copy of this key with the given preferred encoding format.Methods inherited from class MLDSAKeyParameters
getParametersMethods inherited from class AsymmetricKeyParameter
isPrivate
-
Field Details
-
BOTH
public static final int BOTH- See Also:
-
SEED_ONLY
public static final int SEED_ONLY- See Also:
-
EXPANDED_KEY
public static final int EXPANDED_KEY- See Also:
-
-
Constructor Details
-
MLDSAPrivateKeyParameters
-
MLDSAPrivateKeyParameters
public MLDSAPrivateKeyParameters(MLDSAParameters params, byte[] rho, byte[] K, byte[] tr, byte[] s1, byte[] s2, byte[] t0, byte[] t1) -
MLDSAPrivateKeyParameters
public MLDSAPrivateKeyParameters(MLDSAParameters params, byte[] rho, byte[] K, byte[] tr, byte[] s1, byte[] s2, byte[] t0, byte[] t1, byte[] seed) -
MLDSAPrivateKeyParameters
public MLDSAPrivateKeyParameters(MLDSAParameters params, byte[] encoding, MLDSAPublicKeyParameters pubKey)
-
-
Method Details
-
getParametersWithFormat
Deprecated.UsewithPreferredFormat(int)instead. -
withPreferredFormat
Return a copy of this key with the given preferred encoding format. The copy holds its own copy of the key material, so destroying either object leaves the other usable.- Parameters:
format- the preferred format:BOTH,SEED_ONLYorEXPANDED_KEY.- Returns:
- a new key object with the given preferred format.
- Throws:
IllegalStateException- if this key has been destroyed, or a seed format is asked for and there is no seed.
-
getPreferredFormat
public int getPreferredFormat() -
getEncoded
public byte[] getEncoded() -
getK
public byte[] getK() -
getPrivateKey
Deprecated.UsegetEncoded()instead. -
getPublicKey
public byte[] getPublicKey() -
getSeed
public byte[] getSeed() -
getPublicKeyParameters
-
getRho
public byte[] getRho() -
getS1
public byte[] getS1() -
getS2
public byte[] getS2() -
getT0
public byte[] getT0() -
getT1
public byte[] getT1() -
getTr
public byte[] getTr() -
destroy
public void destroy()Zeroize the secret key material held by this object. Objects derived from this one, for example throughwithPreferredFormat(int), hold their own copies and are not affected.- Specified by:
destroyin interfaceDestroyable
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyedin interfaceDestroyable
-
withPreferredFormat(int)instead.