Added crypto information to protocol (fixes #17).

This commit is contained in:
Felix Ableitner 2015-07-23 01:40:39 +02:00
parent 9bb5870344
commit 212bb8beba

View file

@ -26,13 +26,37 @@ address as hash. Additionally, nodes MUST NOT connect to a node with
either address.
Crypto
------
Every node has a 4096 RSA key pair that is used for message signing
and encryption.
All messages are signed with 'SHA256withRSA'. The signature is written
to the 'Encryption Data' part.
Content messages are encrypted using a random 256 bit AES key. The
key is then wrapped using RSA with the sender's private key, and
written to the 'Encryption Data' part.
The node address is the output of 'SHA-256' on the private key.
Routing
-------
A simple flood routing protocol is currently used. Every node forwards all messages, unless a message with the same Origin and Sequence Number has already been received.
A simple flood routing protocol is currently used. Every node forwards
all messages, unless a message with the same Origin and Sequence Number
has already been received.
Nodes MUST store pairs of (Origin, Sequence Number) for all received messages. After receiving a new message, entries with the same Origin and Sequence Number between _received_ + 1 and _received_ + 32767 MUST be removed (with a wrap around at the maximum value). The entries MUST NOT be cleared while the program is running. They MAY be cleared when the program is exited.
Nodes MUST store pairs of (Origin, Sequence Number) for all received
messages. After receiving a new message, entries with the same Origin
and Sequence Number between _received_ + 1 and _received_ + 32767 MUST
be removed (with a wrap around at the maximum value). The entries MUST
NOT be cleared while the program is running. They MAY be cleared when
the program is exited.
There is currently no support for offline messages. If sender and receiver are not in the same mesh, the message will not arrive.
There is currently no support for offline messages. If sender and
receiver are not in the same mesh, the message will not arrive.
Nodes are free implement different routing algorithms.