org.logi.crypto.protocols
Class DHEKEKeyExClient

java.lang.Object
  |
  +--org.logi.crypto.Crypto
        |
        +--org.logi.crypto.protocols.DHEKEKeyEx
              |
              +--org.logi.crypto.protocols.DHEKEKeyExClient
All Implemented Interfaces:
InterAuthClient, InterKeyExClient, InterProtocolClient

public class DHEKEKeyExClient
extends org.logi.crypto.protocols.DHEKEKeyEx
implements InterProtocolClient, InterKeyExClient, InterAuthClient

Diffie-Hellman EKE key exchange and password verification client. It expects to talk to a DHEKEKeyExServer object.

The protocol exchanges keys with the remot party and then each party proves that they know the same secret key without giving it away to anyone who does not allready know it.

The patent for this protocol is held by Lucent. You must pay them a steep licensing fee if you intend to use it in the USA or Canada.

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

Fields inherited from class org.logi.crypto.Crypto
BIT, cdsPath, EMPTY_ARRAY, FOUR, keySource, NIBBLE, ONE, primeCertainty, random, TWO, ZERO
 
Constructor Summary
DHEKEKeyExClient(int n, java.lang.String keyType, CipherKey secretKey)
           
 
Method Summary
 boolean completed()
          Returns true iff this end of the protocol i completed.
 int maxMessageSize()
          Returns the maximum expected size of a message for this protocol.
 byte[] message(byte[] received)
          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.
 Key sessionKey()
          Returns the key if it has been decided upon, or null otherwise.
 
Methods inherited from class org.logi.crypto.Crypto
binString, binString, ensureArrayLength, ensureArrayLength, equal, equalRelaxed, equalSub, fromHexNibble, fromHexString, fromString, fromString, hexString, hexString, hexString, hexString, hexString, initRandom, initRandom, makeClass, makeInt, makeLong, makeSessionKey, pastSpace, pickBits, pickBits, prettyPrint, prettyPrint, readBlock, readInt, trimArrayLength, trimArrayLength, trimLeadingZeroes, writeBytes, writeBytes, writeInt
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.logi.crypto.protocols.InterProtocolClient
completed, maxMessageSize
 
Methods inherited from interface org.logi.crypto.protocols.InterKeyExClient
sessionKey
 

Constructor Detail

DHEKEKeyExClient

public DHEKEKeyExClient(int n,
                        java.lang.String keyType,
                        CipherKey secretKey)
Method Detail

message

public byte[] message(byte[] received)
               throws CryptoProtocolException
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.
Specified by:
message in interface InterProtocolClient
Throws:
CryptoProtocolException - if a malformed message is received.
ValidationException - if validation fails.

sessionKey

public Key sessionKey()
Returns the key if it has been decided upon, or null otherwise.

completed

public boolean completed()
Returns true iff this end of the protocol i completed.

maxMessageSize

public int maxMessageSize()
Returns the maximum expected size of a message for this protocol.


Copyright (c) 1997-2001 Logi Ragnarsson - Distributed under the GPL