|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.bouncycastle.crypto.engines.RSABlindingEngine
public class RSABlindingEngine
This does your basic RSA Chaum's blinding and unblinding as outlined in "Handbook of Applied Cryptography", page 475. You need to use this if you are trying to get another party to generate signatures without them being aware of the message they are signing.
| Field Summary | |
|---|---|
private java.math.BigInteger |
blindingFactor
|
private RSACoreEngine |
core
|
private boolean |
forEncryption
|
private RSAKeyParameters |
key
|
| Constructor Summary | |
|---|---|
RSABlindingEngine()
|
|
| Method Summary | |
|---|---|
private java.math.BigInteger |
blindMessage(java.math.BigInteger msg)
|
int |
getInputBlockSize()
Return the maximum size for an input block to this engine. |
int |
getOutputBlockSize()
Return the maximum size for an output block to this engine. |
void |
init(boolean forEncryption,
CipherParameters param)
Initialise the blinding engine. |
byte[] |
processBlock(byte[] in,
int inOff,
int inLen)
Process a single block using the RSA blinding algorithm. |
private java.math.BigInteger |
unblindMessage(java.math.BigInteger blindedMsg)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private RSACoreEngine core
private RSAKeyParameters key
private java.math.BigInteger blindingFactor
private boolean forEncryption
| Constructor Detail |
|---|
public RSABlindingEngine()
| Method Detail |
|---|
public void init(boolean forEncryption,
CipherParameters param)
init in interface AsymmetricBlockCipherforEncryption - true if we are encrypting (blinding), false otherwise.param - the necessary RSA key parameters.public int getInputBlockSize()
getInputBlockSize in interface AsymmetricBlockCipherpublic int getOutputBlockSize()
getOutputBlockSize in interface AsymmetricBlockCipher
public byte[] processBlock(byte[] in,
int inOff,
int inLen)
processBlock in interface AsymmetricBlockCipherin - the input array.inOff - the offset into the input buffer where the data starts.inLen - the length of the data to be processed.
DataLengthException - the input block is too large.private java.math.BigInteger blindMessage(java.math.BigInteger msg)
private java.math.BigInteger unblindMessage(java.math.BigInteger blindedMsg)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||