|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fasteasytrade.JRandTest.Algo.Cipher
com.fasteasytrade.JRandTest.Algo.Skipjack
Skipjack algorithm copyright (c) 2005 Zur Aougav.
Hand translation to java from C implementation.
Originally written by Panu Rissanen
optimized by Mark Tillotson
optimized by Paulo Barreto
gnupg support by Werner Koch
Field Summary | |
(package private) static byte[] |
fTable
The F-table byte permutation (see description of the G-box permutation) |
(package private) boolean |
initialized
|
(package private) byte[][] |
tab
|
Constructor Summary | |
Skipjack()
|
Method Summary | |
static String |
byte2hex(byte b)
|
boolean |
decrypt_block(byte[] in,
byte[] out)
Decrypt a single block of data. |
boolean |
encrypt_block(byte[] in,
byte[] out)
Encrypt a single block of data. |
(package private) int |
g(int w,
int i,
int j,
int k,
int l)
The key-dependent permutation G on V^16 is a four-round Feistel network. |
(package private) int |
g0(int w)
|
(package private) int |
g1(int w)
|
(package private) int |
g2(int w)
|
(package private) int |
g3(int w)
|
(package private) int |
g4(int w)
|
(package private) int |
h(int w,
int i,
int j,
int k,
int l)
The inverse of the G permutation. |
(package private) int |
h0(int w)
|
(package private) int |
h1(int w)
|
(package private) int |
h2(int w)
|
(package private) int |
h3(int w)
|
(package private) int |
h4(int w)
|
static void |
main(String[] args)
|
(package private) boolean |
setupKey(byte[] key)
Preprocess a user key into a table to save and XOR at each F-table access. |
void |
Test()
|
Methods inherited from class com.fasteasytrade.JRandTest.Algo.Cipher |
compareBytes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
boolean initialized
byte[][] tab
static final byte[] fTable
Constructor Detail |
public Skipjack()
Method Detail |
boolean setupKey(byte[] key)
key
- key length must be >= 10 bytes. Process the first 10 bytes.public boolean encrypt_block(byte[] in, byte[] out)
In and out blocks' length must be 8 bytes.
public boolean decrypt_block(byte[] in, byte[] out)
In and out blocks' length must be 8 bytes.
int g(int w, int i, int j, int k, int l)
int g0(int w)
int g1(int w)
int g2(int w)
int g3(int w)
int g4(int w)
int h(int w, int i, int j, int k, int l)
int h0(int w)
int h1(int w)
int h2(int w)
int h3(int w)
int h4(int w)
public static String byte2hex(byte b)
public void Test()
public static void main(String[] args)
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |