|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectjava.security.SignatureSpi
java.security.Signature
COM.claymoresystems.provider.RSASignature
This class implements RSA signature w/ PKCS#1 padding but no DigestInfo encoding because Cryptix doesn't and SSL requires it for Client Auth.
We assume that we already have an RSAEncryption primitive floating around.
| Field Summary |
|---|
| Fields inherited from class java.security.Signature |
|---|
SIGN, state, UNINITIALIZED, VERIFY |
| Fields inherited from class java.security.SignatureSpi |
|---|
appRandom |
| Constructor Summary | |
|---|---|
RSASignature()
|
|
| Method Summary | |
|---|---|
protected java.lang.Object |
engineGetParameter(java.lang.String param)
SPI: There aren't any parameters |
protected void |
engineInitSign(java.security.PrivateKey key)
SPI: Initializes this object for signing using the private key |
protected void |
engineInitVerify(java.security.PublicKey key)
SPI: Initializes this object for verification using the given key |
protected void |
engineSetParameter(java.lang.String param,
java.lang.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(java.security.SecureRandom rng,
CryptixRSAPublicKey pubKey)
set the RNG for blinding |
protected byte[] |
sigToBytes(java.math.BigInteger num)
|
| Methods inherited from class java.security.Signature |
|---|
clone, getAlgorithm, getInstance, getInstance, getInstance, getParameter, getParameters, getProvider, initSign, initSign, initVerify, initVerify, setParameter, setParameter, sign, sign, toString, update, update, update, verify, verify |
| Methods inherited from class java.security.SignatureSpi |
|---|
engineGetParameters, engineInitSign, engineSetParameter, engineSign, engineVerify |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public RSASignature()
| Method Detail |
protected void engineInitVerify(java.security.PublicKey key)
throws java.security.InvalidKeyException
key - the public key
java.security.InvalidKeyException - if the key class doesn't
implement CryptixRSAPublicKey
protected void engineInitSign(java.security.PrivateKey key)
throws java.security.InvalidKeyException
key - the private key
java.security.InvalidKeyException - if the key class doesn't
implement than CryptixRSAPrivateKey
protected void engineUpdate(byte b)
throws java.security.SignatureException
java.security.SignatureException - if you do a single byte update
protected void engineUpdate(byte[] b,
int off,
int len)
throws java.security.SignatureException
b - the buffer containing the dataoff - the offset into the bufferlen - the length
java.security.SignatureException - either if the algorithm
was improperly initialized or you try to call update
more than once
protected byte[] engineSign()
throws java.security.SignatureException
java.security.SignatureException - bad input
protected boolean engineVerify(byte[] signature)
throws java.security.SignatureException
java.security.SignatureException - bad input
public void setBlindingInfo(java.security.SecureRandom rng,
CryptixRSAPublicKey pubKey)
setBlindingInfo in interface Blindablerng - a secure RNG
protected void engineSetParameter(java.lang.String param,
java.lang.Object value)
throws java.security.InvalidParameterException
java.security.InvalidParameterException
protected java.lang.Object engineGetParameter(java.lang.String param)
throws java.security.InvalidParameterException
java.security.InvalidParameterExceptionprotected byte[] sigToBytes(java.math.BigInteger num)
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||