Class LMSSignatureSpi
java.lang.Object
java.security.SignatureSpi
java.security.Signature
org.bouncycastle.pqc.jcajce.provider.lms.LMSSignatureSpi
- Direct Known Subclasses:
LMSSignatureSpi.generic
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class Signature
SIGN, state, UNINITIALIZED, VERIFYFields inherited from class SignatureSpi
appRandom -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLMSSignatureSpi(String algorithm) protectedLMSSignatureSpi(String sigName, Digest digest) -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectengineGetParameter(String param) Deprecated.protected voidengineInitSign(PrivateKey privateKey) protected voidengineInitSign(PrivateKey privateKey, SecureRandom random) protected voidengineInitVerify(PublicKey publicKey) protected voidengineSetParameter(String param, Object value) Deprecated.replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)protected voidprotected byte[]protected voidengineUpdate(byte b) Note the one-time key this signature will use is claimed here, at the first update(), rather than at sign(): getSigner() takes the signing context from the key, which advances its index.protected voidengineUpdate(byte[] b, int off, int len) protected booleanengineVerify(byte[] sigBytes) Methods inherited from class Signature
clone, getAlgorithm, getInstance, getInstance, getInstance, getParameter, getParameters, getProvider, initSign, initSign, initVerify, initVerify, setParameter, setParameter, sign, sign, toString, update, update, update, update, verify, verifyMethods inherited from class SignatureSpi
engineGetParameters, engineSign, engineUpdate, engineVerify
-
Constructor Details
-
LMSSignatureSpi
-
LMSSignatureSpi
-
-
Method Details
-
engineInitVerify
- Specified by:
engineInitVerifyin classSignatureSpi- Throws:
InvalidKeyException
-
engineInitSign
protected void engineInitSign(PrivateKey privateKey, SecureRandom random) throws InvalidKeyException - Overrides:
engineInitSignin classSignatureSpi- Throws:
InvalidKeyException
-
engineInitSign
- Specified by:
engineInitSignin classSignatureSpi- Throws:
InvalidKeyException
-
engineUpdate
Note the one-time key this signature will use is claimed here, at the first update(), rather than at sign(): getSigner() takes the signing context from the key, which advances its index. A Signature that is initialised and updated and then abandoned therefore spends an index without producing a signature. That is the safe direction for a one-time scheme - the alternative risks issuing the same one-time key twice - but it is worth knowing when budgeting a key's usages.- Specified by:
engineUpdatein classSignatureSpi- Throws:
SignatureException
-
engineUpdate
- Specified by:
engineUpdatein classSignatureSpi- Throws:
SignatureException
-
engineSign
- Specified by:
engineSignin classSignatureSpi- Throws:
SignatureException
-
engineVerify
- Specified by:
engineVerifyin classSignatureSpi- Throws:
SignatureException
-
engineSetParameter
- Overrides:
engineSetParameterin classSignatureSpi
-
engineSetParameter
Deprecated.replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)- Specified by:
engineSetParameterin classSignatureSpi
-
engineGetParameter
Deprecated.- Specified by:
engineGetParameterin classSignatureSpi
-