|
||||||||||
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.EncryptedKeyEx
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.
EncryptedKeyExClient
,
SignatureKey
,
CipherKey
,
HashState.setDefaultHashFunction(java.lang.String)
Field Summary | |
protected Seedable |
seedMe
|
Fields inherited from class org.logi.crypto.protocols.EncryptedKeyEx |
key, keyDecided, sessionKey, signKey |
Fields inherited from class org.logi.crypto.Crypto |
BIT, cdsPath, EMPTY_ARRAY, FOUR, keySource, NIBBLE, ONE, primeCertainty, random, TWO, ZERO |
Constructor Summary | |
EncryptedKeyExServer(CipherKey key)
Creates a new EncryptedKeyExchangeServer object. |
|
EncryptedKeyExServer(CipherKey key,
SignatureKey verifyKey)
Creates a new EncryptedKeyExchangeServer object. |
|
EncryptedKeyExServer(CipherKey key,
SignatureKey verifyKey,
Seedable seedMe)
Creates a new EncryptedKeyExchangeServer object. |
Method Summary | |
byte[] |
message(byte[] received)
Get the next message in the protocol. |
Methods inherited from class org.logi.crypto.protocols.EncryptedKeyEx |
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.InterProtocolServer |
completed, maxMessageSize |
Methods inherited from interface org.logi.crypto.protocols.InterKeyExServer |
sessionKey |
Field Detail |
protected Seedable seedMe
Constructor Detail |
public EncryptedKeyExServer(CipherKey key)
key
to decrypt the session key sent to it by the
client.
public EncryptedKeyExServer(CipherKey key, SignatureKey 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(CipherKey key, SignatureKey verifyKey, Seedable seedMe)
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.
If seedMe
is not null
, then any messages
recieved which may contain random numbers from the server will
be added to this objects entropy pool.
Method Detail |
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 InterProtocolServer
CryptoProtocolException
- if a problem arises with the protocol.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |