public interface SignatureECDSA extends Signature
This interface is a slimmed down and specialized (on RSA) version
of Signature
.
It will be used by the library to check the server's signature
during key exchange, and to prove our own possession of the
private key for public-key authentication in the default Identity
implementation.
The library will choose the implementation class by the configuration
option signature.ecdsa
, and instantiate it using the no-argument
constructor. For signature checking, the usage would look like this:
sig = class.newInstance(); sig.init(); sig.setPubKey(r, s); sig.update(H); // maybe more than once boolean ok = sig.verify(sig_of_H);
For signing, the usage would look like this:
sig = class.newInstance(); sig.init(); sig.setPrvKey(prvKey); sig.update(H); // maybe more than once byte[] sig_of_H = sig.sign();
The library contains a default implementation based on
Signature
.
SignatureDSA
Modifier and Type | Method and Description |
---|---|
void |
setPrvKey(byte[] s)
Sets the private key to be used for signing.
|
void |
setPubKey(byte[] r,
byte[] s)
Sets the public key to be used for signature verification.
|
This is an inofficial Javadoc created by PaĆlo Ebermann. Have a look at the official homepage.