|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--de.flexiprovider.pqc.hbc.ots.BiBaOTS
This class implements key pair generation and signature generation of the BiBa one-time signature scheme. The class can be used by the CMSS classes.
| Constructor Summary | |
BiBaOTS()
Constructor. |
|
BiBaOTS(java.lang.Integer collisionSize,
java.lang.Integer numberOfBins,
java.lang.Integer numberOfSeals,
java.lang.Integer sealLength)
Initialize the BiBaOTS with desired parameters. |
|
| Method Summary | |
boolean |
canComputeVerificationKeyFromSignature()
Indicates whether the signature scheme supports the computation of the verification key out of the signature. |
byte[] |
computeVerificationKey(byte[] bytes,
byte[] sigBytes)
BiBaOTS can not compute the verification key out of the signature. |
void |
generateKeyPair(byte[] seed)
Generates an OTS key pair using the given seed and the message digest and PRNG specified via init(MessageDigest, PRNG). |
void |
generateSignatureKey(byte[] seed)
Generates the private key and stores it in the privKeyBytes variable. |
void |
generateVerificationKey()
Generates the public key and stores it in the pubKeyBytes variable. |
int |
getSignatureLength()
BiBaOTS has not a constant signature length. |
byte[] |
getVerificationKey()
|
int |
getVerificationKeyLength()
|
void |
init(MessageDigest md,
PRNG rng)
Initializes the OTS. |
byte[] |
sign(byte[] message)
Generates a BiBa One Time Signature for the message according to the previously specified parameters. |
boolean |
verify(byte[] mBytes,
byte[] sBytes,
byte[] pBytes)
Verifies if a signature is valid for the specified message using the specified verification key. |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public BiBaOTS()
public BiBaOTS(java.lang.Integer collisionSize,
java.lang.Integer numberOfBins,
java.lang.Integer numberOfSeals,
java.lang.Integer sealLength)
collisionSize - The collision size (or the number of seals which form a
signature).numberOfBins - Number of bins on which the seals are to be spread.numberOfSeals - Number of seals (determines the length of the keys).sealLength - The length of a seal in bytes. Has impact on the length of
signature and private key.| Method Detail |
public void init(MessageDigest md,
PRNG rng)
init in interface OTSmd - the hash function for the OTSrng - the name of the PRNG used for key pair generationpublic boolean canComputeVerificationKeyFromSignature()
canComputeVerificationKeyFromSignature in interface OTS
public byte[] computeVerificationKey(byte[] bytes,
byte[] sigBytes)
computeVerificationKey in interface OTSpublic void generateKeyPair(byte[] seed)
init(MessageDigest, PRNG).generateKeyPair in interface OTSseed - the seed for the PRGNpublic void generateSignatureKey(byte[] seed)
generateSignatureKey in interface OTSde.flexiprovider.pqc.hbc.ots.OTSseed - the seed for the PRGNpublic void generateVerificationKey()
generateVerificationKey in interface OTSpublic int getSignatureLength()
getSignatureLength in interface OTSpublic byte[] getVerificationKey()
getVerificationKey in interface OTSpublic int getVerificationKeyLength()
getVerificationKeyLength in interface OTSpublic byte[] sign(byte[] message)
sign in interface OTSThe - message to sign.
public boolean verify(byte[] mBytes,
byte[] sBytes,
byte[] pBytes)
verify in interface OTSmBytes - The message whose signature is about to be verified as byte
array.sBytes - The signature for the message as byte array.pBytes - The corresponding verification key as byte array.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||