cryptix.provider.cipher

Class LOKI91

Implemented Interfaces:
Parameterized, SymmetricCipher

public final class LOKI91
extends Cipher
implements SymmetricCipher

LOKI is a proposed Australian alternative cipher to DES. It was first designed by L. Brown, J. Pieprzyk and J. Seberry in 1990 and later re- designed (and renamed LOKI91), with improved resistance to differential cryptanalysis, by L. Brown, M. Kwan, J. Pieprzyk and J. Seberry.

LOKI91 is a 64-bit symmetric block cipher with a 64-bit user key. See " LOKI91KeyGenerator="LOKI91KeyGenerator" for="for" information="information" about="about" weak="weak" keys.="keys."

="

" This="This" current="current" version="version" is="is" based="based" on="on" special="special" C-code="C-code" obtained,="obtained," under="under" license,="license," from="from" The="The" School="School" of="of" Computer="Computer" Science,="Science," UC,="UC," UNSW.="UNSW." The="The" speed="speed" gain="gain" is="is" achieved="achieved" by="by" pre-computing="pre-computing" the="the" 4,096="4,096" values="values" of="of" the="the" substitutions="substitutions" (S-Box)="(S-Box)" used="used" by="by" the="the" algorithm="algorithm" as="as" well="well" as="as" the="the" permutations="permutations" for="for" all="all" possible="possible" 256="256" input="input" values="values" for="for" each="each" of="of" the="the" four="four" 8-bit="8-bit" blocks.="blocks."

="

" References:="References:"

    ="
      "
    1. ="
    2. " Bruce="Bruce" Schneier,="Schneier," Applied="Applied" Cryptography,="Cryptography," 2nd="2nd" edition,="edition," John="John" Wiley="Wiley" &="&" Sons="Sons" 1996,="1996," 314-316.="314-316."

      ="

      "

    3. ="
    4. " Personal="Personal" correspondance="correspondance" with="with" Dr.="Dr." Lawrence="Lawrence" Brown.="Brown."
    ="
"

="

" Copyright="Copyright" ©="©" 1997="1997" Systemics=">Systemics" Ltd="Ltd" on="on" behalf="behalf" of="of" the="the" Cryptix=">Cryptix" Development="Development" Team.="Team."
All="
All" rights="rights" reserved.="reserved."

="

" $Revision:="$Revision:" 1.3="1.3" $="$">

Author:
Raif S. Naffah

Since:
Cryptix 2.2.2

Field Summary

Fields inherited from class xjava.security.Cipher

DECRYPT, ENCRYPT, UNINITIALIZED

Fields inherited from class xjava.security.IJCE_Traceable

tracing

Constructor Summary

LOKI91()
Constructs a LOKI91 cipher object, in the UNINITIALIZED state.

Method Summary

Object
clone()
Always throws a CloneNotSupportedException (cloning of ciphers is not supported for security reasons).
protected int
engineBlockSize()
SPI: Returns the length of an input block, in bytes.
protected void
engineInitDecrypt(Key key)
SPI: Initializes this cipher for decryption, using the specified key.
protected void
engineInitEncrypt(Key key)
SPI: Initializes this cipher for encryption, using the specified key.
protected int
engineUpdate(byte[] in, int inOffset, int inLen, byte[] out, int outOffset)
SPI: This is the main engine method for updating data.
protected void
finalize()
Cleans up resources used by this instance, if necessary.
static LinkStatus
getLinkStatus()
Gets an object representing the native linking status of this class.

Methods inherited from class xjava.security.Cipher

blockSize, clone, crypt, crypt, crypt, doFinal, doFinal, doFinal, doFinal, engineBlockSize, engineCiphertextBlockSize, engineCrypt, engineGetParameter, engineInBufferSize, engineInitDecrypt, engineInitEncrypt, engineOutBufferSize, enginePlaintextBlockSize, engineSetPaddingScheme, engineSetParameter, engineUpdate, getAlgorithm, getAlgorithms, getAlgorithms, getCiphertextBlockSize, getInputBlockSize, getInstance, getInstance, getInstance, getMode, getOutputBlockSize, getPadding, getPaddingScheme, getParameter, getPlaintextBlockSize, getProvider, getState, inBufferSize, inBufferSizeFinal, initDecrypt, initEncrypt, isPaddingBlockCipher, outBufferSize, outBufferSizeFinal, setParameter, toString, update, update, update, update

Methods inherited from class xjava.security.IJCE_Traceable

disableTracing, enableTracing, traceMethod, traceResult, traceResult, traceVoidMethod

Constructor Details

LOKI91

public LOKI91()
Constructs a LOKI91 cipher object, in the UNINITIALIZED state. This calls the Cipher constructor with implBuffering false, implPadding false and the provider set to "Cryptix".

Method Details





engineUpdate

protected int engineUpdate(byte[] in,
                           int inOffset,
                           int inLen,
                           byte[] out,
                           int outOffset)
SPI: This is the main engine method for updating data.

in and out may be the same array, and the input and output regions may overlap.

Overrides:
engineUpdate in interface Cipher

Parameters:
in - the input data.
inOffset - the offset into in specifying where the data starts.
inLen - the length of the subarray.
out - the output array.
outOffset - the offset indicating where to start writing into the out array.

Returns:
the number of bytes written.


finalize

protected final void finalize()
Cleans up resources used by this instance, if necessary.


getLinkStatus

public static LinkStatus getLinkStatus()
Gets an object representing the native linking status of this class.