org.logi.crypto.protocols
Class EncryptedKeyExClient
java.lang.Object
|
+--org.logi.crypto.Crypto
|
+--org.logi.crypto.protocols.EncryptedKeyEx
|
+--org.logi.crypto.protocols.EncryptedKeyExClient
- All Implemented Interfaces:
- InterKeyExClient, InterProtocolClient, NoninterKeyExClient, NoninterProtocolClient, PrettyPrintable
- public class EncryptedKeyExClient
- extends EncryptedKeyEx
- implements NoninterKeyExClient
Exchange keys by sending an encrypted key from this class to the
corresponding EncryptedKeyExServer.
- Author:
- Logi Ragnarsson
(logir@logi.org)
- See Also:
EncryptedKeyExServer
| Fields inherited from class org.logi.crypto.Crypto |
BIT, cdsPath, EMPTY_ARRAY, FOUR, keySource, NIBBLE, ONE, primeCertainty, random, TWO, ZERO |
|
Method Summary |
byte[] |
message(byte[] received)
Get the next message in the protocol. |
| 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 |
EncryptedKeyExClient
public EncryptedKeyExClient(CipherKey key,
Key sessionKey)
- Create a new EncryptedKeyExClient object. It uses
key to encrypt sessionKey and then
sends it to the server.
EncryptedKeyExClient
public EncryptedKeyExClient(CipherKey key,
SignatureKey signKey,
Key sessionKey)
- Create a new EncryptedKeyExClient object. It uses
key to encrypt sessionKey and then
sends it to the server.
If signKey is not null, then the
session key will be signed with this key.
message
public byte[] message(byte[] received)
throws CryptoProtocolException
- Get the next message in the protocol.
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.
- Specified by:
message in interface InterProtocolClient
- Throws:
CryptoProtocolException - if a problem arises with the
protocol.
Copyright 1997-2000 Logi Ragnarsson