iaik.security.cipher
Class GOSTParameterSpec

java.lang.Object
  |
  +--iaik.security.cipher.GOSTParameterSpec
All Implemented Interfaces:
AlgorithmParameterSpec

public class GOSTParameterSpec
extends Object
implements AlgorithmParameterSpec

GOST parameter specification.

This class represents an initialization vector (IV) and the GOST S-Boxes.

If you want to use the default S-Boxes or want the IV to be generated automatically pass null.

The S-Boxes have to be a byte array with 8*16 entries ranging from 0 to 15. S-Box 1 starts at index 0, S-Box 2 at 16, etc. For the S-Boxes given in Schneier's book that would be 4, 10, 9, 2, ... , 6, 11, 8, 12.

Version:
File Revision 11
See Also:
GOST, AlgorithmParameterSpec

Constructor Summary
GOSTParameterSpec(byte[] SBoxes, byte[] initVector)
          Creates a GOST Parameter specification by using the given SBoxes and the first 8 bytes of the supplied byte array as initialization vector (IV).
GOSTParameterSpec(byte[] SBoxes, byte[] initVector, int offset)
          Creates a GOST Parameter specification by using the given SBoxes and 8 bytes of the supplied byte array as initialization vector (IV), beginning at the given offset.
 
Method Summary
 byte[] getIV()
          Returns a copy of the initialization vector (IV) as byte array representation.
 byte[] getSBoxes()
          Return the SBoxes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GOSTParameterSpec

public GOSTParameterSpec(byte[] SBoxes,
                         byte[] initVector)
Creates a GOST Parameter specification by using the given SBoxes and the first 8 bytes of the supplied byte array as initialization vector (IV).

GOSTParameterSpec

public GOSTParameterSpec(byte[] SBoxes,
                         byte[] initVector,
                         int offset)
Creates a GOST Parameter specification by using the given SBoxes and 8 bytes of the supplied byte array as initialization vector (IV), beginning at the given offset.
Method Detail

getIV

public byte[] getIV()
Returns a copy of the initialization vector (IV) as byte array representation.
Returns:
a copy of the initialization vector (IV) as byte array representation

getSBoxes

public byte[] getSBoxes()
Return the SBoxes. They will NOT be copied.

This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note).

IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK