is.logi.crypto.protocols
Class DHKeyExNoninter
java.lang.Object
|
+--is.logi.crypto.Crypto
|
+--is.logi.crypto.protocols.DHKeyEx
|
+--is.logi.crypto.protocols.DHKeyExNoninter
- public class DHKeyExNoninter
- extends DHKeyEx
- implements NoninterKeyExClient, NoninterKeyExServer
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.
- Author:
- Logi Ragnarsson
(logir@hi.is)
- See Also:
DHKeyExServer
,
DHKeyExClient
,
DHKey
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 is.logi.crypto.Crypto |
binString,
binString,
equal,
equalRelaxed,
equalSub,
fromHexNibble,
fromHexString,
fromString,
fromString,
hexString,
hexString,
hexString,
hexString,
makeClass,
makeInt,
makeLong,
makeSessionKey,
pastSpace,
pickBits,
pickBits,
readInt,
writeBytes,
writeBytes,
writeInt |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DHKeyExNoninter
public DHKeyExNoninter(DHKey pri,
DHKey pub,
java.lang.String keyType)
throws KeyException,
InvalidCDSException
- 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.
- Throws:
- KeyException - if the public/private flag of either key
is wrong.
- InvalidCDSException - if the session key object can not
be created.
message
public byte[] message(byte[] received)
throws ProtocolException
- Expects and sends null, since no messages are needed for this protocol.
- Throws:
- ProtocolException - if called with a parameter other than null.
Copyright 1997-1999 Logi Ragnarsson