cryptix.tools

Class KAT

public final class KAT extends 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:

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 $

Author: Raif S. Naffah

Nested Class Summary
classKAT.KAT_Key
Field Summary
Classalgorithm
MethodblockSize
Ciphercipher
StringcipherName
longdecBlocks
Methoddecrypt
Filedestination
StringdirName
longencBlocks
Methodencrypt
longkeyCount
Stringkeylengths
int[]keys
MethodmakeKey
Stringprovider
static StringSUBMITTER
booleanuseReflection
booleanvarKey
booleanvarText
StringvkFileName
StringvtFileName
static StringVERSION
Method Summary
static voidhalt(String s)
Print an error message to System.err and halts execution returning -1 to the JVM.
static voidmain(String[] args)
static voidnotify(String s)
Write a notification message to System.out.
voidprintUsage()
write help text and quit.
voidrun()
main action.
voidvkForKeyIjce(int keysize, PrintWriter out)
voidvkForKeyReflect(int keysize, PrintWriter out)
voidvkKAT(String fileName)
voidvtForKeyIjce(int keysize, PrintWriter out)
voidvtForKeyReflect(int keysize, PrintWriter out)
voidvtKAT(String fileName)

Field Detail

algorithm

Class algorithm

blockSize

Method blockSize

cipher

Cipher cipher

cipherName

String cipherName

decBlocks

long decBlocks

decrypt

Method decrypt

destination

File destination

dirName

String dirName

encBlocks

long encBlocks

encrypt

Method encrypt

keyCount

long keyCount

keylengths

String keylengths

keys

int[] keys

makeKey

Method makeKey

provider

String provider

SUBMITTER

static final String SUBMITTER

useReflection

boolean useReflection

varKey

boolean varKey

varText

boolean varText

vkFileName

final String vkFileName

vtFileName

final String vtFileName

VERSION

static final String VERSION

Method Detail

halt

static void halt(String s)
Print an error message to System.err and halts execution returning -1 to the JVM.

Parameters: s a message to output on System.err

main

public static void main(String[] args)

notify

static void notify(String s)
Write a notification message to System.out.

Parameters: s string to output to System.out.

printUsage

void printUsage()
write help text and quit.

run

void run()
main action.

vkForKeyIjce

void vkForKeyIjce(int keysize, PrintWriter out)

vkForKeyReflect

void vkForKeyReflect(int keysize, PrintWriter out)

vkKAT

void vkKAT(String fileName)

vtForKeyIjce

void vtForKeyIjce(int keysize, PrintWriter out)

vtForKeyReflect

void vtForKeyReflect(int keysize, PrintWriter out)

vtKAT

void vtKAT(String fileName)