COM.claymoresystems.provider
public class RSASignature extends Signature implements Blindable
We assume that we already have an RSAEncryption primitive floating around.
Constructor Summary | |
---|---|
RSASignature() |
Method Summary | |
---|---|
protected Object | engineGetParameter(String param)
SPI: There aren't any parameters |
protected void | engineInitSign(PrivateKey key) SPI: Initializes this object for signing
using the private key |
protected void | engineInitVerify(PublicKey key) SPI: Initializes this object for verification
using the given key |
protected void | engineSetParameter(String param, Object value)
SPI: There aren't any parameters |
protected byte[] | engineSign() SPI: Sign the input |
protected void | engineUpdate(byte b) SPI: Single byte updates are forbidden |
protected void | engineUpdate(byte[] b, int off, int len) SPI: Updates the data. |
protected boolean | engineVerify(byte[] signature) SPI: Verify the input |
void | setBlindingInfo(SecureRandom rng, CryptixRSAPublicKey pubKey)
set the RNG for blinding
|
protected byte[] | sigToBytes(BigInteger num) |
Parameters: key the private key
Throws: InvalidKeyException if the key class doesn't implement than CryptixRSAPrivateKey
Parameters: key the public key
Throws: InvalidKeyException if the key class doesn't implement CryptixRSAPublicKey
Returns: a signature as a byte string
Throws: SignatureException bad input
Throws: SignatureException if you do a single byte update
Parameters: b the buffer containing the data off the offset into the buffer len the length
Throws: SignatureException either if the algorithm was improperly initialized or you try to call update more than once
Returns: true or false
Throws: SignatureException bad input
Parameters: rng a secure RNG