All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptix.provider.rpk.BlockCipher

java.lang.Object
   |
   +----java.security.IJCE_Traceable
           |
           +----java.security.Cipher
                   |
                   +----cryptix.provider.rpk.BlockCipher

public class BlockCipher
extends Cipher
implements RPKParams
A subclass of java.security.Cipher to implement the RPK block cipher algorithm in Java.

An RPK block cipher operates on blocks of data 256 bytes long. At the beginning of each cipher operation, a new 256-entry swap table is generated which is then used to alter the ordering of the data. The contents of these swap tables are obtained from the session key's mixer-generator.

As it is the case with the RPK stream cipher, a skipCountMask property is used to compute how many bytes from the keystream sequence will be discarded after processing each block. The exact value of the number of bytes to discard is computed by masking the crc value of the whole preceding data processed so far.

References:

  1. William M. Raike, The RPK Public-Key Cryptographic System - Technical Summary (available at http://crypto.swdev.co.nz).

  2. William M. Raike, Detailed Supplemental Technical Description of the RPK Public-Key Cryptographic System (available at http://crypto.swdev.co.nz).

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

$Revision: 1.4 $

Author:
Raif S. Naffah

Constructor Index

 o BlockCipher()

Method Index

 o engineBlockSize()
SPI: Returns the length of a block, in bytes.
 o engineInitDecrypt(Key)
SPI: Initializes this cipher for decryption, using the specified key.
 o engineInitEncrypt(Key)
SPI: Initializes this cipher for encryption, using the specified key.
 o engineUpdate(byte[], int, int, byte[], int)
SPI: This is the main engine method for updating data.
 o setSkipCountMask(int)
Define the value of the skipCountMask to use.

Constructors

 o BlockCipher
 public BlockCipher()

Methods

 o engineBlockSize
 public int engineBlockSize()
SPI: Returns the length of a block, in bytes.

Overrides:
engineBlockSize in class Cipher
 o engineInitEncrypt
 public void engineInitEncrypt(Key key) throws KeyException
SPI: Initializes this cipher for encryption, using the specified key.

Overrides:
engineInitEncrypt in class Cipher
 o engineInitDecrypt
 public void engineInitDecrypt(Key key) throws KeyException
SPI: Initializes this cipher for decryption, using the specified key.

Overrides:
engineInitDecrypt in class Cipher
 o engineUpdate
 public int engineUpdate(byte in[],
                         int inOffset,
                         int inLen,
                         byte out[],
                         int outOffset)
SPI: This is the main engine method for updating data.

Overrides:
engineUpdate in class Cipher
 o setSkipCountMask
 public void setSkipCountMask(int m)
Define the value of the skipCountMask to use.

Parameters:
m - The value of the skipCountMask to use. If zero a default value will be chosen.
See Also:
DEFAULT_SKIP_COUNT_MASK

All Packages  Class Hierarchy  This Package  Previous  Next  Index