Class DilithiumSignature

java.lang.Object
java.security.SignatureSpi
com.ibm.crypto.hdwrCCA.provider.DilithiumSignature

@Deprecated(since="21.0.11.0", forRemoval=true) public class DilithiumSignature extends SignatureSpi
Deprecated, for removal: This API element is subject to removal in a future version.
Replaced by ML-DSA implementation. This CRYSTALS-Dilithium 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-DSA standards.
This class is a concrete implementation for CRYSTALS-Dilithium signing.
See Also:
  • Field Summary

    Fields inherited from class java.security.SignatureSpi

    appRandom
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a new instance of this class.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Object
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the value of the specified algorithm parameter.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Initialize the signature object with a CRYSTALS-Dilithium private key.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Initialize the signature object with a Dilithium public key.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the specified algorithm parameter to the specified value.
    protected byte[]
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the signature bytes of all the data updated so far.
    protected void
    engineUpdate(byte b)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Updates the data to be signed or verified using the specified byte.
    protected void
    engineUpdate(byte[] b, int off, int len)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.
    protected boolean
    engineVerify(byte[] sigBytes)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Verifies the passed-in signature.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DilithiumSignature

      public DilithiumSignature()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new instance of this class.
  • Method Details

    • engineInitVerify

      protected void engineInitVerify(PublicKey publicKey) throws InvalidKeyException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Initialize the signature object with a Dilithium public key.
      Specified by:
      engineInitVerify in class SignatureSpi
      Parameters:
      publicKey - the Dilithium public key
      Throws:
      InvalidKeyException - if publicKey is not a valid CRYSTALS-Dilithium public key.
    • engineInitSign

      protected void engineInitSign(PrivateKey privateKey) throws InvalidKeyException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Initialize the signature object with a CRYSTALS-Dilithium private key.
      Specified by:
      engineInitSign in class SignatureSpi
      Parameters:
      privateKey - the Dilithium private key
      Throws:
      InvalidKeyException - if privateKey is not a valid CRYSTALS-Dilithium private key.
    • engineUpdate

      protected void engineUpdate(byte b) throws SignatureException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Updates the data to be signed or verified using the specified byte.
      Specified by:
      engineUpdate in class SignatureSpi
      Parameters:
      b - the byte to use for the update
      Throws:
      SignatureException
    • engineUpdate

      protected void engineUpdate(byte[] b, int off, int len) throws SignatureException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.
      Specified by:
      engineUpdate in class SignatureSpi
      Parameters:
      buff - the array of bytes
      off - the offset to start from in the array of bytes
      len - the number of bytes to use, starting at offset
      Throws:
      SignatureException
    • engineSign

      protected byte[] engineSign() throws SignatureException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the signature bytes of all the data updated so far.
      Specified by:
      engineSign in class SignatureSpi
      Returns:
      the signature bytes of the signing operation's result.
      Throws:
      SignatureException - if the engine is not initialized properly or if this signature algorithm is unable to process the input data provided.
    • engineVerify

      protected boolean engineVerify(byte[] sigBytes) throws SignatureException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Verifies the passed-in signature.
      Specified by:
      engineVerify in class SignatureSpi
      Parameters:
      signature - the signature bytes to be verified
      Returns:
      true if the signature was verified, false if not.
      Throws:
      SignatureException - if the engine is not initialized properly, the passed-in signature is improperly encoded or of the wrong type, if this signature algorithm is unable to process the input data provided, etc.
    • engineSetParameter

      protected void engineSetParameter(String param, Object value) throws InvalidParameterException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the specified algorithm parameter to the specified value. Please note that this method has no meaning for this provider and has been deprecated.
      Specified by:
      engineSetParameter in class SignatureSpi
      Parameters:
      key - the string identifier of the parameter
      param - the parameter value
      Throws:
      UnsupportedOperationException - is always thrown.
      InvalidParameterException
    • engineGetParameter

      protected Object engineGetParameter(String param) throws InvalidParameterException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the value of the specified algorithm parameter. Please note that this method has no meaning for this provider, and has been deprecated.
      Specified by:
      engineGetParameter in class SignatureSpi
      Parameters:
      key - the string name of the parameter
      Throws:
      UnsupportedOperationException - is always thrown.
      InvalidParameterException