Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography Library 1.84
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.bouncycastle.crypto.engines
Class RSABlindedEngine

    java.lang.Object
      org.bouncycastle.crypto.engines.RSABlindedEngine

All Implemented Interfaces:
  AsymmetricBlockCipher

public class RSABlindedEngine
extends java.lang.Object
implements AsymmetricBlockCipher

this does your basic RSA algorithm with blinding

Constructor Summary
`RSABlindedEngine()`

Method Summary
`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 parameters)` initialise the RSA engine.
`protected java.security.SecureRandom` | `initSecureRandom(boolean needed, java.security.SecureRandom provided)`
`byte[]` | `processBlock(byte[] in, int inOff, int inLen)` Process a single block using the basic RSA algorithm.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RSABlindedEngine

    public RSABlindedEngine()

Method Detail

### init

    public void init(boolean forEncryption,
                     CipherParameters parameters)

  initialise the RSA engine.

  Specified by:
    `init` in interface `AsymmetricBlockCipher`
  Parameters:
    `forEncryption` - true if we are encrypting, false otherwise.
    `parameters` - the necessary RSA key parameters.

### getInputBlockSize

    public int getInputBlockSize()

  Return the maximum size for an input block to this engine. For RSA this is always one byte less than the key size on encryption, and the same length as the key size on decryption.

  Specified by:
    `getInputBlockSize` in interface `AsymmetricBlockCipher`
  Returns:
    maximum size for an input block.

### getOutputBlockSize

    public int getOutputBlockSize()

  Return the maximum size for an output block to this engine. For RSA this is always one byte less than the key size on decryption, and the same length as the key size on encryption.

  Specified by:
    `getOutputBlockSize` in interface `AsymmetricBlockCipher`
  Returns:
    maximum size for an output block.

### processBlock

    public byte[] processBlock(byte[] in,
                               int inOff,
                               int inLen)

  Process a single block using the basic RSA algorithm.

  Specified by:
    `processBlock` in interface `AsymmetricBlockCipher`
  Parameters:
    `in` - the input array.
    `inOff` - the offset into the input buffer where the data starts.
    `inLen` - the length of the data to be processed.
  Returns:
    the result of the RSA process.
  Throws:
    `DataLengthException` - the input block is too large.

### initSecureRandom

    protected java.security.SecureRandom initSecureRandom(boolean needed,
                                                          java.security.SecureRandom provided)

Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography Library 1.84
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD