|
|||||||||
| 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.ec.ECDSASignature
This Signature class is used to provide applications the functionality of the digital signature algorithm ECDSA. Digital signatures are used for authentication and integrity assurance of digital data.
A Signature object can be used to generate and verify digital signatures. This specific signature ECDSA is based on the discrete logarithm problem in a group of points of an elliptic curve over a primefield GF(q), where q is the prime and GF is a common synonym for a galois field. For a description of the signing and verifying procedure see the documentation of this package.
ECPublicKey,
ECPrivateKey,
CurveParams| Inner Class Summary | |
static class |
ECDSASignature.Raw
ECDSA without message digest |
static class |
ECDSASignature.SHA1
ECDSA with SHA1 |
static class |
ECDSASignature.SHA224
ECDSA with SHA224 |
static class |
ECDSASignature.SHA256
ECDSA with SHA256 |
static class |
ECDSASignature.SHA384
ECDSA with SHA384 |
static class |
ECDSASignature.SHA512
ECDSA with SHA512 |
| Fields inherited from class java.security.SignatureSpi |
appRandom |
| Constructor Summary | |
protected |
ECDSASignature(MessageDigest md)
Constructor. |
| Method Summary | |
void |
initSign(PrivateKey privateKey,
SecureRandom random)
Initializes this signature object with the specified private key and source of randomness for signing operations. |
void |
initVerify(PublicKey publicKey)
Initializes this object for verification. |
void |
setParameters(AlgorithmParameterSpec params)
Initialize this signature engine with the specified parameter set. |
byte[] |
sign()
Return the signature of all the data updated so far. |
void |
update(byte input)
Updates the data to be signed or verified using the specified byte. |
void |
update(byte[] input,
int offset,
int length)
Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset. |
boolean |
verify(byte[] sigBytes)
Verify the passed-in 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 ECDSASignature(MessageDigest md)
md - the message digest| Method Detail |
public void initSign(PrivateKey privateKey,
SecureRandom random)
throws InvalidKeyException
initSign in class SignatureprivateKey - the private key of the identity whose signature is going
to be signed.random - the source of randomnessInvalidKeyException - If privateKey is an invalid key (invalid
encoding, wrong length, uninitialized, etc).
public void initVerify(PublicKey publicKey)
throws InvalidKeyException
initVerify in class SignaturepublicKey - the public key of the identity whose signature is going to
be verified.InvalidKeyException - If publicKey is an invalid key (invalid
encoding, wrong length, uninitialized, etc).
public void setParameters(AlgorithmParameterSpec params)
throws InvalidParameterException
setParameters in class Signatureparams - the parametersInvalidParameterException - if the given parameters are inappropriate for this
signature enginepublic void update(byte input)
update in class Signatureinput - the byte to be updated.
public void update(byte[] input,
int offset,
int length)
update in class Signatureinput - the array of bytes.offset - the offset to start from in the array of bytes.length - the number of bytes to use, starting at offset.public byte[] sign()
sign in class Signature
public boolean verify(byte[] sigBytes)
throws SignatureException
verify in class SignaturesigBytes - the signature to be verifiedSignatureException - if this signature object is not initialized properly.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||