Top Description Fields Constructors Methods
org.bouncycastle.crypto.fips

pack-priv Class RsaCoreEngine

extends Object
Class Inheritance
Imports
java.math.BigInteger, org.bouncycastle.crypto.internal.CipherParameters, .DataLengthException, org.bouncycastle.crypto.internal.params.ParametersWithRandom, .RsaKeyParameters, .RsaPrivateCrtKeyParameters, org.bouncycastle.util.Arrays

this does your basic RSA algorithm.

Field Summary

Modifier and TypeField and Description
private boolean
private RsaKeyParameters

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public BigInteger
convertInput(byte[] in, int inOff, int inLen)

public byte[]
public int

Returns:

maximum size for an input block.
getInputBlockSize
()

Return the maximum size for an input block to this engine.

public int

Returns:

maximum size for an output block.
getOutputBlockSize
()

Return the maximum size for an output block to this engine.

public void
init(boolean
true if we are encrypting, false otherwise.
forEncryption
,
CipherParameters
the necessary RSA key parameters.
param
)

initialise the RSA engine.

public BigInteger
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

forEncryptionback to summary
private boolean forEncryption
keyback to summary
private RsaKeyParameters key

Constructor Detail

RsaCoreEngineback to summary
pack-priv RsaCoreEngine()

Method Detail

convertInputback to summary
public BigInteger convertInput(byte[] in, int inOff, int inLen)
convertOutputback to summary
public byte[] convertOutput(BigInteger result)
getInputBlockSizeback to summary
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.

Returns:int

maximum size for an input block.

getOutputBlockSizeback to summary
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.

Returns:int

maximum size for an output block.

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

initialise the RSA engine.

Parameters
forEncryption:boolean

true if we are encrypting, false otherwise.

param:CipherParameters

the necessary RSA key parameters.

processBlockback to summary
public BigInteger processBlock(BigInteger input)