|
|||||||||
| 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.ecc.niederreiter.NiederreiterCFSSignature
This class implements the NiederreiterCFS signature scheme (N. Courtois, M. Finiasz, N. Sendrier, "How to achieve a McEliece-based Digital Signature Scheme", in Advances in Cryptology - ASIACRYPT 2001, vol. 2248, pp. 157-174).
The NiederreiterCFSSignature can be used as follows:
Signature generation:
Signature verification:
| Field Summary | |
static java.lang.String |
OID
The OID of the algorithm. |
| Fields inherited from class java.security.SignatureSpi |
appRandom |
| Constructor Summary | |
NiederreiterCFSSignature()
Constructor. |
|
| Method Summary | |
void |
initSign(PrivateKey key,
SecureRandom random)
Initialize the signature algorithm for signing a message. |
void |
initVerify(PublicKey key)
Initialize the signature algorithm for verifying a signature. |
void |
setParameters(AlgorithmParameterSpec params)
Set parameters for the this signature. |
byte[] |
sign()
Sign a message. |
void |
update(byte data)
Feed a message byte to the message digest. |
void |
update(byte[] data,
int off,
int length)
Feed message bytes to the message digest. |
boolean |
verify(byte[] signature)
Verify a 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 |
|
| Field Detail |
public static final java.lang.String OID
| Constructor Detail |
public NiederreiterCFSSignature()
RIPEMD160).| Method Detail |
public void initSign(PrivateKey key,
SecureRandom random)
throws InvalidKeyException
initSign in class Signaturekey - the private key of the signerrandom - a source of randomness (not used)InvalidKeyException - if the key is not an instance of
NiederreiterPrivateKey.
public void initVerify(PublicKey key)
throws InvalidKeyException
initVerify in class Signaturekey - the public key of the signerInvalidKeyException - if the public key is not an instance of
NiederreiterPublicKey.public void setParameters(AlgorithmParameterSpec params)
setParameters in class Signatureparams - the parameters (not used)public void update(byte data)
update in class Signaturedata - array of message bytes
public void update(byte[] data,
int off,
int length)
update in class Signaturedata - array of message bytesoff - index of message startlength - number of message bytespublic byte[] sign()
sign in class Signaturepublic boolean verify(byte[] signature)
verify in class Signaturesignature - the signature to be verified
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||