All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptix.provider.rpk.StreamCipher

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

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

An RPK stream cipher operates on data one byte at a time, combining it with the session key's keystream output sequence.

A skipCountMask property is also used to compute how many bytes from the keystream output sequence will be discarded after combining every 256 bytes. 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.3 $

Author:
Raif S. Naffah

Constructor Index

 o StreamCipher()

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 StreamCipher
 public StreamCipher()

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