All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class is.hi.logir.cryptonite.DHKeyExServer

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

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

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

Constructor Index

 o DHKeyExServer(DHKey, String)
Create a new DHKeyExServer object which uses the private DH key from pri.
 o DHKeyExServer(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 DHKeyExServer
 public DHKeyExServer(DHKey pri,
                      String keyType) throws KeyException
Create a new DHKeyExServer object which uses the private DH key from pri.

Throws: KeyException
if the key is not private.
 o DHKeyExServer
 public DHKeyExServer(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