Security Overview - AtlasNet/Protocols Wiki

Architecture

The network consists of the following participants:

Message exchange

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).

  1. Alice generates an RSASSA-PSS signature of the message content and creates a Payload, which includes [content, timestamp, signature, alice_public_key].
  2. Alice generates a random key and IV for AES-256-CBC algorithm and encrypts her Payload.
  3. 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].
  4. Alice sends the Package to a Node A she knows.
  5. Node A stores the Package and distributes a Message Listing to other nodes. The listing includes [node_a_address, message_id, bob_public_key].
  6. Bob contacts Node B to retrieve new messages.
  7. Bob sends his public RSA key to Node B.
  8. Node B generates a random sequence, encrypts it with Bob's public RSA key, and sends it to Bob.
  9. Bob uses his private RSA key to decrypt the sequence, and sends it back, thus proving his ownership of the paired private key.
  10. Node compares the sequences and acknowledges Bob as the key's owner.
  11. Node looks up Message Listings which contain Bob's public key, and sends them to Bob.
  12. Bob uses the node_a_address from the listing to connect to Node A.
  13. Bob and Node A repeat steps 8-10 to authenticate Bob at Node A.
  14. Bob requests a message using message_id from the Message Listing.
  15. Node A sends provides stored Package to Bob and deletes the message from its storage, notifying other nodes of this.
  16. Bob uses his private RSA key to decrypt AES key and IV from the Package.
  17. Bob uses the key and IV to decrypt the Payload from the Package.
  18. 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.