org.bouncycastle.crypto.modes

Class EAXBlockCipher

public class EAXBlockCipher extends Object implements AEADBlockCipher

A Two-Pass Authenticated-Encryption Scheme Optimized for Simplicity and Efficiency - by M. Bellare, P. Rogaway, D. Wagner. http://www.cs.ucdavis.edu/~rogaway/papers/eax.pdf EAX is an AEAD scheme based on CTR and OMAC1/CMAC, that uses a single block cipher to encrypt and authenticate data. It's on-line (the length of a message isn't needed to begin processing it), has good performances, it's simple and provably secure (provided the underlying block cipher is secure). Of course, this implementations is NOT thread-safe.
Constructor Summary
EAXBlockCipher(BlockCipher cipher)
Constructor that accepts an instance of a block cipher engine.
Method Summary
intdoFinal(byte[] out, int outOff)
StringgetAlgorithmName()
intgetBlockSize()
byte[]getMac()
intgetOutputSize(int len)
BlockCiphergetUnderlyingCipher()
intgetUpdateOutputSize(int len)
voidinit(boolean forEncryption, CipherParameters params)
intprocessByte(byte in, byte[] out, int outOff)
intprocessBytes(byte[] in, int inOff, int len, byte[] out, int outOff)
voidreset()

Constructor Detail

EAXBlockCipher

public EAXBlockCipher(BlockCipher cipher)
Constructor that accepts an instance of a block cipher engine.

Parameters: cipher the engine to use

Method Detail

doFinal

public int doFinal(byte[] out, int outOff)

getAlgorithmName

public String getAlgorithmName()

getBlockSize

public int getBlockSize()

getMac

public byte[] getMac()

getOutputSize

public int getOutputSize(int len)

getUnderlyingCipher

public BlockCipher getUnderlyingCipher()

getUpdateOutputSize

public int getUpdateOutputSize(int len)

init

public void init(boolean forEncryption, CipherParameters params)

processByte

public int processByte(byte in, byte[] out, int outOff)

processBytes

public int processBytes(byte[] in, int inOff, int len, byte[] out, int outOff)

reset

public void reset()