org.bouncycastle.crypto.generators
Class RSABlindingFactorGenerator
java.lang.Object
org.bouncycastle.crypto.generators.RSABlindingFactorGenerator
public class RSABlindingFactorGenerator
- extends java.lang.Object
Generate a random factor suitable for use with RSA blind signatures
as outlined in Chaum's blinding and unblinding as outlined in
"Handbook of Applied Cryptography", page 475.
Field Summary |
private RSAKeyParameters |
key
|
private static java.math.BigInteger |
ONE
|
private java.security.SecureRandom |
random
|
private static java.math.BigInteger |
ZERO
|
Method Summary |
java.math.BigInteger |
generateBlindingFactor()
Generate a suitable blind factor for the public key the generator was initialised with. |
void |
init(CipherParameters param)
Initialise the factor generator |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZERO
private static java.math.BigInteger ZERO
ONE
private static java.math.BigInteger ONE
key
private RSAKeyParameters key
random
private java.security.SecureRandom random
RSABlindingFactorGenerator
public RSABlindingFactorGenerator()
init
public void init(CipherParameters param)
- Initialise the factor generator
- Parameters:
param
- the necessary RSA key parameters.
generateBlindingFactor
public java.math.BigInteger generateBlindingFactor()
- Generate a suitable blind factor for the public key the generator was initialised with.
- Returns:
- a random blind factor