Class SignatureSpi
java.lang.Object
java.security.SignatureSpi
org.bouncycastle.jcajce.provider.asymmetric.compositesignatures.SignatureSpi
- Direct Known Subclasses:
SignatureSpi.Falcon512_ECDSA_brainpoolP256r1_SHA256
,SignatureSpi.Falcon512_ECDSA_P256_SHA256
,SignatureSpi.Falcon512_Ed25519_SHA512
,SignatureSpi.MLDSA44_ECDSA_brainpoolP256r1_SHA256
,SignatureSpi.MLDSA44_ECDSA_P256_SHA256
,SignatureSpi.MLDSA44_Ed25519_SHA512
,SignatureSpi.MLDSA44_RSA2048_PKCS15_SHA256
,SignatureSpi.MLDSA44_RSA2048_PSS_SHA256
,SignatureSpi.MLDSA65_ECDSA_brainpoolP256r1_SHA512
,SignatureSpi.MLDSA65_ECDSA_P256_SHA512
,SignatureSpi.MLDSA65_Ed25519_SHA512
,SignatureSpi.MLDSA65_RSA3072_PKCS15_SHA512
,SignatureSpi.MLDSA65_RSA3072_PSS_SHA512
,SignatureSpi.MLDSA87_ECDSA_brainpoolP384r1_SHA512
,SignatureSpi.MLDSA87_ECDSA_P384_SHA512
,SignatureSpi.MLDSA87_Ed448_SHA512
Signature class for composite signatures. Selected algorithm is set by the "subclasses" at the end of this file.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
static final class
static final class
static final class
static final class
static final class
static final class
static final class
static final class
static final class
static final class
static final class
static final class
static final class
static final class
-
Field Summary
Fields inherited from class java.security.SignatureSpi
appRandom
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
protected AlgorithmParameters
protected void
engineInitSign
(PrivateKey privateKey) protected void
engineInitVerify
(PublicKey publicKey) protected void
engineSetParameter
(String s, Object o) protected void
engineSetParameter
(AlgorithmParameterSpec algorithmParameterSpec) protected byte[]
Method which calculates each component signature and constructs a composite signature which is a sequence of BIT STRINGs https://www.ietf.org/archive/id/draft-ounsworth-pq-composite-sigs-13.html#name-compositesignaturevalueprotected void
engineUpdate
(byte b) protected void
engineUpdate
(byte[] bytes, int off, int len) protected boolean
engineVerify
(byte[] signature) Corresponding verification method to the engineSign method.Methods inherited from class java.security.SignatureSpi
clone, engineInitSign, engineSign, engineUpdate, engineVerify
-
Method Details
-
engineInitVerify
- Specified by:
engineInitVerify
in classSignatureSpi
- Throws:
InvalidKeyException
-
engineInitSign
- Specified by:
engineInitSign
in classSignatureSpi
- Throws:
InvalidKeyException
-
engineUpdate
- Specified by:
engineUpdate
in classSignatureSpi
- Throws:
SignatureException
-
engineUpdate
- Specified by:
engineUpdate
in classSignatureSpi
- Throws:
SignatureException
-
engineSign
Method which calculates each component signature and constructs a composite signature which is a sequence of BIT STRINGs https://www.ietf.org/archive/id/draft-ounsworth-pq-composite-sigs-13.html#name-compositesignaturevalue- Specified by:
engineSign
in classSignatureSpi
- Returns:
- composite signature bytes
- Throws:
SignatureException
-
engineVerify
Corresponding verification method to the engineSign method. The composite signature is valid if and only if all component signatures are valid. The method verifies all component signatures even if it is already known that the composite signature is invalid.- Specified by:
engineVerify
in classSignatureSpi
- Parameters:
signature
- the signature bytes to be verified.- Returns:
- Throws:
SignatureException
-
engineSetParameter
protected void engineSetParameter(AlgorithmParameterSpec algorithmParameterSpec) throws InvalidAlgorithmParameterException - Overrides:
engineSetParameter
in classSignatureSpi
- Throws:
InvalidAlgorithmParameterException
-
engineSetParameter
- Specified by:
engineSetParameter
in classSignatureSpi
- Throws:
InvalidParameterException
-
engineGetParameter
- Specified by:
engineGetParameter
in classSignatureSpi
- Throws:
InvalidParameterException
-
engineGetParameters
- Overrides:
engineGetParameters
in classSignatureSpi
-