iaik.security.cipher
Class GOSTParameterSpec

java.lang.Object
  |
  +--iaik.security.cipher.GOSTParameterSpec

public class GOSTParameterSpec
extends java.lang.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.

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.