|
||||||||||
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.DHKeyExNoninter
Diffie-Hellman key exchange without exchanging keys. Both parties need to know the other party's public DHKey. No messages are sent in either direction, but a unique session key is created for each pair of Diffie-Hellman keys used.
This class is both the client and server for the protocol.
DHKeyExServer
,
DHKeyExClient
,
DHKey
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 | |
DHKeyExNoninter(DHKey pri,
DHKey pub,
java.lang.String keyType)
Create a new DHKeyExClient object which uses the private DH key from pri and the public
DH key from pri to generate a session key. |
Method Summary | |
byte[] |
message(byte[] received)
Expects and sends null, since no messages are needed for this 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.InterProtocolClient |
completed, maxMessageSize |
Methods inherited from interface org.logi.crypto.protocols.InterKeyExClient |
sessionKey |
Methods inherited from interface org.logi.crypto.protocols.InterProtocolServer |
completed, maxMessageSize |
Methods inherited from interface org.logi.crypto.protocols.InterKeyExServer |
sessionKey |
Constructor Detail |
public DHKeyExNoninter(DHKey pri, DHKey pub, java.lang.String keyType) throws KeyException, InvalidCDSException
pri
and the public
DH key from pri
to generate a session key.
KeyException
- if the public/private flag of either key
is wrong.
InvalidCDSException
- if the session key object can not
be created.Method Detail |
public byte[] message(byte[] received) throws CryptoProtocolException
message
in interface InterProtocolClient
CryptoProtocolException
- if called with a parameter other than null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |