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:
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.
‘FILENAME’path to require):
(require 'simple-secrets) (setq secret-password-file "path-to-secrets.gpg") (secret-load-keys)
‘require’d, simple-secrets supplies the following set of functions. The first two are used frequently enough to warrant a key binding.
‘secret-lookup-clipboard’: Look up a password (interactively) and copy it to the clipboard.
‘secret-new’: Create a new Key--Password binding. If a blank password is supplied, then one is auto-generated.
‘secret-lookup’: Look up a password (interactively) and return it.
‘secret-update-password’: Change the Password for a given Key .
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.