|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.security.SignatureSpi
|
+--de.flexiprovider.api.Signature
|
+--de.flexiprovider.pqc.ots.lm.LMOTSSignature
This Class is used for generating and verifying Signatures according to the LMOTS Signature Scheme defined in the Paper "Asymptotically Efficient Lattice-Based Digital Signatures" by Vadim Lyubashevsky and Daniele Micciancio.
See Page 10 and 11 of the Paper for the algorithm step by step.
| Inner Class Summary | |
static class |
LMOTSSignature.GENERIC
LMOTS Signature with any hash function |
static class |
LMOTSSignature.RIPEMD128
LMOTS Signature with RIPEMD128 |
static class |
LMOTSSignature.RIPEMD160
LMOTS Signature with RIPEMD160 |
static class |
LMOTSSignature.RIPEMD256
LMOTS Signature with RIPEMD256 |
static class |
LMOTSSignature.RIPEMD320
LMOTS Signature with RIPEMD320 |
static class |
LMOTSSignature.SHA1
LMOTS Signature with SHA1 |
static class |
LMOTSSignature.SHA224
LMOTS Signature with SHA224 |
static class |
LMOTSSignature.SHA256
LMOTS Signature with SHA256 |
static class |
LMOTSSignature.SHA384
LMOTS Signature with SHA384 |
static class |
LMOTSSignature.SHA512
LMOTS Signature with SHA512 |
| Fields inherited from class java.security.SignatureSpi |
appRandom |
| Constructor Summary | |
protected |
LMOTSSignature(MessageDigest md)
Constructor. |
| Method Summary | |
int |
getSignatureLength()
|
GFP32Polynomial |
hashSignature(byte[] signature)
Hashes the LMOTS Signature as specified in LMOTSSignature |
void |
initSign(PrivateKey privKey,
SecureRandom random)
Initialize the signature algorithm for signing a message. |
void |
initVerify(PublicKey pubKey)
Initialize the signature algorithm for verifying a signature. |
void |
setMessage(byte[] message)
|
void |
setParameters(AlgorithmParameterSpec params)
Initialize this signature engine with the specified parameter set |
byte[] |
sign()
Sign a message. |
void |
update(byte input)
Feed a message byte to the message digest. |
void |
update(byte[] input,
int inOff,
int inLen)
Feed an array of message bytes to the message digest. |
boolean |
verify(byte[] signature)
Verifies the supplied Signature |
| Methods inherited from class de.flexiprovider.api.Signature |
engineGetParameter, engineInitSign, engineInitSign, engineInitVerify, engineSetParameter, engineSetParameter, engineSign, engineUpdate, engineUpdate, engineVerify, engineVerify, initSign, sign, update, verify, verify, verify |
| Methods inherited from class java.security.SignatureSpi |
clone, engineSign |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
protected LMOTSSignature(MessageDigest md)
md - the message digest| Method Detail |
public int getSignatureLength()
public GFP32Polynomial hashSignature(byte[] signature)
LMOTSSignatureGFP32Polynomial of the hashed Signature
public void initSign(PrivateKey privKey,
SecureRandom random)
throws InvalidKeyException
initSign in class SignatureprivKey - the private key of the signerrandom - a source of randomness (not used)InvalidKeyException - if the key is not an instance of LMOTSPrivateKey.
public void initVerify(PublicKey pubKey)
throws InvalidKeyException
initVerify in class SignaturepubKey - the public key of the signer.InvalidKeyException - if the public key is not an instance of
LMOTSPublicKey.public void setMessage(byte[] message)
public void setParameters(AlgorithmParameterSpec params)
throws InvalidAlgorithmParameterException
setParameters in class Signatureparams - the parametersInvalidAlgorithmParameterException - public byte[] sign()
sign in class Signaturepublic void update(byte input)
update in class Signatureinput - the message byteSignatureException -
public void update(byte[] input,
int inOff,
int inLen)
update in class Signatureinput - the array of message bytesinOff - index of message startinLen - number of message bytes
public boolean verify(byte[] signature)
throws SignatureException
verify in class Signaturesignature - the Signature byte arraySignatureException - if the Verification fails
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||