public final class Dilithium extends SignatureSpi
The base signature SPI class for the Dilithium [0] algorithm. It is responsible for signature creation and verification and contains the basic functionality to perform these operations.
References: [0] Bai, Ducas, Kiltz, Lepoint, Lyubashevsky, Schwabe, Seiler and Stehlé: "CRYSTALS-Dilithium" - 8 February, 2021appRandom
Constructor and Description |
---|
Dilithium() |
Modifier and Type | Method and Description |
---|---|
protected Object |
engineGetParameter(String s)
Not Supported
|
protected AlgorithmParameters |
engineGetParameters() |
protected void |
engineInitSign(PrivateKey privateKey) |
protected void |
engineInitSign(PrivateKey privateKey,
SecureRandom random) |
protected void |
engineInitVerify(PublicKey publicKey) |
protected void |
engineSetParameter(AlgorithmParameterSpec parameterSpec)
Call this to change if randomized Signing is used or not
Otherwise the DilithiumAlgorithmParameterSpec has to have the same security level
as the parameters in the private key
|
protected void |
engineSetParameter(String param,
Object o)
Not Supported
|
protected byte[] |
engineSign() |
protected void |
engineUpdate(byte b) |
protected void |
engineUpdate(byte[] bytes,
int off,
int len) |
protected boolean |
engineVerify(byte[] sigBytes) |
clone, engineSign, engineUpdate, engineVerify
protected void engineInitVerify(PublicKey publicKey) throws InvalidKeyException
engineInitVerify
in class SignatureSpi
InvalidKeyException
protected void engineInitSign(PrivateKey privateKey, SecureRandom random) throws InvalidKeyException
engineInitSign
in class SignatureSpi
InvalidKeyException
protected void engineInitSign(PrivateKey privateKey) throws InvalidKeyException
engineInitSign
in class SignatureSpi
InvalidKeyException
protected void engineUpdate(byte b) throws SignatureException
engineUpdate
in class SignatureSpi
SignatureException
protected void engineUpdate(byte[] bytes, int off, int len) throws SignatureException
engineUpdate
in class SignatureSpi
SignatureException
protected byte[] engineSign() throws SignatureException
engineSign
in class SignatureSpi
SignatureException
protected boolean engineVerify(byte[] sigBytes) throws SignatureException
engineVerify
in class SignatureSpi
SignatureException
protected void engineSetParameter(String param, Object o) throws InvalidParameterException
engineSetParameter
in class SignatureSpi
InvalidParameterException
protected void engineSetParameter(AlgorithmParameterSpec parameterSpec) throws InvalidAlgorithmParameterException
engineSetParameter
in class SignatureSpi
parameterSpec
- the parametersInvalidAlgorithmParameterException
- when the AlgorithmParameterSpec is not an instance of
DilithiumAlgorithmParameterSpec or the security levels do not matchprotected Object engineGetParameter(String s) throws InvalidParameterException
engineGetParameter
in class SignatureSpi
InvalidParameterException
protected AlgorithmParameters engineGetParameters()
engineGetParameters
in class SignatureSpi
Copyright © 2020–2023 Stiftung SIC. All rights reserved.