All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class is.hi.logir.cryptonite.DHKeyExClient

java.lang.Object
   |
   +----is.hi.logir.cryptonite.Cryptonite
           |
           +----is.hi.logir.cryptonite.DHKeyEx
                   |
                   +----is.hi.logir.cryptonite.DHKeyExClient

public class DHKeyExClient
extends DHKeyEx
implements InterKeyExClient
Diffie-Hellman key exchange client. It expects to talk to a DHKeyExServer object.

Author:
Logi Ragnarsson (logir@hi.is)
See Also:
DHKeyExServer

Constructor Index

 o DHKeyExClient(DHKey, String)
Create a new DHKeyExClient object which uses the private DH key from pri.
 o DHKeyExClient(int, String)
Create a new DHKeyExClient object which uses an n bit modulus and the named key type.

Method Index

 o message(byte[])
If the key has not been decided upon and received is the last message received from the other end, message(received) returns the message to send the other end as the next step in the protocol.

Constructors

 o DHKeyExClient
 public DHKeyExClient(DHKey pri,
                      String keyType) throws KeyException
Create a new DHKeyExClient object which uses the private DH key from pri.

Throws: KeyException
if the key is not private.
 o DHKeyExClient
 public DHKeyExClient(int n,
                      String keyType)
Create a new DHKeyExClient object which uses an n bit modulus and the named key type.

There are pre-computed public modulus and gnerator pairs for these values of n: 256, 512, 1024. Using one of these values saves you from a rather long wait.

Methods

 o message
 public byte[] message(byte received[]) throws ProtocolException
If the key has not been decided upon and received is the last message received from the other end, message(received) returns the message to send the other end as the next step in the protocol.

Throws: ProtocolException
if a malformed message is received

All Packages  Class Hierarchy  This Package  Previous  Next  Index