|
|||||||||
| 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.tss.TSS
| Inner Class Summary | |
static class |
TSS.RIPEMD128
TSS with RIPEMD128 |
static class |
TSS.RIPEMD160
TSS with RIPEMD160 |
static class |
TSS.RIPEMD256
TSS with RIPEMD256 |
static class |
TSS.RIPEMD320
TSS with RIPEMD320 |
static class |
TSS.SHA1
TSS with SHA1 |
static class |
TSS.SHA224
TSS with SHA224 |
static class |
TSS.SHA256
TSS with SHA256 |
static class |
TSS.SHA384
TSS with SHA384 |
static class |
TSS.SHA512
TSS with SHA512 |
| Field Summary | |
protected TSSHashFunction |
hashFunction
the hash-function described in the document |
protected int |
m
|
protected MessageDigest |
messageDigest
the message-digest used for the hashfunction |
protected int |
n
|
protected long |
p
|
| Fields inherited from class java.security.SignatureSpi |
appRandom |
| Constructor Summary | |
protected |
TSS(MessageDigest md)
|
| Method Summary | |
java.util.Vector |
addGFPVector(java.util.Vector a,
java.util.Vector b)
Adds two Vectors of TSSPolynomial by adding the Polynomials in
each Vector. |
long[] |
binary2ternary(byte[] binary)
|
boolean |
checkBound(long[] arr,
long bound)
Checks if all of the values in the given array are smaller or equal the defined boundary |
boolean |
checkBound(java.util.Vector v,
long bound)
Checks if all of the values in the contained arrays are smaller or equal bound |
static int |
floor2Log(int i)
|
java.util.Vector |
getPolyVector(int limit,
int amount)
returns a Vector of TSSPolynomials |
void |
initSign(PrivateKey privKey,
SecureRandom random)
Initialize the signature with the specified private key and source of randomness for signing operations. |
void |
initVerify(PublicKey pubKey)
Initialize the signature with the specified public key for verification operations. |
TSSPolynomial |
oracle(TSSPolynomial gfp,
byte[] b)
returns a pseudo random TSSPolynomial with values <= |1| |
void |
setParameters(AlgorithmParameterSpec params)
Initialize the signature with the specified parameters. |
byte[] |
sign()
Return the signature of all the data updated so far. |
void |
update(byte input)
Update the data to be signed or verified using the specified byte. |
void |
update(byte[] input,
int inOff,
int inLen)
Update the data to be signed or verified, using the specified byte array of the specified length, starting at the specified offset. |
boolean |
verify(byte[] signature)
Verify the passed-in signature of the specified message. |
| 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 |
protected MessageDigest messageDigest
protected TSSHashFunction hashFunction
protected int n
protected int m
protected long p
| Constructor Detail |
protected TSS(MessageDigest md)
| Method Detail |
public static int floor2Log(int i)
public java.util.Vector addGFPVector(java.util.Vector a,
java.util.Vector b)
TSSPolynomial by adding the Polynomials in
each Vector. The Polynomial in Vector @a at position i is added to the
Polynomial in Vector @b at position i. If one Vector is larger than the
other, then the excess Polynomials of the larger Vector are not modified
(Zero Poly added).a - Vector containing TSSPolynomialb - Vector containing TSSPolynomialpublic long[] binary2ternary(byte[] binary)
public boolean checkBound(long[] arr,
long bound)
arr - bound -
public boolean checkBound(java.util.Vector v,
long bound)
v - a Vector containing long[]bound -
public java.util.Vector getPolyVector(int limit,
int amount)
TSSPolynomialslimit - the limit of the elements in the polynomials (eg: 2 to receive
polynomials with the values {-1, 0, 1})amount - the amount of Polynomials in the vector
public void initSign(PrivateKey privKey,
SecureRandom random)
throws InvalidKeyException
SignatureinitSign in class Signaturede.flexiprovider.api.SignatureprivKey - the private key of the identity whose signature will be
generated.random - the source of randomnessInvalidKeyException - if the key is invalid for initializing the signature.
public void initVerify(PublicKey pubKey)
throws InvalidKeyException
SignatureinitVerify in class Signaturede.flexiprovider.api.SignaturepubKey - the public key of the identity whose signature is going to
be verifiedInvalidKeyException - if the key is invalid for initializing the signature.
public TSSPolynomial oracle(TSSPolynomial gfp,
byte[] b)
TSSPolynomial with values <= |1|u - the input byte array for which to create the pseudo random
outputTSSPolynomialjava.io.IOException - codec.asn1.ASN1Exception -
public void setParameters(AlgorithmParameterSpec params)
throws InvalidAlgorithmParameterException
SignaturesetParameters in class Signaturede.flexiprovider.api.Signatureparams - the parametersInvalidAlgorithmParameterException - if the given parameters are inappropriate for this
signature.public byte[] sign()
Signaturesign in class Signaturede.flexiprovider.api.SignatureSignatureException - if the engine is not initialized properly.
public void update(byte input)
throws SignatureException
Signatureupdate in class Signaturede.flexiprovider.api.Signatureinput - the data byteSignatureException - if the engine is not initialized properly.
public void update(byte[] input,
int inOff,
int inLen)
throws SignatureException
Signatureupdate in class Signaturede.flexiprovider.api.Signatureinput - the data byte arrayinOff - the offset to start from in the array of bytesinLen - the number of bytes to use, starting at inOffSignatureException - if the engine is not initialized properly
public boolean verify(byte[] signature)
throws SignatureException
Signatureverify in class Signaturede.flexiprovider.api.Signaturesignature - the signatureSignatureException - if the engine is not initialized properly or the
passed-in signature is improperly encoded or of the wrong
type.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||