cryptix.tools
Class KAT
public final class KAT
extends java.lang.Object
For a designated symmetric block cipher algorithm, this command generates
and exercises Known Answer Tests data for both Variable Key and Variable
Text suites.
KAT's output file format is in conformance with the layout described in
Section 3 of NIST's document "Description of Known Answer Tests and Monte
Carlo Tests for Advanced Encryption Standard (AES) Candidate Algorithm
Submissions" dated January 7, 1998.
If the -p argument is not specified, this command assumes that the name
of the designated cipher algorithm is also that of its Security Provider.
It always tries processing the user's request using Java Reflection API
methods on an XXX_Algorithm class, if such a class exists --XXX being the
name of the AES candidate algorithm. When such a class exists, it is
assumed to include the following static methods:
- public static int blockSize();
Return the length in bytes of the cipher's input block.
- public static synchronized Object makeKey (byte[]);
Expand a user-supplied key material into a cipher's session key.
- public static byte[] blockEncrypt (byte[], int, Object);
Encrypt exactly one block of plaintext.
- public static byte[] blockDecrypt (byte[], int, Object);
Decrypt exactly one block of plaintext.
The duality of functionalities are there for performance reasons since
speed is faster with the Reflection API than with the IJCE one --on a
Pentium 133MHz, without JIT, using JDK-1.1.5 Reflection API brings more
than 10% speed improvement.
Copyright © 1998
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.6 $
(package private) static void | halt(String s) - Print an error message to System.err and halts execution returning
-1 to the JVM.
|
static void | main(String[] args)
|
(package private) static void | notify(String s) - Write a notification message to System.out.
|
(package private) void | printUsage() - write help text and quit.
|
(package private) void | run() - main action.
|
(package private) void | vkForKeyIjce(int keysize, PrintWriter out)
|
(package private) void | vkForKeyReflect(int keysize, PrintWriter out)
|
(package private) void | vkKAT(String fileName)
|
(package private) void | vtForKeyIjce(int keysize, PrintWriter out)
|
(package private) void | vtForKeyReflect(int keysize, PrintWriter out)
|
(package private) void | vtKAT(String fileName)
|
SUBMITTER
(package private) static final String SUBMITTER
VERSION
(package private) static final String VERSION
algorithm
(package private) Class algorithm
blockSize
(package private) Method blockSize
cipher
(package private) Cipher cipher
cipherName
(package private) String cipherName
decBlocks
(package private) long decBlocks
decrypt
(package private) Method decrypt
destination
(package private) File destination
dirName
(package private) String dirName
encBlocks
(package private) long encBlocks
encrypt
(package private) Method encrypt
keyCount
(package private) long keyCount
keylengths
(package private) String keylengths
keys
(package private) int[] keys
makeKey
(package private) Method makeKey
provider
(package private) String provider
useReflection
(package private) boolean useReflection
varKey
(package private) boolean varKey
varText
(package private) boolean varText
vkFileName
(package private) final String vkFileName
vtFileName
(package private) final String vtFileName
halt
(package private) static void halt(String s)
Print an error message to System.err and halts execution returning
-1 to the JVM.
s
- a message to output on System.err
main
public static void main(String[] args)
notify
(package private) static void notify(String s)
Write a notification message to System.out.
s
- string to output to System.out.
printUsage
(package private) void printUsage()
write help text and quit.
run
(package private) void run()
main action.
vkForKeyIjce
(package private) void vkForKeyIjce(int keysize,
PrintWriter out)
throws KeyException
vkForKeyReflect
(package private) void vkForKeyReflect(int keysize,
PrintWriter out)
throws IllegalAccessException,
InvocationTargetException
vkKAT
(package private) void vkKAT(String fileName)
throws KeyException
vtForKeyIjce
(package private) void vtForKeyIjce(int keysize,
PrintWriter out)
throws KeyException
vtForKeyReflect
(package private) void vtForKeyReflect(int keysize,
PrintWriter out)
throws IllegalAccessException,
InvocationTargetException
vtKAT
(package private) void vtKAT(String fileName)
throws KeyException