The internet does reliability end to end. That is, when a node A sends a message to node B, the message travels through many other nodes. These intervening nodes make a best effort at delivery, but if they don’t succeed, they just forget about it. B must confirm receipt, and A must try again if it doesn’t.
Communicating securely requires the same approach. We should not guarantee each step is secure, and hence the whole path is secure, but design a system in which only the design of A and B matters.
The more we do our computing in the cloud, the more true this becomes. Simply put, the security of our communications depends on too many people, and the chances of failure multiply.
For example, we might use a messaging service, provided in the cloud. A and B could authenticate to the message server, and ensure privacy by connecting using SSL. The server could implement access controls, to ensure other users of the service won’t receive messages they are not entitled to receive. In this arrangement, you are making some assumptions:
- The authorisation code in the server is correct. I.e. bugs don’t cause it to deliver messages to the wrong recipients.
- The code which configures authorisation in each of the clients is correct. I.e. bugs in the client don’t cause deliveries to the wrong recipients.
- The server is never remotely hacked.
- The server is physically secure.
- The administrators of the server never looking at you messages, and never pass them on to anyone else.
- The administrators of the server never provide access to someone unauthorised.
- The backups of the server are securely stored, and a never used for anything other than restoring the service. They are never passed on to someone unauthorised.
- Backup media is securely disposed of.
- The servers disks are securely disposed of at the end of their life.
- The SSL private keys of A, B are never transmitted to someone unauthorised
Actually, this list only cover’s privacy. If I covered authenticity, my list would be twice as long.
Alternatively, A could encrypt messages using B’s private encryption key, and sign them with its private signing key. Then we are assuming:
- The private keys of A and B are never transmitted to someone unauthorised.
Now you can perhaps see that if you are not encrypting and signing messages before sending them via a message server, you need a good excuse.
Unfortunately good excuses abound:
- What standard encryption scheme or software should I use?
- What key management software should I use?
For example, GPG requires you to fork a process for each message you sign and encrypt, and when it decrypts and validates messages, it only tells you the message was from someone you trust, but not who, so it assumes you trust everyone equally.
I’ve recently designed a solution which uses end to end encryption of messages, and a message server to minimise the attack surface of the solution, and ensure privacy while transferring data over the internet. The attack surface is minimised to the extent that the nodes are behind firewalls that allow no incoming connections. Because messages must have valid signatures to be accepted, an attacker cannot use specific payloads in messages to attack the system. They are limited to attacking the code which parses the envelope. This code is extremely simple.
To do this efficiently, we have designed our own cryptographic suite, based on the NSA Suite B specification. Because this specification does not specify an encoding, we have designed our own envelope for messages. The resulting library also includes aÂ sophisticated, extensible trust model.Â We plan to publish the result as open source.
We see lots of sites that use RabbitMQ, and other message servers, and would benefit from the security this architecture provides. Either these sites allow clients to interact with services via a message server, or use cloud based messaging services. Using cloud based messaging services has significant cost benefits over hosting your own message server, and in this architecture, the decision to do this has no security implications.