|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.logi.crypto.Crypto
|
+--org.logi.crypto.protocols.EncryptedKeyExServer
Receive an encrypted key from the correstponding EncryptedKeyExClient and optionally check a signature.
This is a non-interactive protocol and the client sends one message to the server containing E(K) and optionally S(H(E(K)))). E is encryption with a CipherKey, S is signing with a Signature key, both set when the object is created. H is the default hash-function, which will be SHA1 unless changed.
If the key-exchange is performed with a public-key cryptosystem you will almost certainly want to authenticate the client in some way, such as by having him sign the session key.
In the case where a symmetric cipher is used for key-exchange and no signatures are used, attacks on the system, such as modified or dropped packages, etc., will be difficult to distinguish from transmission errors.
| Fields inherited from class org.logi.crypto.Crypto |
BIT, cdsPath, EMPTY_ARRAY, FOUR, keySource, NIBBLE, ONE, primeCertainty, random, TWO, ZERO |
| Constructor Summary | |
EncryptedKeyExServer(DecryptionKey decryptKey)
Creates a new EncryptedKeyExchangeServer object. |
|
EncryptedKeyExServer(DecryptionKey key,
VerificationKey verifyKey)
Creates a new EncryptedKeyExchangeServer object. |
|
| 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)
Get the next message 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 |
| Constructor Detail |
public EncryptedKeyExServer(DecryptionKey key,
VerificationKey verifyKey)
key to decrypt the session key sent to it by the
client.
If verifyKey is not null, a signature
is expected to accompany the session key. If none is found, it
will be treated as if a signature was not verified.
public EncryptedKeyExServer(DecryptionKey decryptKey)
key to decrypt the session key sent to it by the
client.| Method Detail |
public Key sessionKey()
null otherwise.sessionKey in interface InterKeyExServerpublic boolean completed()
completed in interface InterProtocolServerpublic int maxMessageSize()
maxMessageSize in interface InterProtocolServer
public byte[] message(byte[] received)
throws CryptoProtocolException
process one message from the client. Since this protocol only requires a single message to be sent from the client to the server with no answer, the message method returns null and can be called independently, any number of times.
message in interface InterProtocolServerCryptoProtocolException - if a problem arises with the protocol.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Copyright (c) 1997-2001 Logi Ragnarsson - Distributed under the GPL