Security Overview
Eugene Pankov edited this page Aug 26, 2013
·
3 revisions
The network consists of the following participants:
- Nodes form a storage mesh, providing storage space for encrypted Packages. Packages are completely opaque to the nodes themselves. Node only knows an RSA public key of the Package's recipient and a holds an encrypted blob of Package's data.
- Each Client possesses a RSA key pair and public keys of the known contacts. Clients exchange public keys openly, using e-mail or PKI to become known to each other and start communication.
Alice sends a message to Bob:
Prerequisites: both Alice and Bob know each other's public RSA keys and an address of at least one Node (Alice and Bob don't have to know address of the same node).
- Alice generates an RSASSA-PSS signature of the message content and creates a Payload, which includes
[content, timestamp, signature, alice_public_key]
. - Alice generates a random key and IV for AES-256-CBC algorithm and encrypts her Payload.
- Alice encrypts her AES key and IV using Bob's public RSA key and creates a Package object, which includes
[aes_encrypted_blob, rsa_encrypted_aes_key, rsa_encrypted_aes_iv, bob_public_key]
. - Alice sends the Package to a Node A she knows.
- Node A stores the Package and distributes a Message Listing to other nodes. The listing includes
[node_a_address, message_id, bob_public_key]
. - Bob contacts Node B to retrieve new messages.
- Bob sends his public RSA key to Node B.
- Node B generates a random sequence, encrypts it with Bob's public RSA key, and sends it to Bob.
- Bob uses his private RSA key to decrypt the sequence, and sends it back, thus proving his ownership of the paired private key.
- Node compares the sequences and acknowledges Bob as the key's owner.
- Node looks up Message Listings which contain Bob's public key, and sends them to Bob.
- Bob uses the
node_a_address
from the listing to connect to Node A. - Bob and Node A repeat steps 8-10 to authenticate Bob at Node A.
- Bob requests a message using
message_id
from the Message Listing. - Node A sends provides stored Package to Bob and deletes the message from its storage, notifying other nodes of this.
- Bob uses his private RSA key to decrypt AES key and IV from the Package.
- Bob uses the key and IV to decrypt the Payload from the Package.
- If the signature is present, Bob looks for the matching public key in his contact list, and then uses it to verify the signature of the message content.