7 points by max_ 3 days ago | 15 comments
I have been using AGE [0]
And I really don't like the idea of having the keys stored in the home directory in plain text.
There is also a risk of losing the keys if my laptop is damaged or gets stolen.
Is there a proper tool for storing encryption keys?
leftcenterright 21 hours ago
throwup238 3 days ago
You can essentially encrypt all environment variables, not just SSH keys, by aliasing your terminal commands to the 1password CLI. I have a “secrets” repo where all dotenv files are checked in with values like “op://vault-name/secret-name/key-name” that get injected by the op cli.
mos_6502 3 days ago
The gold standard for this would be a Hardware Security Module (HSM), which is essentially a device that stores private keys with certain guarantees of physical security (e.g, that private key material cannot be extracted from the device once it has been generated or placed there, and the device performs operations using the key material on behalf of some client).
HSMs in various forms underpin all sorts of cryptosystems that society depends on, because securing private key material at rest is essential. You'll find them everywhere from your debit/credit card, to certificate authorities, financial institutions, defense, and your smartphone.
For your use case, I'd recommend taking a look at Yubikeys. I did a writeup a while back on how to use them to store different types of private keys for various purposes:
dale_huevo 3 days ago
so encrypt them.
or store them in a hardware token.
or on a USB stick (poor man's hardware token).
> There is also a risk of losing the keys if my laptop is damaged or gets stolen.
backups, full disk encryption.
max_ 3 days ago
Thanks for this reply. Could you recommend any good "hardware tokens"?
Spooky23 20 hours ago
dale_huevo 3 days ago
atmosx 3 days ago
Modern smartphones have excellent OCR (optical character recognition) capabilities, so converting images of printed text back into digital form is now quite easy and reliable.
Personally, I use 1Password, and even they recommend printing out a PDF copy of your passwords and storing it in a secure location - like a physical vault. It’s a practical backup in case something happens and someone needs access to your credentials.
vivokey 2 days ago
toomuchtodo 3 days ago
znpy 3 days ago
oulipo 3 days ago
imcotton 2 days ago
bonki 3 days ago
stop50 3 days ago