Mixes for Privacy and Anonymity in the Internet
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends
CAMiddleMix Class Reference
Inheritance diagram for CAMiddleMix:
CAMixWithReplayDB CAMix

List of all members.

Public Member Functions

 CAMiddleMix ()
virtual ~CAMiddleMix ()
tMixType getType () const

Protected Attributes

CAQueuem_pQueueSendToMixBefore
CAQueuem_pQueueSendToMixAfter
UINT32 m_u32KeepAliveRecvInterval2
UINT32 m_u32KeepAliveSendInterval2

Private Member Functions

SINT32 loop ()
 Processes Upstream-MixPackets.
SINT32 init ()
SINT32 initOnce ()
SINT32 clean ()
SINT32 connectToNextMix (CASocketAddr *a_pAddrNext)
virtual SINT32 initMixCascadeInfo (DOMElement *&)
 This method is not applicable to middle mixes; it does nothing.
virtual SINT32 processKeyExchange ()
 Processes key exchange with Mix n+1 and Mix n-1.

Private Attributes

CAMuxSocketm_pMuxIn
CAMuxSocketm_pMuxOut
CAASymCipherm_pRSA
volatile bool m_bRun
CAMiddleMixChannelListm_pMiddleMixChannelList

Friends

THREAD_RETURN mm_loopSendToMixBefore (void *)
 DOWNSTREAM (to Client) Take the packets from the Queue and write them to the Socket.
THREAD_RETURN mm_loopSendToMixAfter (void *)
 UPSTREAM (to WEB) Take the packets from the Queue and write them to the Socket.
THREAD_RETURN mm_loopReadFromMixBefore (void *)
THREAD_RETURN mm_loopReadFromMixAfter (void *)
THREAD_RETURN mm_loopDownStream (void *)

Constructor & Destructor Documentation

virtual CAMiddleMix::~CAMiddleMix ( ) [virtual]

References clean().


Member Function Documentation

SINT32 CAMiddleMix::clean ( ) [private, virtual]
SINT32 CAMiddleMix::connectToNextMix ( CASocketAddr a_pAddrNext) [private]
tMixType CAMiddleMix::getType ( ) const [virtual]

Implements CAMix.

References CAMix::MIDDLE_MIX.

SINT32 CAMiddleMix::init ( ) [private, virtual]
virtual SINT32 CAMiddleMix::initMixCascadeInfo ( DOMElement *&  ) [private, virtual]

This method is not applicable to middle mixes; it does nothing.

Parameters:
dignored
Return values:
E_SUCCESSin any case

References E_SUCCESS.

SINT32 CAMiddleMix::initOnce ( ) [private, virtual]
SINT32 CAMiddleMix::loop ( ) [private, virtual]
SINT32 CAMiddleMix::processKeyExchange ( ) [private, virtual]

Processes key exchange with Mix n+1 and Mix n-1.

  • Step 1: Opens TCP/IP-Connection to Mix n+1.
  • Step 2: Receives info about Mix n+1 .. LastMix as XML struct (see XML struct)
  • Step 3: Verfies signature, generates symetric Keys used for link encryption with Mix
    +1.
  • Step 4: Sends symetric Key to Mix n+1, encrypted with PubKey of Mix n+1 (see XML struct)
  • Step 5: Sends info about Mix n .. LastMix as XML struct (see XML struct)to Mix n-1
  • Step 6: Recevies symetric Key used for link encrpytion with Mix n-1 (see XML struct)
Return values:
E_SUCCESSif KeyExchange with Mix n+1 and Mix n-1 was succesful
E_UNKNOWNotherwise

Getting the KeepAlive Traffice...

Getting and calculating the KeepAlive Traffice...

Implements CAMix.

References CAMix::addMixInfo(), CAMix::appendCompatibilityInfo(), CAMix::appendTermsAndConditionsExtension(), CAMix::checkCompatibility(), createDOMDocument(), createDOMElement(), CABase64::decode(), decodeXMLEncryptedKey(), DOM_Output::dumpToMem(), E_SUCCESS, E_UNKNOWN, CABase64::encode(), encodeXMLEncryptedKey(), equals(), ev_net_keyExchangeNextFailed, ev_net_keyExchangeNextSuccessful, ev_net_keyExchangePrevFailed, ev_net_keyExchangePrevSuccessful, GET_NET_ERROR, GET_NET_ERROR_STR, CAMuxSocket::getCASocket(), getDOMChildByName(), getDOMElementAttribute(), getDOMElementValue(), CACmdLnOptions::getKeepAliveRecvInterval(), CACmdLnOptions::getKeepAliveSendInterval(), CACmdLnOptions::getMixId(), CACmdLnOptions::getNextMixTestCertificate(), CALibProxytest::getOptions(), CACmdLnOptions::getPrevMixTestCertificate(), CAASymCipher::getPublicKeyAsDOMElement(), getRandom(), CACmdLnOptions::getTrustedCertificateStore(), len, CAMix::m_pMultiSignature, m_pMuxIn, m_pMuxOut, m_pRSA, CAMix::m_u32KeepAliveRecvInterval, m_u32KeepAliveRecvInterval2, CAMix::m_u32KeepAliveSendInterval, m_u32KeepAliveSendInterval2, MONITORING_FIRE_NET_EVENT, parseDOMDocument(), CAMsg::printMsg(), CAMuxSocket::receiveFully(), CASocket::send(), setDOMElementAttribute(), setDOMElementValue(), CACmdLnOptions::setNextMixTestCertificate(), CACmdLnOptions::setPrevMixTestCertificate(), CAASymCipher::setPublicKeyAsDOMNode(), CAMuxSocket::setReceiveKey(), CAMuxSocket::setSendKey(), CAMultiSignature::signXML(), CAMix::signXML(), CAMix::termsAndConditionsInfoNode(), CAMix::TIMEOUT_MIX_CONNECTION_ESTABLISHEMENT, CACertStore::verifyMixCert(), CACmdLnOptions::verifyMixCertificates(), and CAMultiSignature::verifyXML().

Referenced by init().


Friends And Related Function Documentation

THREAD_RETURN mm_loopDownStream ( void *  ) [friend]
THREAD_RETURN mm_loopReadFromMixAfter ( void *  param) [friend]

Referenced by loop().

THREAD_RETURN mm_loopReadFromMixBefore ( void *  param) [friend]

Referenced by loop().

THREAD_RETURN mm_loopSendToMixAfter ( void *  param) [friend]

UPSTREAM (to WEB) Take the packets from the Queue and write them to the Socket.

Referenced by loop().

THREAD_RETURN mm_loopSendToMixBefore ( void *  param) [friend]

DOWNSTREAM (to Client) Take the packets from the Queue and write them to the Socket.

Referenced by loop().


Member Data Documentation

volatile bool CAMiddleMix::m_bRun [private]

Referenced by processKeyExchange().