gnu.crypto.mode

Class EAX

Implemented Interfaces:
Cloneable, IAuthenticatedMode, IBlockCipher, IMac, IMode

public class EAX
extends Object
implements IAuthenticatedMode

A conventional two-pass authenticated-encrypted mode, EAX. EAX is a Authenticated Encryption with Additional Data (AEAD) scheme, which provides protection and authentication for the message, and provides authentication of an (optional) header. EAX is composed of the counter mode (CTR) and the one-key CBC MAC (OMAC).

This class makes full use of the IAuthenticatedMode interface, that is, all methods of both IMode and IMac can be used as specified in the IAuthenticatedMode interface.

References:

  1. M. Bellare, P. Rogaway, and D. Wagner; A Conventional Authenticated-Encryption Mode.

Fields inherited from interface gnu.crypto.cipher.IBlockCipher

CIPHER_BLOCK_SIZE, KEY_MATERIAL

Fields inherited from interface gnu.crypto.mac.IMac

MAC_KEY_MATERIAL, TRUNCATED_SIZE

Fields inherited from interface gnu.crypto.mode.IMode

DECRYPTION, ENCRYPTION, IV, MODE_BLOCK_SIZE, STATE

Constructor Summary

EAX(IBlockCipher cipher, int cipherBlockSize)

Method Summary

Iterator
blockSizes()
Object
clone()
int
currentBlockSize()
void
decryptBlock(byte[] in, int inOff, byte[] out, int outOff)
int
defaultBlockSize()
int
defaultKeySize()
byte[]
digest()
void
digest(byte[] out, int outOffset)
void
encryptBlock(byte[] in, int inOff, byte[] out, int outOff)
void
init(Map attrib)
Iterator
keySizes()
int
macSize()
String
name()
void
reset()
boolean
selfTest()
void
update(byte b)
void
update(byte[] in, int inOff, byte[] out, int outOff)
void
update(byte[] buf, int off, int len)

Constructor Details

EAX

public EAX(IBlockCipher cipher,
           int cipherBlockSize)

Method Details

blockSizes

public Iterator blockSizes()
Specified by:
blockSizes in interface IBlockCipher

clone

public Object clone()
Specified by:
clone in interface IBlockCipher
clone in interface IMac

currentBlockSize

public int currentBlockSize()
Specified by:
currentBlockSize in interface IBlockCipher

decryptBlock

public void decryptBlock(byte[] in,
                         int inOff,
                         byte[] out,
                         int outOff)
Specified by:
decryptBlock in interface IBlockCipher

defaultBlockSize

public int defaultBlockSize()
Specified by:
defaultBlockSize in interface IBlockCipher

defaultKeySize

public int defaultKeySize()
Specified by:
defaultKeySize in interface IBlockCipher

digest

public byte[] digest()
Specified by:
digest in interface IMac

digest

public void digest(byte[] out,
                   int outOffset)

encryptBlock

public void encryptBlock(byte[] in,
                         int inOff,
                         byte[] out,
                         int outOff)
Specified by:
encryptBlock in interface IBlockCipher

init

public void init(Map attrib)
            throws InvalidKeyException
Specified by:
init in interface IBlockCipher
init in interface IMac

keySizes

public Iterator keySizes()
Specified by:
keySizes in interface IBlockCipher

macSize

public int macSize()
Specified by:
macSize in interface IMac

name

public String name()
Specified by:
name in interface IBlockCipher
name in interface IMac

reset

public void reset()
Specified by:
reset in interface IBlockCipher
reset in interface IMac

selfTest

public boolean selfTest()
Specified by:
selfTest in interface IBlockCipher
selfTest in interface IMac

update

public void update(byte b)
Specified by:
update in interface IMac

update

public void update(byte[] in,
                   int inOff,
                   byte[] out,
                   int outOff)
Specified by:
update in interface IMode

update

public void update(byte[] buf,
                   int off,
                   int len)
Specified by:
update in interface IMac

Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.