Agent System POND 1.0 (1.7.2000)

Class ChallengeIdentityMessage

Direct Known Subclasses:
AcceptAndReplyChallengeMessage, ProveIdentityMessage

public class ChallengeIdentityMessage
extends Message

A message to initiate a mutual authentication. The length of the challenges is restricted to 16 bytes. Otherwise it would be possible to submit certain data and let the computer sign it without knowing its content. To avoid this, also some bytes are inserted (which hopefully destroy any normal meaning!). The bytes must be matching in the method replyToChallenge of AgentBase.

1.0, 1.7.2000
Michael Sonntag
See Also:
URL, URLStreamHandler, AgentBase, Message, AcceptAndReplyChallengeMessage, ProveIdentityMessage, Serialized Form

Field Summary
protected  byte[] challenge
          Our own challenge to the other host
protected  byte[] signed_challenge
          Our own signature on the challenge from the other host
Fields inherited from class PkgAgentSystem.Messaging.Message
addressee, convTypeID, destConvID, sender, srcConvID
Constructor Summary
ChallengeIdentityMessage(Message msg, AgentIdentity ownID, long convID)
          Create a new ChallengeIdentityMessage to start mutual authentication.
Method Summary
 boolean checkChallenge(PublicKey pubKey, byte[] original_challenge)
          Verify the signed challenge returned from the other agent.
 byte[] createChallenge()
          Create a new challenge of the 16 bytes.
Methods inherited from class PkgAgentSystem.Messaging.Message
copy, getAddressee, getConversationTypeID, getDestConversationID, getSender, getSrcConversationID, setDestConversationID, setSrcConversationID, toString
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail


protected byte[] challenge
Our own challenge to the other host


protected byte[] signed_challenge
Our own signature on the challenge from the other host
Constructor Detail


public ChallengeIdentityMessage(Message msg,
                                AgentIdentity ownID,
                                long convID)
Create a new ChallengeIdentityMessage to start mutual authentication. Is sent in reply to the message provided as parameter.
msg - the msg to create a reply to
ownID - identity of the local agent (if null, addressee of the message used)
convID - conversation ID (if 0, ID of the message used)
See Also:
Method Detail


public byte[] createChallenge()
Create a new challenge of the 16 bytes.
the challenge created (for storing the original challenge for verifying the returned signature)


public boolean checkChallenge(PublicKey pubKey,
                              byte[] original_challenge)
Verify the signed challenge returned from the other agent. This is successful, if the signature can be verified with the provided public key and the original challenge.
pubKey - the public key used to verify the signature
original_challenge - the original challenge
true if the challenge was answered successfully

Agent System POND 1.0 (1.7.2000)

Submit a bug

Copyright 2000 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.