nl.warper.skein
Class UBI64

java.lang.Object
  extended by nl.warper.skein.UBI64

public class UBI64
extends java.lang.Object

Implementation of the UBI function that can be used to chain the three parts of the Skein hash algorithm together. This is a strictly 64 bit version (long in Java) for performance reasons.

Since:
5 nov 2008
Version:
$Revision: $
Author:
maartenb, $Author: $

Constructor Summary
UBI64(ThreefishImpl blockCipher)
          Constructs a UBI64 instance, currently only with the Threefish block cipher.
 
Method Summary
 long[] getOutput()
           
 void init()
          Initializes UBI64 with a newly created block with 0h values, as used for the simple Skein hash method
 void init(long[] g)
          Initialize the UBI64 chaining method using the initial value.
 java.lang.String toString()
           
 void update(long[] mi, long[] ti)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UBI64

public UBI64(ThreefishImpl blockCipher)
Constructs a UBI64 instance, currently only with the Threefish block cipher. The idea is that any tweakable block cipher may be used, but this has not been implemented at the time of writing.

Parameters:
blockCipher -
Method Detail

init

public void init(long[] g)
Initialize the UBI64 chaining method using the initial value. The value should be set to all zeros to initialize this instance for use with the Simple Skein hash algorithm. Warning: for performance reasons, the values of g will be directly used with the underlying block cipher, which may replace these values with other values.

Parameters:
g - the uncloned block to ubi

init

public void init()
Initializes UBI64 with a newly created block with 0h values, as used for the simple Skein hash method


update

public void update(long[] mi,
                   long[] ti)

getOutput

public long[] getOutput()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object