gnu.crypto.exp

Class Helix

Implemented Interfaces:
Cloneable, IBlockCipher, IMac

public class Helix
extends Object
implements IBlockCipher, IMac

The Helix stream cipher and message authentication code. Helix combines a word-aligned stream cipher with a message authentication code in a single cryptographic primitive.

References:

  1. Niels Ferguson, Doug Whiting, Bruce Schneier, John Kelsey, Stefan Lucks, and Tadayoshi Kohno. "Helix: Fast Encryption and Authentication in a Single Cryptographic Primitive". http://www.macfergus.com/helix/helix.pdf

Field Summary

static int
DECRYPTION
The state constant for decryption and optional MAC.
static int
ENCRYPTION
The state constant for encryption and optional MAC.
static int
MAC
The state constant for MAC-only.
static String
NONCE
Property name for the nonce.
static String
STATE
Property name for the state.

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

Constructor Summary

Helix()

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
encryptBlock(byte[] in, int inOff, byte[] out, int outOff)
void
init(Map attributes)
Iterator
keySizes()
int
macSize()
String
name()
void
reset()
boolean
selfTest()
void
update(byte b)
void
update(byte[] buf, int off, int len)

Field Details

DECRYPTION

public static final int DECRYPTION
The state constant for decryption and optional MAC.
Field Value:
1

ENCRYPTION

public static final int ENCRYPTION
The state constant for encryption and optional MAC.
Field Value:
0

MAC

public static final int MAC
The state constant for MAC-only.
Field Value:
2

NONCE

public static final String NONCE
Property name for the nonce. This parameter is always required and must be a sixteen-byte array.

STATE

public static final String STATE

Constructor Details

Helix

public Helix()

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

encryptBlock

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

init

public void init(Map attributes)
            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[] buf,
                   int off,
                   int len)
Specified by:
update in interface IMac

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