﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.ucis.nl/index.php?action=history&amp;feed=atom&amp;title=Peer2Cloud</id>
	<title>Peer2Cloud - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.ucis.nl/index.php?action=history&amp;feed=atom&amp;title=Peer2Cloud"/>
	<link rel="alternate" type="text/html" href="http://wiki.ucis.nl/index.php?title=Peer2Cloud&amp;action=history"/>
	<updated>2026-04-26T06:07:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>http://wiki.ucis.nl/index.php?title=Peer2Cloud&amp;diff=142&amp;oldid=prev</id>
		<title>Admin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.ucis.nl/index.php?title=Peer2Cloud&amp;diff=142&amp;oldid=prev"/>
		<updated>2022-11-09T14:49:53Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:49, 9 November 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>http://wiki.ucis.nl/index.php?title=Peer2Cloud&amp;diff=141&amp;oldid=prev</id>
		<title>Admin at 02:49, 4 December 2010</title>
		<link rel="alternate" type="text/html" href="http://wiki.ucis.nl/index.php?title=Peer2Cloud&amp;diff=141&amp;oldid=prev"/>
		<updated>2010-12-04T02:49:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== Design decisions ===&lt;br /&gt;
# Route discovery on demand, instead of route announcements&lt;br /&gt;
# Explicit per packet, source specified route&lt;br /&gt;
# End to end NaCl encryption&lt;br /&gt;
# Loop detection based on NaCl public keys&lt;br /&gt;
# Supports many different types of addresses and protocols, including IPv4 and IPv6&lt;br /&gt;
&lt;br /&gt;
=== Other features ===&lt;br /&gt;
* Cheap source specified routing (just one byte per hop)&lt;br /&gt;
* Optional load balancing over multiple routes (will also reduce the impact of a failing route)&lt;br /&gt;
* Broken routes are not detected, and thus not used (the discovery has to travel the entire path in both directions)&lt;br /&gt;
* Allows for meshes of any form to be built&lt;br /&gt;
* No &amp;quot;broadcast&amp;quot; traffic resulting from route announcements&lt;br /&gt;
* No more ghost routes&lt;br /&gt;
* Actual network topology is mostly hidden from anybody in the network&lt;br /&gt;
* Individual IP addresses are authenticated using NaCl public key cryptography&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
* Maximum of 255 hops&lt;br /&gt;
* Need for broadcasts for route discovery&lt;br /&gt;
* Discovery packets are rather large&lt;br /&gt;
* Data broadcast packets tend to get rather large because of the key based loop detection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Protocol spec (alpha version) ===&lt;br /&gt;
&lt;br /&gt;
P2P cloud protocol&lt;br /&gt;
&lt;br /&gt;
* After a Resource Discovery, the IP address and remote private key are cached&lt;br /&gt;
* During renewals, the lookup targets the remote private key, the IP address is not queried again&lt;br /&gt;
* If multiple private keys announce the same IP address, the IP address should be blocked, until administrator intervention has occured&lt;br /&gt;
* Data packets may be encrypted end-to-end (recommended)&lt;br /&gt;
* Resource and path discovery packets have a small encrypted data field to verify authenticy of the key&lt;br /&gt;
* All packets may be encrypted between peers, but this is not required&lt;br /&gt;
* Resource lookups include IPv4 addresses, IPv6 addresses, IPX addresses, and other resources for which recurring communications are useful&lt;br /&gt;
* Actual data packets are routed as specified by the originator.&lt;br /&gt;
&lt;br /&gt;
Routes are specified using local peer ID numbers, these consist of 1 octet per peer, and are meaningful only to a specific node&lt;br /&gt;
* It's meaning is comparable to a port number on an ethernet switch&lt;br /&gt;
* A local peer ID must be unique within the context of one node&lt;br /&gt;
* A local peer ID should not be reused for another peer within a certain time interval&lt;br /&gt;
* A local peer may have multiple local peer IDs to hide the network topology&lt;br /&gt;
* A node may insert artificial peer IDs to hide the network topology, but this must be done sparingly!&lt;br /&gt;
* A node may insert additional peer IDs, if it has more than 255 peers, it can simply use two octets as a 16 bit integer, and pretend to be 2 nodes&lt;br /&gt;
* Route specifications for a certain path are usually different in both directions!&lt;br /&gt;
* The source of a route lookup may add a one or two octet session identifier, that it associates with the remote public key&lt;br /&gt;
&lt;br /&gt;
Packet type&lt;br /&gt;
# Resource discovery - origin resource, destination resource, trace, keys&lt;br /&gt;
# Route discovery - key, trace, keys&lt;br /&gt;
# Route confirmation - route, trace&lt;br /&gt;
# Route ping - route, trace, data&lt;br /&gt;
# Route pong - route, data&lt;br /&gt;
# Data - route, data&lt;br /&gt;
# Broadcast data - destination resource, keys&lt;br /&gt;
&lt;br /&gt;
Packet contents&lt;br /&gt;
* Flags / Type - Packet type code&lt;br /&gt;
* Origin resource (type, value) - Resource that originated a resource discovery&lt;br /&gt;
* Destination resource (type, value)- The resource to discover&lt;br /&gt;
* Key - The key to discover, or the key that was discovered in a resource discovery&lt;br /&gt;
* Route (length, values) - list of peer IDs (bytes), which specifies the intended route&lt;br /&gt;
* Trace (length, values) - list of peer IDs (bytes), which specifies the traced route (in a trace/discovery request)&lt;br /&gt;
* Keys (count, values) - list of unique keys to prevent loops (in broadcasts)&lt;br /&gt;
* Data&lt;br /&gt;
&lt;br /&gt;
Initializing communication with another node consists of a few steps:&lt;br /&gt;
# Path discovery, either:&lt;br /&gt;
## Resource discovery - if the remote public key is not known&lt;br /&gt;
## Path discovery - if the remote public key is known&lt;br /&gt;
# Reverse path confirmation&lt;br /&gt;
* Both ends cache the discovered paths, and should regularly verify the known paths (PING).&lt;br /&gt;
* Either end may at any time request a new path discovery, if it has insufficient routes, or simply to detect possibly faster/better paths.&lt;br /&gt;
&lt;br /&gt;
Resource discovery&lt;br /&gt;
# The initiator broadcasts a 'Resource discovery' packet to all it's peers&lt;br /&gt;
#* Type = resource discovery&lt;br /&gt;
#* Optional: Origin resource = initiator resource&lt;br /&gt;
#* Destination resource = resource to locate&lt;br /&gt;
#* Route = [ initiator session ID ]&lt;br /&gt;
#* Keys = [ initiator public key ]&lt;br /&gt;
# On reception, a node checks whether it serves the requested resource&lt;br /&gt;
## If so:&lt;br /&gt;
### It creates a session for the initiator public key (if it does not already exist)&lt;br /&gt;
### It adds the traced route to the list of routes for that session&lt;br /&gt;
### It sends a Reverse path confirmation via the traced route:&lt;br /&gt;
###* Type = route confirmation&lt;br /&gt;
###* Origin resource = located resource&lt;br /&gt;
###* Key = located public key&lt;br /&gt;
###* Route = [ local session ID ]&lt;br /&gt;
## If not:&lt;br /&gt;
### It checks whether it's key is listed in the Keys field, if so, the packet is discarded&lt;br /&gt;
### If the Route field has reached 255 entries, the packet is discarded&lt;br /&gt;
### It adds the local peer ID of the sending peer to the Route, and it's local key to Keys&lt;br /&gt;
### It broadcasts the packet to all of it's peers (except the sending peer)&lt;br /&gt;
### Step 2 repeats&lt;br /&gt;
&lt;br /&gt;
Path discovery&lt;br /&gt;
* This is used when looking for a public key.&lt;br /&gt;
* After a resource discovery, the located public key should be cached, and can be re-used in a path discovery.&lt;br /&gt;
* The procedure is very similar to the Resource discovery&lt;br /&gt;
&lt;br /&gt;
== Alternative less promiscuous protocol ==&lt;br /&gt;
 A sends to X:&lt;br /&gt;
 	A sends discovery to peers B and C, hopcount=1&lt;br /&gt;
 	B sends discovery to C and D, hopcount = 2&lt;br /&gt;
 	C sends discovery to B and D, hopcount = 2&lt;br /&gt;
 	C ignores discovery from B (higher hopcount)&lt;br /&gt;
 	B ignores discovery from C (higher hopcount)&lt;br /&gt;
 	D sends discovery to X (hopcount=3)&lt;br /&gt;
 	D ignores second discovery (time out)&lt;br /&gt;
 	X answers D (hopcount=1, return=4)&lt;br /&gt;
 	D answers B (hopcount=2, return=4), request from B arrived first with equal hopcount&lt;br /&gt;
 	B answers A (hopcount=3, return=4), request from A arrived with lowest hopcount&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>