org.logi.crypto.protocols
Class EncryptedKeyExServer
java.lang.Object
|
+--org.logi.crypto.Crypto
|
+--org.logi.crypto.protocols.EncryptedKeyEx
|
+--org.logi.crypto.protocols.EncryptedKeyExServer
- public class EncryptedKeyExServer
- extends EncryptedKeyEx
- implements NoninterKeyExServer
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.
- Author:
- Logi Ragnarsson
(logir@logi.org)
- See Also:
EncryptedKeyExClient,
SignatureKey,
CipherKey,
HashState.setDefaultHashFunction(java.lang.String)
| 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,
equal,
equalRelaxed,
equalSub,
fromHexNibble,
fromHexString,
fromString,
fromString,
hexString,
hexString,
hexString,
hexString,
hexString,
initRandom,
initRandom,
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 |
EncryptedKeyExServer
public EncryptedKeyExServer(CipherKey key)
- Creates a new EncryptedKeyExchangeServer object. It uses
key to decrypt the session key sent to it by the
client.
EncryptedKeyExServer
public EncryptedKeyExServer(CipherKey key,
SignatureKey verifyKey)
- Creates a new EncryptedKeyExchangeServer object. It uses
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.
EncryptedKeyExServer
public EncryptedKeyExServer(CipherKey key,
SignatureKey verifyKey,
Seedable seedMe)
- Creates a new EncryptedKeyExchangeServer object. It uses
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.
message
public byte[] message(byte[] received)
throws CryptoProtocolException
- Get the next message in the protocol.
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.
- Throws:
- CryptoProtocolException - if a problem arises with the protocol.
Copyright 1997-2000 Logi Ragnarsson