org.logi.crypto.test
Class TestCliSer

java.lang.Object
  |
  +--org.logi.crypto.Crypto
        |
        +--org.logi.crypto.test.TestCliSer

public class TestCliSer
extends Crypto

This application tests multiple client threads connecting to a server thread, using key-exchange and encryption in OFB mode.

This makes use of the EncryptStream DecryptStream, EncryptOFB, DecryptOFB, TriDES, DHKeyExClient and DHKeyExServer classes.

10 client threads are created which each repeatedly connects to the main server thread. The main server thread spawns a sub-thread for each connection. Each client thread negotiates a TriDES session key with its corresponding server thread using the Diffie-Hellman protocol and uses this key in OFB mode to send a number to the server thread and receive the number squared. The result is then printed to the screen.

Since each EncryptOFB and DecryptOFB object launches a thread to pre-calculate an xor-stream, more than 60 threads are created to perform the calculations.

Author:
Logi Ragnarsson (logir@logi.org)
See Also:
EncryptMode

Fields inherited from class org.logi.crypto.Crypto
BIT, cdsPath, EMPTY_ARRAY, FOUR, keySource, NIBBLE, ONE, primeCertainty, random, TWO, ZERO
 
Method Summary
static void main(java.lang.String[] arg)
           
 
Methods inherited from class org.logi.crypto.Crypto
binString, binString, equal, equalRelaxed, equalSub, fromHexNibble, fromHexString, fromString, fromString, hexString, hexString, hexString, hexString, hexString, initRandom, initRandom, makeClass, makeInt, makeLong, makeSessionKey, pastSpace, pickBits, pickBits, readBlock, readInt, writeBytes, writeBytes, writeInt
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] arg)


Copyright 1997-2000 Logi Ragnarsson