java.lang.Object
com.ibm.crypto.hdwrCCA.provider.KyberPrivateKey
- All Implemented Interfaces:
Serializable,Key,PrivateKey,Destroyable
@Deprecated(since="21.0.11.0",
forRemoval=true)
public class KyberPrivateKey
extends Object
implements PrivateKey
Deprecated, for removal: This API element is subject to removal in a future version.
Replaced by ML-KEM implementation. This CRYSTALS-Kyber implementation is
deprecated and will be removed in a future release, in alignment with NIST's
latest recommendations for post-quantum cryptography modernization.
Users should transition to the finalized ML-KEM standards.
A private key for the CRYSTALS-Kyber algorithm.
This key contains a token (which can be either a tokenized representation
of a CLEAR key or a label to the stored key) and attributes
(KeyHWAttributeValues, which include the key type and key usage).
- See Also:
-
Field Summary
Fields inherited from interface java.security.PrivateKey
serialVersionUID -
Constructor Summary
ConstructorsConstructorDescriptionKyberPrivateKey(byte[] keyToken, KyberKeyAttributes keyAttributes) Deprecated, for removal: This API element is subject to removal in a future version.Creates a CRYSTALS-Kyber private hardware key from a keytoken and key attributes. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated, for removal: This API element is subject to removal in a future version.This method is used to delete the PKDS information that is associated with this key object.voiddestroy()Deprecated, for removal: This API element is subject to removal in a future version.Destroy or clear sensitive information contained in this private key.Deprecated, for removal: This API element is subject to removal in a future version.Returns the algorithmbyte[]Deprecated, for removal: This API element is subject to removal in a future version.Returns a clone of the label if the key is in format PKDS, a clone of the token if the key is in format TOKEN.Deprecated, for removal: This API element is subject to removal in a future version.Return the format for this key.Deprecated, for removal: This API element is subject to removal in a future version.Returns the PKDS record label if the key object is a PKDS type of key.byte[]getToken()Deprecated, for removal: This API element is subject to removal in a future version.Returns a clone of the private key token.bytegetType()Deprecated, for removal: This API element is subject to removal in a future version.Return the key Type.bytegetUsage()Deprecated, for removal: This API element is subject to removal in a future version.Return the key Usage.booleanDeprecated, for removal: This API element is subject to removal in a future version.This method is called to determine whether this key object still contains key material.
-
Constructor Details
-
KyberPrivateKey
Deprecated, for removal: This API element is subject to removal in a future version.Creates a CRYSTALS-Kyber private hardware key from a keytoken and key attributes.- Parameters:
keyToken- IBM CCA hardware token for this key. The label must conform to the character restrictions imposed by the platform you are executing on. In addition, when passed to this method as a byte array, it must be encoded using the "8859_1" code page. For example, if the label is "MyLabel" then the correct form for this parameter is "MyLabel".getBytes("8859_1")attribs- indicates the key attributes associated with this key.
-
-
Method Details
-
getAlgorithm
Deprecated, for removal: This API element is subject to removal in a future version.Returns the algorithm- Specified by:
getAlgorithmin interfaceKey- Returns:
- the algorithm
-
getFormat
Deprecated, for removal: This API element is subject to removal in a future version.Return the format for this key.- Specified by:
getFormatin interfaceKey- Returns:
- one of "PKDSLabel", "ICSFToken"
- Throws:
IllegalStateException- if destroy() has been called in this key object
-
getEncoded
public byte[] getEncoded()Deprecated, for removal: This API element is subject to removal in a future version.Returns a clone of the label if the key is in format PKDS, a clone of the token if the key is in format TOKEN.- Specified by:
getEncodedin interfaceKey- Returns:
- PKDS record label or token. If a PKDS record label the bytes will be encoded in 8859_1 encoding.
- Throws:
IllegalStateException- if destroy() has been called in this key object
-
getToken
public byte[] getToken()Deprecated, for removal: This API element is subject to removal in a future version.Returns a clone of the private key token.- Returns:
- the value of keyLabel which is a token or a label. If a PKDS record label the bytes will be encoded in 8859_1 encoding.
- Throws:
IllegalStateException- if destroy() has been called in this key object
-
getLabelString
Deprecated, for removal: This API element is subject to removal in a future version.Returns the PKDS record label if the key object is a PKDS type of key.- Returns:
- The PKDS label. This value will be exactly what is used within the CCA key repository as a label, including trailing blanks.
- Throws:
InvalidKeyException- If the key is not a PKDS type of key.
-
getType
public byte getType()Deprecated, for removal: This API element is subject to removal in a future version.Return the key Type.- Returns:
- byte the value of key Storage Type either KeyHWAttributeValues.PKDS KeyHWAttributeValues.MASTER or KeyHWAttributeValues.CLEAR.
- Throws:
IllegalStateException- if destroy() has been called in this key object
-
getUsage
public byte getUsage()Deprecated, for removal: This API element is subject to removal in a future version.Return the key Usage.- Returns:
- byte the value of key Storage Type
- Throws:
IllegalStateException- if destroy() has been called in this key object
-
deletePKDSEntry
Deprecated, for removal: This API element is subject to removal in a future version.This method is used to delete the PKDS information that is associated with this key object.- Throws:
InvalidKeyException- Key object is not PKDS type.RuntimeException- PKDS label length is incorrectRuntimeException- if the ICSF operation is not successfulIllegalStateException- if destroy() has been called in this key object
-
destroy
Deprecated, for removal: This API element is subject to removal in a future version.Destroy or clear sensitive information contained in this private key. This method destroys data stored in this java object. It does not delete key material from the PKDS.- Specified by:
destroyin interfaceDestroyable- Throws:
DestroyFailedException
-
isDestroyed
public boolean isDestroyed()Deprecated, for removal: This API element is subject to removal in a future version.This method is called to determine whether this key object still contains key material.- Specified by:
isDestroyedin interfaceDestroyable- Returns:
- true if destroy() has been called, otherwise false.
-