Menu

Tree [r97] /
 History

HTTPS access


File Date Author Commit
 cryptplugins 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 easyzlib 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 qca-2.0.3 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 references 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 Doxygen 2010-12-07 pikeaero [r44] Added Doxygen file to the project.
 README 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 cconnector.cpp 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 cconnector.h 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 ccrypt.cpp 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 ccrypt.h 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 ccryptplugininterface.cpp 2010-12-05 pikeaero [r1] Initial Commit
 ccryptplugininterface.h 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 clistener.cpp 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 clistener.h 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 clogger.cpp 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 clogger.h 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 cnode.cpp 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 cnode.h 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 cnodemanager.cpp 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 cnodemanager.h 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 cpacket.cpp 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 cpacket.h 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 cpeersession.cpp 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 cpeersession.h 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 cresolversession.cpp 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 cresolversession.h 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 csession.cpp 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 csession.h 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 csessionmanager.cpp 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 csessionmanager.h 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 csettings.cpp 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 csettings.h 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 cwotsession.cpp 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 cwotsession.h 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 main.cpp 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 make-all.sh 2010-12-05 pikeaero [r6] modifications to top level project file
 qtdnsp2p.pro 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.
 qtdnsp2p.sql 2011-10-12 pikeaero [r97] Clean up repo. Add some reference docs.

Read Me

December 7th, 2010

QtDNSP2P http://sourceforge.net/projects/qtdnsp2p

It's designed to be a cross platform P2P DNS experimentation platform that will allow
experimenting with various trust based models, and various P2P topologies in order
to evaluate real world issues such as latency, enemy infiltration, and so on.
It utilizes a MySQL database backend in order to facilitate real-time data
monitoring and potentially controlling by external applications.

The object oriented design is intended to allow a developer to reconfigure
the P2P model and data models with relative ease comparing to an application
that is tightly bound to a particular mode of operation.

QtDNSP2P is an object oriented, cross platform, C++ framework utilizing a
cipher stream protected protocol between peers base on an RSA public key exchange.


Coding Standards
----------------
- 4 spaces per tab.
- Preserve tab characters.
- Horstmann coding style.
- Positive logic nesting.

Requirements
------------

Qt 4.x + dev headers.
MySQL (or similar)

Build
-----

cd easyzlib
qmake-qt4
make
cd ..

cd qca-2.0.3
qmake-qt4
make
sudo make install
cd ..

cd cryptplugins
qmake-qt4
make
cd ..

qmake-qt4
make


Install
-------

sudo mkdir /etc/qtdnsp2p
sudo mkdir /etc/qtdnsp2p/plugins
sudo cp cryptoplugins/*/*.so /etc/qtdnsp2p/plugins/

Database
--------

Currently hard coded to use QMYSQL backend.

File qtdnsp2p.sql contains the schema.
Use something like "mysql -u root -p < qtdnsp2p.sql" to prime the database.

These two tables control the instantiation of listener and connector objects during bootstrap:

tbl_listeners   - manages listeners.
tbl_connectors  - manages outbound connectors.

These tables are intended to be somewhat dynamic:

tbl_key         - storage for public and private keys
tbl_nodes       - nodes of interest

Setup
-----

** TODO: Simplify this ***
In mysql client, connect to database and modify
tbl_connectors and tbl_listeners to suite your boostrap environment.
tbl_connectors descripts which peers to initially try to peer with.
tbl_listeners describes how many and what ports to start listeners on.

Now you can also use ++bootstrap <addr>:<port> to add a bootstrap peer

--help for up to date listing of command line options.

Session
-------

Once a socket is created, either by a connector or by a listener, a session is instantiated and
the socket is passed to the new session instance for handling the connection.

Currently two types of sessions are supported, those which have to do with establishing trust and
routing, and those that have to do with resolving DNS queries.

A session runs as an independent thread of execution, and is destroyed once the socket connection
is severed.


Secure / Insecure Stream Protocol
---------------------------------

The stream communication is implemented as a cargo metaphore whereby the cargo map
dictionary is serialized into a known location in the packet stream. In order for secure
stream to start, the peers must initiate a public key exchange, challenge handshake, and
stream cipher negatioation to select an agreeable stream cypher from the available plugins.
Once secure stream begins, the packet handler begins passing input and output streams through
whichever stream cipher plugin was agreed on.

Peer Cipher Stream Handshake
----------------------------

'>' & '<' = cleartext
')' & '(' = ciphertext
'+' = packet cargo

Peer A connects to peer B:

	A >>>>>>>>>>> (tcp open) >>>>>>>>>>>>>>>>> B

	A >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> B
	   + ConnectionRequest
	   + Status(OK)
	   + A's Public Key
	   + A's Prefered Cipher

	A <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< B
						 + ConnectionReply
						 + Status(OK)
						 + B's Public Key
						 + B's Prefered Cipher

/* TODO: expand on the cipher negotiation protocol */

/* Once stream is secure, we establish a session and get to work... */

	A )))))))))))))))))))))))))))))))))))))))) B
	  + SessionRequest
	  + Status(OK)
	  + <parcel-data>

	A (((((((((((((((((((((((((((((((((((((((( B
						 + SessionReply
						 + Status(OK)
						 + <parcel-data>

	ETC..

	A (((((((((((((((((((((((((((((((((((((((( B
						 + SessionDisconnect
						 + Status(<reason>)

	/* B may initiate tcp close at this point */

	A )))))))))))))))))))))))))))))))))))))))) B
	  + ReplyDisconnect
	  + Status(OK)

	A <<<<<<<<<<<< (tcp close) <<<<<<<<<<<<<<< B

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.