SimpleSecrets

simple-secrets is a small set of functions which turns Emacs into an easy-to-use password manager on any system. The main advantages are

There are also disadvantages compared to larger password management systems:

simple-secrets require Emacs >= 23 since it depends on EasyPG. simple-secrets, as it is currently written, also requires InteractivelyDoThings.

Principle

Passwords are stored as Key--Password bindings, where Key is a public string used for looking up the secret. Password is any string (without new-line).

The usage pattern is that one wants to store passwords, secrets, other numbers to remember, while allowing one to quickly and conveniently looking them up. By “looking up”, we actually usually just want to put them into the clipboard such that the passwords can be directly pasted into whatever place they are needed.

simple-secrets will remember the list of Keys, and when one wants to look up a password, it uses Ido-completion to facilitate this process through the known keys. The found password is then returned or copied into the clipboard.

By “clipboard”, we mean the kill ring. To be able to paste this string outside of Emacs, one needs to tell Emacs to overwrite the system clipboard when something is added to the kill ring. This is default in Emacs >= 24.

Setup

  1. Download simple-secrets.el.
  2. Create a password file, e.g. `~/.secrets.gpg’. Open it with Emacs and setup encryption/decryption of this file. This requires setting up a working EasyPG and a GPG private key on the system.
  3. Add the following to your `.emacs’ (possibly add the optional ‘FILENAME’ path to require):
  (require 'simple-secrets)
  (setq secret-password-file "path-to-secrets.gpg")
  (secret-load-keys)

Usage

Once ‘require’d, simple-secrets supplies the following set of functions. The first two are used frequently enough to warrant a key binding.

Auto-generating passwords is carried out using the shell command ‘secret-generate-password-command’. By default it uses ‘pwgen’ which should therefore be on the system. By default it generates passwords of length 12 containing both capitals, numbers and at least one symbol.


CategoryCryptography