1

I plan to create an application for secure instant messaging, now I don't know whether or not I want to implement the encryption by myself. This project is also mainly for educational purpose so I wouldn't mind a bit of extra work.

My 'vision' is that every device that registers for my service generates a RSA-2048 keypair. The public key is then stored at the server and exchanged when the device (user) is being added as 'friend'.

When a session is created I would perform a ECDH key exchange for Perfect Forward Secrecy and then agree to a AES-256 symmetric key. The server stores this AES key in a database together with a SHA-1 hash for identifying it at future session reconnects until a new key is negotiated. Not to forget a nonce against replay attacks.

Is there a lot more I would have to think about when creating a secure protocol?

Thanks in advance, conFusion

  • 2
    Have you looked into "Off The Record (OTR)"? otr.cypherpunks.ca – Darius Apr 20 '14 at 20:06
  • Yea i'm trying it out right now, but i'd prefer doing it all by myself for some reason. But if there are major problems i haven't thought of i'm going for OTR i guess. – conFusion Apr 20 '14 at 20:13
  • First go read the FAQ about rolling your own encryption, then explain why you don't like TLS/DTLS – symcbean Apr 20 '14 at 22:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.