Mixes for Privacy and Anonymity in the Internet
|
Public Member Functions | |
CAMiddleMix () | |
virtual | ~CAMiddleMix () |
tMixType | getType () const |
Public Member Functions inherited from CAMixWithReplayDB | |
CAMixWithReplayDB () | |
CADatabase * | getReplayDB () const |
Public Member Functions inherited from CAMix | |
CAMix () | |
virtual | ~CAMix () |
SINT32 | start () |
virtual SINT32 | reconfigure () |
virtual void | shutDown () |
virtual bool | isShutDown () |
SINT32 | getMixCascadeInfo (XERCES_CPP_NAMESPACE::DOMDocument *&docMixCascadeInfo) |
Returns the Mix-Cascade info which should be send to the InfoService. More... | |
bool | acceptsReconfiguration () |
CAControlChannelDispatcher * | getDownstreamControlChannelDispatcher () const |
CAControlChannelDispatcher * | getUpstreamControlChannelDispatcher () const |
UINT32 | getLastConnectionTime () |
bool | isConnected () |
Protected Attributes | |
CAMuxSocket * | m_pMuxIn |
CAMuxSocket * | m_pMuxOut |
CAQueue * | m_pQueueSendToMixBefore |
CAQueue * | m_pQueueSendToMixAfter |
UINT32 | m_u32KeepAliveRecvInterval2 |
UINT32 | m_u32KeepAliveSendInterval2 |
Protected Attributes inherited from CAMixWithReplayDB | |
CADatabase * | m_pReplayDB |
CAReplayCtrlChannelMsgProc * | m_pReplayMsgProc |
Protected Attributes inherited from CAMix | |
volatile bool | m_bLoop |
bool | m_bReconfiguring |
volatile bool | m_bShutDown |
CAMultiSignature * | m_pMultiSignature |
CAInfoService * | m_pInfoService |
UINT32 | m_u32KeepAliveRecvInterval |
UINT32 | m_u32KeepAliveSendInterval |
bool | m_acceptReconfiguration |
volatile bool | m_bConnected |
volatile UINT32 | m_lLastConnectionTime |
XERCES_CPP_NAMESPACE::DOMDocument * | m_docMixCascadeInfo |
CAControlChannelDispatcher * | m_pMuxOutControlChannelDispatcher |
CAControlChannelDispatcher * | m_pMuxInControlChannelDispatcher |
Private Member Functions | |
SINT32 | loop () |
Processes Upstream-MixPackets. More... | |
SINT32 | init () |
SINT32 | initOnce () |
SINT32 | clean () |
SINT32 | connectToNextMix (CASocketAddr *a_pAddrNext) |
SINT32 | putMixPacketIntoQueueSendToMixBefore (tPoolEntry *pPoolEntry) |
virtual SINT32 | initMixCascadeInfo (DOMElement *) |
This method is not applicable to middle mixes; it does nothing. More... | |
virtual SINT32 | processKeyExchange () |
Processes key exchange with Mix n+1 and Mix n-1. More... | |
int | accessSharedMemory (int semId, tPoolEntry *destination, tPoolEntry *source) |
Private Attributes | |
CAASymCipher * | m_pRSA |
volatile bool | m_bRun |
CAMiddleMixChannelList * | m_pMiddleMixChannelList |
const char * | upstreamMemoryPreName ="upstreamshmempre" |
const char * | upstreamMemoryPostName ="upstreamshmempost" |
const char * | downstreamMemoryPreName ="downstreamshmempre" |
const char * | downstreamMemoryPostName ="downstreamshmempost" |
void * | upstreamPreBuffer |
void * | upstreamPostBuffer |
void * | downstreamPreBuffer |
void * | downstreamPostBuffer |
int | upstreamSemPreId |
int | upstreamSemPostId |
int | downstreamSemPreId |
int | downstreamSemPostId |
bool | m_bShMemConfigured |
Friends | |
THREAD_RETURN | mm_loopSendToMixBefore (void *) |
DOWNSTREAM (to Client) Take the packets from the Queue and write them to the Socket. More... | |
THREAD_RETURN | mm_loopSendToMixAfter (void *) |
UPSTREAM (to WEB) Take the packets from the Queue and write them to the Socket. More... | |
THREAD_RETURN | mm_loopReadFromMixBefore (void *) |
THREAD_RETURN | mm_loopReadFromMixAfter (void *) |
Additional Inherited Members | |
Public Types inherited from CAMix | |
enum | tMixType { FIRST_MIX , MIDDLE_MIX , LAST_MIX , JAP } |
Public Attributes inherited from CAMixWithReplayDB | |
UINT64 | m_u64ReferenceTime |
Static Public Attributes inherited from CAMix | |
static const UINT32 | TIMEOUT_MIX_CONNECTION_ESTABLISHEMENT = 60000 |
Protected Member Functions inherited from CAMix | |
SINT32 | checkCompatibility (DOMNode *a_parent, const char *a_mixPosition) |
SINT32 | appendCompatibilityInfo (DOMNode *a_parent) |
SINT32 | addMixInfo (DOMNode *a_element, bool a_bForceFirstNode) |
SINT32 | signXML (DOMNode *a_element) |
CAMiddleMix::CAMiddleMix | ( | ) |
|
virtual |
References clean().
|
private |
|
privatevirtual |
New SGX
Implements CAMix.
References CAMuxSocket::close(), downstreamMemoryPostName, downstreamMemoryPreName, downstreamSemPostId, downstreamSemPreId, E_SUCCESS, CAMix::m_bShutDown, m_pMiddleMixChannelList, m_pMuxIn, m_pMuxOut, m_pQueueSendToMixAfter, m_pQueueSendToMixBefore, CAMixWithReplayDB::m_pReplayMsgProc, m_pRSA, CAMsg::printMsg(), upstreamMemoryPostName, upstreamMemoryPreName, upstreamSemPostId, and upstreamSemPreId.
Referenced by ~CAMiddleMix().
|
private |
References CAMuxSocket::connect(), E_SUCCESS, E_UNKNOWN, ERR_INTERN_CONNREFUSED, ERR_INTERN_TIMEDOUT, GET_NET_ERROR, GET_NET_ERROR_STR, m_pMuxOut, CAMsg::printMsg(), RETRIES, RETRYTIME, sSleep(), and CASocketAddr::toString().
Referenced by init().
|
virtual |
Implements CAMix.
References CAMix::MIDDLE_MIX.
|
privatevirtual |
Connect to next mix
Implements CAMix.
References CAMuxSocket::accept(), CATargetInterface::cleanAddr(), connectToNextMix(), CASocket::create(), downstreamMemoryPostName, downstreamMemoryPreName, downstreamPostBuffer, downstreamPreBuffer, downstreamSemPostId, downstreamSemPreId, E_SUCCESS, E_UNKNOWN, ev_net_nextConnected, ev_net_prevConnected, ev_net_prevConnectionClosed, FM_PACKET_STATS_LOG_INTERVALL, CAASymCipher::generateKeyPair(), CAListenerInterface::getAddr(), CATargetInterface::getAddr(), CAMuxSocket::getCASocket(), CACmdLnOptions::getListenerInterface(), CACmdLnOptions::getListenerInterfaceCount(), CALibProxytest::getOptions(), CACmdLnOptions::getTargetInterface(), CACmdLnOptions::getTargetInterfaceCount(), CATargetInterface::getTargetType(), CASocketAddr::getType(), CAListenerInterface::isVirtual(), m_bShMemConfigured, m_pMiddleMixChannelList, m_pMuxIn, CAMix::m_pMuxInControlChannelDispatcher, m_pMuxOut, m_pQueueSendToMixAfter, m_pQueueSendToMixBefore, CAMixWithReplayDB::m_pReplayDB, CAMixWithReplayDB::m_pReplayMsgProc, m_pRSA, CAMixWithReplayDB::m_u64ReferenceTime, MIXPACKET_SIZE, MONITORING_FIRE_NET_EVENT, OFB, CAMsg::printMsg(), processKeyExchange(), readFile(), REPLAY_TIMESTAMP_PROPAGATION_INTERVALL, saveFile(), CASocket::setKeepAlive(), CAASymCipher::setPublicKeyAsXML(), CASocket::setRecvBuff(), CASocket::setSendBuff(), CADatabase::start(), CAReplayCtrlChannelMsgProc::startTimeStampPorpagation(), TARGET_MIX, CASocketAddr::toString(), upstreamMemoryPostName, upstreamMemoryPreName, upstreamPostBuffer, upstreamPreBuffer, upstreamSemPostId, and upstreamSemPreId.
|
privatevirtual |
|
privatevirtual |
Reimplemented from CAMix.
References E_SUCCESS, E_UNKNOWN, CACmdLnOptions::getMultiSigner(), CALibProxytest::getOptions(), CAMix::m_pMultiSignature, and CAMsg::printMsg().
|
privatevirtual |
Processes Upstream-MixPackets.
Implements CAMix.
References CAMuxSocket::close(), E_UNKNOWN, CAThread::join(), m_bRun, m_pMuxIn, m_pMuxOut, mm_loopReadFromMixAfter, mm_loopReadFromMixBefore, mm_loopSendToMixAfter, mm_loopSendToMixBefore, CAMsg::printMsg(), CAMuxSocket::setCrypt(), CAThread::setMainLoop(), and CAThread::start().
|
privatevirtual |
Processes key exchange with Mix n+1 and Mix n-1.
E_SUCCESS | if KeyExchange with Mix n+1 and Mix n-1 was succesful |
E_UNKNOWN | otherwise |
Getting the KeepAlive Traffice...
Getting and calculating the KeepAlive Traffice...
Implements CAMix.
References CAMix::addMixInfo(), CAMix::appendCompatibilityInfo(), 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, max, MONITORING_FIRE_NET_EVENT, parseDOMDocument(), CAMsg::printMsg(), CAMuxSocket::receiveFully(), CASocket::send(), setDOMElementAttribute(), setDOMElementValue(), CACmdLnOptions::setNextMixTestCertificate(), CACmdLnOptions::setPrevMixTestCertificate(), CAASymCipher::setPublicKeyAsDOMNode(), CAMuxSocket::setReceiveKey(), CAMuxSocket::setSendKey(), CAMix::signXML(), CAMultiSignature::signXML(), CAMix::TIMEOUT_MIX_CONNECTION_ESTABLISHEMENT, CACertStore::verifyMixCert(), and CAMultiSignature::verifyXML().
Referenced by init().
|
private |
References CAQueue::add(), E_SUCCESS, and m_pQueueSendToMixBefore.
|
friend |
SGX MIX locksem(downstreamSemPreId, SN_EMPTY); memcpy(downstreamPreBuffer,pPoolEntry, sizeof(tPoolEntry)); unlocksem(downstreamSemPreId, SN_FULL);
locksem(downstreamSemPostId, SN_FULL); memcpy(pPoolEntry,downstreamPostBuffer, sizeof(tPoolEntry)); unlocksem(downstreamSemPostId, SN_EMPTY); getRandom(pMixPacket->data,DATA_SIZE);
SGX MIX locksem(pMix->downstreamSemPreId, SN_EMPTY); memcpy(pMix->downstreamPreBuffer,pPoolEntry, sizeof(tPoolEntry)); unlocksem(pMix->downstreamSemPreId, SN_FULL);
locksem(pMix->downstreamSemPostId, SN_FULL); memcpy(pPoolEntry,pMix->downstreamPostBuffer, sizeof(tPoolEntry)); unlocksem(pMix->downstreamSemPostId, SN_EMPTY);
Referenced by loop().
|
friend |
Referenced by loop().
|
friend |
UPSTREAM (to WEB) Take the packets from the Queue and write them to the Socket.
Referenced by loop().
|
friend |
DOWNSTREAM (to Client) Take the packets from the Queue and write them to the Socket.
Referenced by loop().
|
private |
|
private |
|
private |
Referenced by init().
|
private |
Referenced by init().
|
private |
Referenced by loop().
|
private |
Referenced by CAMiddleMix(), and init().
|
private |
Referenced by CAMiddleMix(), clean(), and init().
|
protected |
Referenced by CAMiddleMix(), clean(), init(), loop(), and processKeyExchange().
|
protected |
Referenced by CAMiddleMix(), clean(), connectToNextMix(), init(), loop(), and processKeyExchange().
|
protected |
Referenced by CAMiddleMix(), clean(), and init().
|
protected |
Referenced by CAMiddleMix(), clean(), init(), and putMixPacketIntoQueueSendToMixBefore().
|
private |
Referenced by CAMiddleMix(), clean(), init(), and processKeyExchange().
|
protected |
Referenced by processKeyExchange().
|
protected |
Referenced by processKeyExchange().
|
private |
|
private |
|
private |
Referenced by CAMiddleMix(), and init().
|
private |
Referenced by CAMiddleMix(), and init().