3 ms·
Which public key algorithm? In what mode of operation? What are you going to use to actually encrypt messages? You don't want to directly use the public key pr
by tptacek 9y ago
Which public key algorithm? In what mode of operation?
What are you going to use to actually encrypt messages? You don't want to directly use the public key primitives to do this.
In what mode of operation are you going to use that second, bulk encryption algorithm?
How are you going to authenticate messages?
What will you do to validate the public keys of your peers? When you close the application, will it forget everyone's keys? How do you prevent MITM on first contact?
What happens when your peers change devices, and thus public keys? How do you authenticate those changes? If you get any of this wrong, remote attackers can MITM messages.
How will you handle file transfers (and images and videos and voice, which will probably need yet another cryptosystem)? How will you cryptographically bind those transactions to the (presumably, somehow) authenticated chat session you set up?
What happens when someone's device is compromised? Is every chat they've ever sent also compromised?
What happens if someone is briefly compromised? Is every message they send in the future also necessarily compromised?
How will you handle updating your software when, inevitably, someone finds a vulnerability in it? What happens if you have to upgrade the whole protocol?
None of this is easy. Most of these problems by themselves are hard in their own right, but there's a combinatorics to them as well.
- ricksharp 9y agoThanks! This is an excellent list of potential issues. "What are you going to use to actually encrypt messages? You don't want to directly use the public key primitives to do this." I'm not sure what you mean by this. Could you explain why there is a need for another encryption protocol beyond a public/private key encryption? If the protocol is secure against brute force attack, both the public key and the encrypted messages could be open and would not create a vulnerability to the private key. What am I missing?
- tptacek 9y ago* Assymetric transforms are much, much slower than the AES transform or any other block or stream cipher. * In most cases, an asymmetric transform gives you a deceptively small amount of headroom within which to fit your data before losing security. * asymmetric transforms are less safe to implement than simple authenticated symmetric ciphers. * for that matter, cost-effectively authenticating messages will require "symmetric" primitives anyways. * modern asymmetric algorithms (like Curve25519) don't "directly" support encryption. That's just off the top of my head. It is hard to think of a single competent public key cryptosystem that encrypts directly with the asym transform.
- snakeanus 9y ago> What happens if someone is briefly compromised? Could you give an example please? How do current protocols deal with that?
- dullgiulio 9y agohttps://en.wikipedia.org/wiki/Forward_secrecy https://en.wikipedia.org/wiki/Forward_secrecy
- snakeanus 9y agoI know about forward secrecy but my question is how you could protect future seasons, not past seasons.
- dullgiulio 9y agoNegotiate new keys with Diffie-Hellman periodically, I think.
- deleted 9y ago[deleted]