COM.claymoresystems.provider
Class RSASignature
Signature
COM.claymoresystems.provider.RSASignature
- Blindable
public class RSASignature
extends Signature
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.
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)
|
RSASignature
public RSASignature()
engineGetParameter
protected Object engineGetParameter(String param)
throws InvalidParameterException
SPI: There aren't any parameters
engineInitSign
protected void engineInitSign(PrivateKey key)
throws InvalidKeyException
SPI: Initializes this object for signing
using the private key
engineInitVerify
protected void engineInitVerify(PublicKey key)
throws InvalidKeyException
SPI: Initializes this object for verification
using the given key
engineSetParameter
protected void engineSetParameter(String param,
Object value)
throws InvalidParameterException
SPI: There aren't any parameters
engineSign
protected byte[] engineSign()
throws SignatureException
SPI: Sign the input
- a signature as a byte string
engineUpdate
protected void engineUpdate(byte b)
throws SignatureException
SPI: Single byte updates are forbidden
engineUpdate
protected void engineUpdate(byte[] b,
int off,
int len)
throws SignatureException
SPI: Updates the data. This can
only be called once with a single data value
or we throw an error
b
- the buffer containing the dataoff
- the offset into the bufferlen
- the length
engineVerify
protected boolean engineVerify(byte[] signature)
throws SignatureException
SPI: Verify the input
setBlindingInfo
public void setBlindingInfo(SecureRandom rng,
CryptixRSAPublicKey pubKey)
set the RNG for blinding
sigToBytes
protected byte[] sigToBytes(BigInteger num)
Copyright (c) 1999-2001 Claymore Systems, Inc., All Rights Reserved.