Top Description Methods
org.bouncycastle.crypto

public Interface AsymmetricBlockCipher

Known Direct Implementers
org.bouncycastle.crypto.encodings.ISO9796d1Encoding, org.bouncycastle.crypto.encodings.OAEPEncoding, org.bouncycastle.crypto.encodings.PKCS1Encoding, org.bouncycastle.crypto.engines.NaccacheSternEngine, org.bouncycastle.crypto.engines.RSABlindedEngine, org.bouncycastle.crypto.engines.RSABlindingEngine, org.bouncycastle.crypto.engines.ElGamalEngine, org.bouncycastle.crypto.engines.RSAEngine, org.bouncycastle.jcajce.provider.asymmetric.rsa.CustomPKCS1Encoding, org.bouncycastle.pqc.legacy.crypto.ntru.NTRUEngine

base interface that a public/private key block cipher needs to conform to.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

maximum size for an input block.
getInputBlockSize
()

returns the largest size an input block can be.

public int

Returns:

maximum size of the output block produced by the cipher.
getOutputBlockSize
()

returns the maximum size of the block produced by this cipher.

public void
init(boolean
if true the cipher is initialised for encryption, if false for decryption.
forEncryption
,
CipherParameters
the key and other data required by the cipher.
param
)

initialise the cipher.

public byte[]

Returns:

the resulting byte array of the encryption/decryption process.
processBlock
(byte[]
the input data
in
,
int
offset into the in array where the data starts
inOff
,
int
the length of the block to be processed.
len
)

process the block of len bytes stored in in from offset inOff.

Method Detail

getInputBlockSizeback to summary
public int getInputBlockSize()

returns the largest size an input block can be.

Returns:int

maximum size for an input block.

getOutputBlockSizeback to summary
public int getOutputBlockSize()

returns the maximum size of the block produced by this cipher.

Returns:int

maximum size of the output block produced by the cipher.

initback to summary
public void init(boolean forEncryption, CipherParameters param)

initialise the cipher.

Parameters
forEncryption:boolean

if true the cipher is initialised for encryption, if false for decryption.

param:CipherParameters

the key and other data required by the cipher.

processBlockback to summary
public byte[] processBlock(byte[] in, int inOff, int len) throws InvalidCipherTextException

process the block of len bytes stored in in from offset inOff.

Parameters
in:byte[]

the input data

inOff:int

offset into the in array where the data starts

len:int

the length of the block to be processed.

Returns:byte[]

the resulting byte array of the encryption/decryption process.

Exceptions
InvalidCipherTextException:
data decrypts improperly.
DataLengthException:
the input data is too large for the cipher.