anon.mixminion.message
Class MixMinionCryptoUtil

java.lang.Object
  extended by anon.mixminion.message.MixMinionCryptoUtil

public class MixMinionCryptoUtil
extends java.lang.Object

Some Helping Methods for the MixMinion

Author:
Stefan Roenisch and Jens Kempe

Constructor Summary
MixMinionCryptoUtil()
           
 
Method Summary
(package private) static byte[] compressData(byte[] message)
          this Method is for compressing some Data, with the ZLIB-Standard
(package private) static byte[] createPRNG(byte[] key, int len)
          Creates a octet-array using Cryptographic Stream generator
(package private) static byte[] decompressData(byte[] message)
           
static byte[] Encrypt(byte[] K, byte[] M)
          Die Encrypt-Funktion nach der MixMinion-Spec
private static byte[] GZIPcompressData(byte[] message)
          this Method is for compressing some Data
private static byte[] GZIPextractData(byte[] payload)
          this Method is for extracting some Data
static byte[] hash(byte[] x)
          SHA1Digest of x
static byte[] randomArray(int len)
          Creates an octet-array fills with random Bytes
static byte[] SPRP_Decrypt(byte[] K, byte[] M)
          Die SPRP_Encrypt-Funktion nach der MixMinion-Spec
static byte[] SPRP_Encrypt(byte[] K, byte[] M)
          Die SPRP_Encrypt-Funktion nach der MixMinion-Spec
static java.util.Vector subVector(java.util.Vector v, int offset, int len)
           
(package private) static byte[] xor(byte[] one, byte[] two)
          xor of two byte[]
private static byte[] ZIPcompressData(byte[] message)
          this Method is for compressing some Data
private static byte[] ZIPextractData(byte[] payload)
          this Method is for extracting some Data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MixMinionCryptoUtil

public MixMinionCryptoUtil()
Method Detail

randomArray

public static byte[] randomArray(int len)
Creates an octet-array fills with random Bytes

Parameters:
len - int
Returns:
the array byte[]

xor

static byte[] xor(byte[] one,
                  byte[] two)
xor of two byte[]

Parameters:
one - byte[]
two - byte[]
Returns:
the xor, if not the same length: null

hash

public static byte[] hash(byte[] x)
SHA1Digest of x

Parameters:
x - byte[]
Returns:
the digest byte[]

subVector

public static java.util.Vector subVector(java.util.Vector v,
                                         int offset,
                                         int len)
Parameters:
v -
offset -
len -
Returns:

Encrypt

public static byte[] Encrypt(byte[] K,
                             byte[] M)
Die Encrypt-Funktion nach der MixMinion-Spec


createPRNG

static byte[] createPRNG(byte[] key,
                         int len)
Creates a octet-array using Cryptographic Stream generator

Parameters:
key - byte[]
len - int
Returns:
the array byte[]

SPRP_Encrypt

public static byte[] SPRP_Encrypt(byte[] K,
                                  byte[] M)
Die SPRP_Encrypt-Funktion nach der MixMinion-Spec

Parameters:
k -
M -
Returns:

SPRP_Decrypt

public static byte[] SPRP_Decrypt(byte[] K,
                                  byte[] M)
Die SPRP_Encrypt-Funktion nach der MixMinion-Spec

Parameters:
k -
M -
Returns:

compressData

static byte[] compressData(byte[] message)
this Method is for compressing some Data, with the ZLIB-Standard


decompressData

static byte[] decompressData(byte[] message)

ZIPcompressData

private static byte[] ZIPcompressData(byte[] message)
this Method is for compressing some Data


ZIPextractData

private static byte[] ZIPextractData(byte[] payload)
this Method is for extracting some Data


GZIPcompressData

private static byte[] GZIPcompressData(byte[] message)
this Method is for compressing some Data


GZIPextractData

private static byte[] GZIPextractData(byte[] payload)
this Method is for extracting some Data