End-to-end encryption for messages #23

Open
opened 2021-10-03 21:33:28 +03:00 by hippoz · 1 comment
Owner
No description provided.
hippoz added the
enhancement
label 2021-10-03 21:36:56 +03:00

E2E is going to probably a knockoff of signal's design.

X3DH (https://signal.org/docs/specifications/x3dh) for key agreement and double ratchet (https://signal.org/docs/specifications/doubleratchet/) to form message keys.

identity keys mentioned in X3DH will be generated by the client and stored by server.
considering this design:

  • at account creation client will generate an identity key pair.
  • it will additionally generate a salted hash of the password, and encrypt the private key with it.
  • the client will send the public key, the encrypted private key and the salt of the hash to server.
  • at logins, server will send the encrypted private key and salt of the hash.
  • client will calculate the hash, then decrypt the private key.
  • if the password is incorrect, the incorrect hash will be generated so private key decryption will fail.

perhaps this make the password hash checking done by server redundant, as if client managed to obtain the identity private key that means client knows the password.

E2E in channels (group chats) pending further investigation.

E2E is going to probably a knockoff of signal's design. X3DH (https://signal.org/docs/specifications/x3dh) for key agreement and double ratchet (https://signal.org/docs/specifications/doubleratchet/) to form message keys. identity keys mentioned in X3DH will be generated by the client and stored by server. considering this design: * at account creation client will generate an identity key pair. * it will additionally generate a salted hash of the password, and encrypt the private key with it. * the client will send the public key, the encrypted private key and the salt of the hash to server. * at logins, server will send the encrypted private key and salt of the hash. * client will calculate the hash, then decrypt the private key. * if the password is incorrect, the incorrect hash will be generated so private key decryption will fail. perhaps this make the password hash checking done by server redundant, as if client managed to obtain the identity private key that means client knows the password. E2E in channels (group chats) pending further investigation.
This repo is archived. You cannot comment on issues.
No milestone
No project
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: hippoz/brainlet#23
No description provided.