I'm looking into implementing OTR
(off-the-record) protocol into my de-centralised messaging app (written in Scala
with akka
and akka-http
). I was originally attempting to use SSL, but it seems without shipping my software with a single rootCA
, it is pretty difficult (unless I accept all certificates, which poses even more issues).
So using a plain http
socket, my plan would be to exchange the public keys for a single session, but encrypt them using a shared password. Each server has a unique ID. This ID is shared to another user that you want to connect and chat with. The other user must enter this ID to establish a connection with your server.
I was thinking that instanceA
could use instanceB
s serverID to encrypt its public key, then send it over http
(with Deniable Authentication). instanceB
would then un-encrypt the key and perform DH key-exchange, and do the process back to instanceA
.
I would like to understand if there are any potential security risks to this approach vs shipping the software with the same rootCA
in every instance.
UPDATE
I seem to be going in circles with this. The correct process seems to be SSL. But:
http
Doesn't matter what approach I try and take, I end up having to distribute a single rootCA
with my software. I don't like this for several reasons:
keystore
. Which has a password around it, pushing the security risk onto the password. Every instance will need the SAME password for the keystore
Please if someone knows an easier way to do this (that does not have these security issues) advise me. I've been going in circles for days
Establishing trust without a single point of failure is a common 'challenge' in decentralized systems, but what you could instead do is use Trust On First Use with Public Key Pinning.