![]() |
Documentation Index Compilation of Source Testing Binary Dist |
Cryptix Development Team |
In order to repeat the entire distribution tests,
run the scripts in ../auto
:
../auto/testjar.shor, for NT/95
; this script is untested, and unwritten as of the current dist. ..\auto\testjarThese tests are directly written by
../auto/testjar.sh
and include all the necessary CLASSPATH settings. They currently
take about 10 minutes on a 100MHz Pentium.
Note that if you receive an interim release, then the tests that failed during distribution are commented out within the above scripts. You can uncomment them, but they are unlikely to work. Note also that there should be no failed tests, this is more a tool to assist the distribution process. To date, no 3.0.x distribution has been released with failed tests.
The binary distribution comes with a group of JAR archives
within the classes
directory.
Each JAR is a major module within Cryptix. Here are some
important ones (note that the names may not be precise):
Still confused? Just remember to include IJCE.jar, SPT.jar and one or more algorithmic JARs.
Cryptix generally installs and runs quickly on the common
platforms, because most of the installation difficulties
are ironed out.
In theory, the tests supplied, and especially those run by
../auto/testjar.sh
are working and tested at distribution point.
Any failures indicate that there is a portability bug. If you are working with a new platform, then you might experience difficulties. Here's a troubleshooting guide that tries to build up a number of tests to see where problems might occur.
Note that
classes
directory.
For this purpose find these files *:
cryptix/util/math/BigRegister.class cryptix/util/core/ArrayUtil.class cryptix/test/TestBR.class cryptix/test/BaseTest.class cryptix/test/TestException.classwithin the SPT jar in the classes directory (you will need to identify the version number). Extract the compiled classes out of the SPT jar (using
jar
or unzip
)
into the obvious hierarchy
cryptix/...
.
Then run the test in the normal fashion:
java cryptix.test.TestBR
You should see lots of output:
Start tests... Binary dump of a BigRegister [64-bit]... Byte #:|........|........|........|........|........|........|........|........| 8: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 {big snip} Done tests... =========================================================================== Number of passes: 8 Number of failures: 0 Expected passes: 8Which should print out lots of test results. Note that:
If you can't get this far, which is all straight Java, then something is seriously wrong, and you will need to seek help to ascertain that you have correctly loaded Java, and that the Cryptix files you have are OK.
* they are all on one line above so that you can Cut&Paste the classes onto an unzip command.
The most basic test is to run the above tests again, but using the JARs. Set your classpath variable to include the SPT jar and the current directory (but also save the original classpath for later):
$ OLD_CP=$CLASSPATH CLASSPATH=$OLD_CP:SPT-X-Y-Z.jar ; export CLASSPATHor, for systems with DOS batch scripting:
c:\cryptix> ; Caveat these batch commands are untested. set OLD_CP=%CLASSPATH% set PWD=c:\cryptix\classes set CLASSPATH=%OLD_CP%;%PWD%\SPT-X-Y-Z.jarWhere X-Y-Z is the number of your SPT archive, you will need to determine what number it is (for example 0-0-8). Then, run the java test above:
java cryptix.test.TestBRWhich should produce the same output as test 1, above. If it doesn't work, then the problem might be one of:
unzip
to unload them and either zip
them into a .zip
or use the unzipped hierarchy directly. You might need to
put that directory in the CLASSPATH.
$ SPT=SPT_0-0-8.jar ALG=ALG_0-0-8.jar IJCE=IJCE_0-0-10.jar CLASSPATH=$OLD_CP:$SPT:$ALG:$IJCE:$PWD export CLASSPATHor, for DOS:
c:\cryptix> set SPT=%PWD%\SPT_0-0-8.jar set ALG=%PWD%\ALG_0-0-8.jar set IJCE=%PWD%\IJCE_0-0-10.jar set CLASSPATH=%OLD_CP%;%SPT%;%ALG%;%ALG%;%PWD%Note that these should be modified according to the conditions you discovered in the previous test.
Then, run:
java cryptix.test.TestIJCE
Read the test results carefully. They should show an algorithm being tested, and at the end, the number of tests that have passed and failed.
cryptix.test.TestBR
) again using the above
CLASSPATH setup. If that works, there is something wrong
with the ALG and IJCE archives, probably in the CLASSPATH.
unzip -l SPT*.jar
for example).
java cryptix.test.TestDES
$ ELGAMAL=ELGAMAL_0-0-1.jar CLASSPATH=$OLD_CP:$SPT:$ALG:$IJCE:$ELGAMAL:$PWD ; export CLASSPATHor,
c:\cryptix> set ELGAMAL=%PWD%\ELGAMAL_0-0-1.jar set CLASSPATH=%OLD_CP%;%SPT%;%ALG%;%ALG%;%ELGAMAL%;%PWD%and then, run:
java cryptix.test.TestElGamalThe ElGamal test will take a while: 95 seconds on a P100. ElGamal is new, so please try it out and post any failures.
The next step
is to examine the test script in auto
(there is one for Unix
and one for DOS-based systems) and then re-write that according
to the local conditions you have identified.
Please make sure to post on cryptix-java the results of your investigations for any new platform, so that we can fix the distributions for the future.