|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.logi.crypto.Crypto
org.logi.crypto.protocols.DHKeyEx
org.logi.crypto.protocols.DHKeyExClient
Diffie-Hellman key exchange client. It expects to talk to a DHKeyExServer object.
DHKeyExServer
Field Summary |
Fields inherited from class org.logi.crypto.protocols.DHKeyEx |
g, hisPublic, keyDecided, m, myPrivate, myPublic, sessionKey |
Fields inherited from class org.logi.crypto.Crypto |
BIT, cdsPath, EMPTY_ARRAY, FOUR, keySource, NIBBLE, ONE, primeCertainty, random, TWO, ZERO |
Constructor Summary | |
DHKeyExClient(DHKey pri,
java.lang.String keyType)
Create a new DHKeyExClient object. |
|
DHKeyExClient(int n,
java.lang.String keyType)
Create a new DHKeyExClient object. |
Method Summary | |
byte[] |
message(byte[] received)
Get the next message in the protocol. |
Methods inherited from class org.logi.crypto.protocols.DHKeyEx |
completed, maxMessageSize, sessionKey |
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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.logi.crypto.protocols.InterKeyExClient |
sessionKey |
Methods inherited from interface org.logi.crypto.protocols.InterProtocolClient |
completed, maxMessageSize |
Constructor Detail |
public DHKeyExClient(DHKey pri, java.lang.String keyType) throws KeyException
pri
.
KeyException
- if the key is not private.public DHKeyExClient(int n, java.lang.String keyType)
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, 2048. Using
one of these values saves you from a rather long wait.
Method Detail |
public byte[] message(byte[] received) throws CryptoProtocolException
received
is the last message received form the server
and has not yet been sent to the client.
The returned value is the next message to send to the server or null if no more messages need to be sent and the protocol is terminated.
message
in interface InterProtocolClient
CryptoProtocolException
- if a problem arises with the protocol.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |