I have a client-server chat like app. I would like to add an encryption of messages for users. So, that they will be sure that no one, even service owner, can read their confidential information. I'm going to use AES cryptography like this http://bitwiseshiftleft.github.com/sjcl/demo/

The problem is that I don't know how it could be implemented in a user friendly way. I'm afraid to say to user: "If you lose the password, salt, etc, then you lose all your information and nobody can help you."
Is there any precedents in existing software, so that I could grasp right design approach?

  • So is this a system where it's not possible to keep a key for the user in the database, regardless of password, and only give access to that key with the password? There's got to be some way you can encrypt while allowing password changes
    – Ben Brocka
    Aug 24, 2012 at 15:50
  • @BenBrocka I'm not sure about type of system with storing key in database. Anyway, there is https already in my system. If I store the AES key in server database, the data will be vulnerable to stealing the database. That's one of the cases I want to give protection to.
    – alehro
    Aug 24, 2012 at 17:35

1 Answer 1


Hushmail, does a fairly excellent job of explaining their encryption protocol to the end-user. Part of the purpose of that document is to reassure the user that their service is secure, rather than to warn them of potential pitfalls of losing their password:

Explanation of Hushmail's email encryption protocol.

As to warning your users of the consequences of losing their password: I suggest presenting that information to them following the accept-terms-of-use-before-continuing pattern, but on a screen/step of its own during the registration process, in a way that will be impossible for the user to miss. Part of the selling point of your service is that one can't recover messages (even you) because they're encrypted.

(My answer assumes that your encryption mechanism is seamless, unlike the example you linked, which I took to be an illustration of your encryption protocol, not your user interface.)

  • Hushmail example is good, but it isn't quit what I need. What I need it is indeed how to transform dozen sjcl parameters into one password phrase without drastic loss of security.
    – alehro
    Aug 24, 2012 at 17:54
  • I've just found 'one parameter' modification of the algorithm (movable-type.co.uk/scripts/aes.html). Since this part of my problem is more about technical issue than about user experience and your answer highlights usability concerns quite well, I think it deserves to be marked as answer.
    – alehro
    Aug 24, 2012 at 18:28
  • 1
    @alehro: the normal way to handle encryption in chats is OTR. This guy is writing one. Beware of the security considerations
    – Aadaam
    Aug 25, 2012 at 23:44
  • @Aadaam Thank you for the links, but my app is not a chat. If you are curious you may find description here: msgnotes.alehro00.com
    – alehro
    Aug 26, 2012 at 15:14

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.