Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Cryptix V3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## cryptix.provider.cipher
Class Rijndael

    java.lang.Object
      |
      +--java.security.IJCE_Traceable
            |
            +--java.security.Cipher
                  |
                  +--cryptix.provider.cipher.Rijndael

public final class Rijndael
extends Cipher
implements SymmetricCipher

Rijndael --pronounced Reindaal-- is a symmetric cipher with a 128-bit block size and variable key-size (128-, 192- and 256-bit).

Rijndael was designed by Vincent Rijmen and Joan Daemen.

Since:
  Cryptix 3.1.3/3.2.0
Version:
  $Revision: 1.1 $
Author:
  Raif S. Naffah, Paulo S. L. M. Barreto (pbarreto@cryptix.org), Jeroen C. van Gelderen (gelderen@cryptix.org), Edwin Woudt (edwin@cryptix.org)

Fields inherited from class java.security.Cipher
`DECRYPT, ENCRYPT, UNINITIALIZED`

Constructor Summary
`Rijndael()`

Method Summary
`protected void` | `coreInit(Key key, boolean decrypt)`
`protected int` | `engineBlockSize()` SPI: Returns the length of a 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.

Methods inherited from class java.security.Cipher
`blockSize, clone, crypt, crypt, crypt, doFinal, doFinal, doFinal, doFinal, engineCiphertextBlockSize, engineCrypt, engineGetParameter, engineInBufferSize, engineOutBufferSize, enginePlaintextBlockSize, engineSetPaddingScheme, engineSetParameter, 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 java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Rijndael

    public Rijndael()

Method Detail

### coreInit

    protected void coreInit(Key key,
                            boolean decrypt)
                     throws InvalidKeyException

### engineInitEncrypt

    protected void engineInitEncrypt(Key key)
                              throws KeyException

  Description copied from class: Cipher
  SPI: Initializes this cipher for encryption, using the specified key.

  After a call to this method, the cipher's state is set to ENCRYPT.

  Overrides:
    engineInitEncrypt in class Cipher
  Tags copied from class: Cipher
  Parameters:
    `key` - the key to use for encryption.
  Throws:
    KeyException - if the key is invalid.

### engineInitDecrypt

    protected void engineInitDecrypt(Key key)
                              throws KeyException

  Description copied from class: Cipher
  SPI: Initializes this cipher for decryption, using the specified key.

  After a call to this method, the cipher's state is set to DECRYPT.

  Overrides:
    engineInitDecrypt in class Cipher
  Tags copied from class: Cipher
  Parameters:
    `key` - the key to use for decryption.
  Throws:
    KeyException - if the key is invalid.

### engineUpdate

    protected int engineUpdate(byte[] in,
                               int inOffset,
                               int inLen,
                               byte[] out,
                               int outOffset)

  Description copied from class: Cipher
  SPI: This is the main engine method for updating data.

  When `implBuffering` is true, this method will be called with the same data that is passed to `update` or `crypt` (i.e. there will be exactly one call to `engineUpdate` for each call to `update` or `crypt`).

  When `implBuffering` is false, the Cipher superclass will ensure that when it calls this method, inLen is a non-negative multiple of `getInputBlockSize()`.

  in and out may be the same array, and the input and output regions may overlap. A cipher implementation should not use any part of in or out as working storage for intermediate steps of the algorithm. It should copy only the final result into the out array.

  SECURITY: if array arguments are passed to native code, the implementation must ensure that a buffer overflow or illegal memory access cannot occur, regardless of the arguments passed to this method. I.e. the native library should not be called if:

         in == null || out == null || inLen < 0 || inLen % (block size) != 0 ||
         inOffset < 0 || (long)inOffset + inLen > in.length ||
         outOffset < 0 || (long)outOffset + (number of bytes to be written) > out.length

  Note that the `(long)` casts are essential, because inOffset or outOffset could be close to `Integer.MAX_VALUE`. The native method being called should be private. This is important because untrusted code could subclass the cipher implementation, and call this method directly with any arguments.

  Overrides:
    engineUpdate in class Cipher
  Tags copied from class: 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.

### engineBlockSize

    protected int engineBlockSize()

  Description copied from class: Cipher
  SPI: Returns the length of a block, in bytes. Ciphers for which plaintext and ciphertext blocks are the same size may override this method. Otherwise, both enginePlaintextBlockSize and engineCiphertextBlockSize should be overridden.

  The value may change when `initEncrypt` or `initDecrypt` is called, but it should not change at other times.

  Overrides:
    engineBlockSize in class Cipher
  Tags copied from class: Cipher
  Returns:
    the length in bytes of a block for this cipher.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Cryptix V3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) 1995-2000 The Cryptix Foundation Ltd. All rights reserved.