agl/xmpp-client — pull request #66 by FiloSottile (2014-11-11 18:38:16+00:00)
Title: Encrypt config file on disk with NaCl

Since the config holds sensitive values like the OTR private key and stored fingerprints, the user might wish to encrypt it. The option is offered on enroll, and then autodetected on each run.

The scheme is basic:
* kdf: scrypt with 5s params, random nonce created on enroll
* actual encryption: NaCl secretbox
* file format: `Scrypt SALT + SecretBox NONCE + BOX`

Also, if the config file is encrypted, the user is prompted to save the account password on enroll.

Finally added a list of pinned server certificate fingerprints, since onions are already pinned and jabber.ccc.de would not work otherwise on most systems (those not trusting CA Cert) being impossible to edit the config.

The pain point is how to allow the advanced user to edit the config. My two ideas, neither good, are a `/set-opt
` command, or a `/config-edit` command working like `/roster-edit`.