Rice Pastry API

org.mpisws.p2p.transport.peerreview.audit
Class EvidenceToolImpl<Handle extends RawSerializable,Identifier extends RawSerializable>

java.lang.Object
  extended by org.mpisws.p2p.transport.peerreview.audit.EvidenceToolImpl<Handle,Identifier>
All Implemented Interfaces:
EvidenceTool<Handle,Identifier>, PeerReviewConstants, StatusConstants

public class EvidenceToolImpl<Handle extends RawSerializable,Identifier extends RawSerializable>
extends java.lang.Object
implements EvidenceTool<Handle,Identifier>


Field Summary
 
Fields inherited from interface org.mpisws.p2p.transport.peerreview.PeerReviewConstants
AUTH_CACHE_INTERVAL, CERT_MISSING, CHAL_AUDIT, CHAL_SEND, DEFAULT_AUDIT_INTERVAL_MILLIS, DEFAULT_AUTH_PUSH_INTERVAL_MILLIS, DEFAULT_CHECKPOINT_INTERVAL_MILLIS, DEFAULT_LOG_DOWNLOAD_TIMEOUT, DEFAULT_TIME_TOLERANCE_MILLIS, EVT_ACK, EVT_CHECKPOINT, EVT_CHOOSE_Q, EVT_CHOOSE_RAND, EVT_INIT, EVT_MAX_RESERVED, EVT_MAX_SOCKET_EVT, EVT_MIN_SOCKET_EVT, EVT_RECV, EVT_SEND, EVT_SENDSIGN, EVT_SIGN, EVT_SOCKET_CAN_READ, EVT_SOCKET_CAN_RW, EVT_SOCKET_CAN_WRITE, EVT_SOCKET_CLOSE, EVT_SOCKET_CLOSED, EVT_SOCKET_EXCEPTION, EVT_SOCKET_OPEN_INCOMING, EVT_SOCKET_OPEN_OUTGOING, EVT_SOCKET_OPENED_OUTGOING, EVT_SOCKET_READ, EVT_SOCKET_SHUTDOWN_OUTPUT, EVT_SOCKET_WRITE, EVT_VRF, EX_TYPE_ClosedChannel, EX_TYPE_IO, EX_TYPE_Unknown, FLAG_FULL_MESSAGES_ALL, FLAG_FULL_MESSAGES_SENDER, FLAG_INCLUDE_CHECKPOINT, INVALID, INVESTIGATION_INTERVAL_MILLIS, MAINTENANCE_INTERVAL_MILLIS, MAX_ACTIVE_AUDITS, MAX_ACTIVE_INVESTIGATIONS, MAX_ENTRIES_BETWEEN_CHECKPOINTS, MAX_STATUS_INFO, MAX_WITNESSED_NODES, MSG_ACCUSATION, MSG_ACK, MSG_AUTHPUSH, MSG_AUTHREQ, MSG_AUTHRESP, MSG_CHALLENGE, MSG_RESPONSE, MSG_USERDATA, MSG_USERDGRAM, NO_CERTIFICATE, PROGRESS_INTERVAL_MILLIS, PROOF_INCONSISTENT, PROOF_NONCONFORMANT, RESP_AUDIT, RESP_SEND, SIGNATURE_BAD, SIGNATURE_OK, STATE_SEND_AUDIT, STATE_WAIT_FOR_LOG, TI_AUTH_PUSH, TI_CHECKPOINT, TI_MAINTENANCE, TI_MAKE_PROGRESS, TI_MAX_RESERVED, TI_START_AUDITS, TI_STATUS_INFO, VALID
 
Fields inherited from interface org.mpisws.p2p.transport.peerreview.StatusConstants
STATUS_EXPOSED, STATUS_SUSPECTED, STATUS_TRUSTED
 
Constructor Summary
EvidenceToolImpl(PeerReview<Handle,Identifier> peerreview, Serializer<Handle> handleSerializer, Serializer<Identifier> idSerializer, int hashSize, int signatureSize)
           
 
Method Summary
 Tuple<java.lang.Integer,Identifier> checkSnippet(LogSnippet snippet)
          1) is the log snippet well-formed, i.e.
 boolean checkSnippetSignatures(LogSnippet snippet, Handle subjectHandle, AuthenticatorStore<Identifier> authStoreOrNull, byte flags, CommitmentProtocol<Handle,Identifier> commitmentProtocol, byte[] keyNodeHash, long keyNodeMaxSeq)
          The following method does several things: It verifies all the signatures in a log snippet, it extracts all the authenticators for later forwarding to the corresponding witnesses, and it delivers any new messages to the local node that may be in the snippet (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvidenceToolImpl

public EvidenceToolImpl(PeerReview<Handle,Identifier> peerreview,
                        Serializer<Handle> handleSerializer,
                        Serializer<Identifier> idSerializer,
                        int hashSize,
                        int signatureSize)
Method Detail

checkSnippet

public Tuple<java.lang.Integer,Identifier> checkSnippet(LogSnippet snippet)
1) is the log snippet well-formed, i.e. are the entries of the correct length, and do they have the correct format? 2) do we locally have the node certificate for each signature that occurs in the snippet? if the former doesn't hold, it returns INVALID if the latter doesn't hold, it returns CERT_MISSING, and returns the nodeID of the node whose certificate we need to request

Specified by:
checkSnippet in interface EvidenceTool<Handle extends RawSerializable,Identifier extends RawSerializable>
Returns:
VALID|INVALID|CERT_MISSING, missingCertID

checkSnippetSignatures

public boolean checkSnippetSignatures(LogSnippet snippet,
                                      Handle subjectHandle,
                                      AuthenticatorStore<Identifier> authStoreOrNull,
                                      byte flags,
                                      CommitmentProtocol<Handle,Identifier> commitmentProtocol,
                                      byte[] keyNodeHash,
                                      long keyNodeMaxSeq)
The following method does several things: It verifies all the signatures in a log snippet, it extracts all the authenticators for later forwarding to the corresponding witnesses, and it delivers any new messages to the local node that may be in the snippet (e.g. after an investigation)

Specified by:
checkSnippetSignatures in interface EvidenceTool<Handle extends RawSerializable,Identifier extends RawSerializable>

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection