gnu.crypto.assembly

Class CascadeStage


(package private) class CascadeStage
extends Stage

A Cascade Stage in a Cascade Cipher.
Version:
$Revision: 1.3 $

Field Summary

Fields inherited from class gnu.crypto.assembly.Stage

DIRECTION, forward, wired

Constructor Summary

CascadeStage(Cascade cascade, Direction forwardDirection)

Method Summary

Set
blockSizes()
Returns the Set of supported block sizes for this Stage.
int
currentBlockSize()
Returns the currently set block size for the stage.
(package private) void
initDelegate(Map attributes)
(package private) void
resetDelegate()
boolean
selfTest()
Conducts a simple correctness test that consists of basic symmetric encryption / decryption test(s) for all supported block and key sizes of underlying block cipher(s) wrapped by Mode leafs.
(package private) void
updateDelegate(byte[] in, int inOffset, byte[] out, int outOffset)

Methods inherited from class gnu.crypto.assembly.Stage

blockSizes, currentBlockSize, getInstance, getInstance, init, initDelegate, reset, resetDelegate, selfTest, update, updateDelegate

Constructor Details

CascadeStage

(package private)  CascadeStage(Cascade cascade,
                                Direction forwardDirection)

Method Details

blockSizes

public Set blockSizes()
Returns the Set of supported block sizes for this Stage. Each element in the returned Set is an instance of Integer.
Overrides:
blockSizes in interface Stage
Returns:
a Set of supported block sizes.

currentBlockSize

public int currentBlockSize()
            throws IllegalStateException
Returns the currently set block size for the stage.
Overrides:
currentBlockSize in interface Stage
Returns:
the current block size for this stage.

initDelegate

(package private)  void initDelegate(Map attributes)
            throws InvalidKeyException
Overrides:
initDelegate in interface Stage

resetDelegate

(package private)  void resetDelegate()
Overrides:
resetDelegate in interface Stage

selfTest

public boolean selfTest()
Conducts a simple correctness test that consists of basic symmetric encryption / decryption test(s) for all supported block and key sizes of underlying block cipher(s) wrapped by Mode leafs. The test also includes one (1) variable key Known Answer Test (KAT) for each block cipher.
Overrides:
selfTest in interface Stage
Returns:
true if the implementation passes simple correctness tests. Returns false otherwise.

updateDelegate

(package private)  void updateDelegate(byte[] in,
                                       int inOffset,
                                       byte[] out,
                                       int outOffset)
Overrides:
updateDelegate in interface Stage

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