News for hackers. Stuff that matters.
Re:Strategies for offline PGP key storage by chrissnell on Thursday October 05, 2017 @10:10AM (#15409293)
For my private keys, I export them into PEM format, convert that into a QR code, and print them out. This goes in my fire-resistant Fort Knox vault [1] for safe keeping. The vault is bolted to the cement floor and cannot be carted away.

I use intermediate certs for my internal CA and do keep those private keys online for quick and easy generation of new certs but the root cert private key only exists in physical form under my control. It's a bit of a pain to convert the root key back into digital form but I only have to do this every couple of years when the intermediate cert expires.

I got into a habit of writing shell scripts for every certificate related task to make it easier. I use the dialog(1) utility to prompt me for input when that's needed. If things are easy, you're more likely to do them.

[1] https://www.ftknox.com/vaults/legend-vault/

Re:Strategies for offline PGP key storage by Tharre on Thursday October 05, 2017 @10:45AM (#15409561)
How do you check that your printer isn't secretly storing your key somewhere? I've looked for open source/open hardware printers some time ago, unsuccessfully. I've written my main key down on paper by hand as a backup, but it's a tedious task.

As you mentioned fire-resistance, do you also use some sort of fire resistant paper? Because I don't think anything in made of paper would survive an actual fire.

Re:Strategies for offline PGP key storage by dom0 on Thursday October 05, 2017 @10:46AM (#15409569)
> I've looked for open source/open hardware printers some time ago

You want a pen plotter. Or its cheaper, more expensive cousin, the Axidraw.

> As you mentioned fire-resistance, do you also use some sort of fire resistant paper? Because I don't think anything in made of paper would survive an actual fire.

Actually there are document safes with built-in insulation which will keep regular paper documents safe for time X under fire conditions Y (it's some EU standard classification). Certain ways of mounting safes makes them intrinsically fire-safe(r) as well.

Re:Strategies for offline PGP key storage by graedus on Thursday October 05, 2017 @12:28PM (#15410448)
> cheaper, more expensive

Huh. It's cheaper (worse quality) but costs more money?

Re:Strategies for offline PGP key storage by dom0 on Thursday October 05, 2017 @08:54PM (#15413710)
Vintage pen plotters (or X-Y recorders) are essentially zero-price items and tend to be built like actual tanks. The ones you can buy today (and afford) are way more expensive than them, yet cheaper (in quality). However, vintage pen plotters tend to not have USB plugs.
Re:Strategies for offline PGP key storage by xelxebar on Thursday October 05, 2017 @03:28PM (#15411921)
I was confused too, so looked up the prices. The pen plotter seems to be in the neighborhood of $225 USD [1] while the AxiDraw is $475 USD [2].

[1] https://www.amazon.com/pen-plotter/s?ie=UTF8&page=1&rh=i%3Aa...

[2] https://shop.evilmadscientist.com/productsmenu/846

Re:Strategies for offline PGP key storage by cuckcuckspruce on Thursday October 05, 2017 @02:42PM (#15411554)
I took it as cheaper to purchase, more expensive to operate.
Re:Strategies for offline PGP key storage by unkown-unknowns on Friday October 06, 2017 @01:05AM (#15414557)
Speaking of plotters, consider engraving the QR code in aluminum instead of having it on paper. If there's any hacker space nearby where you live they might have CNC equipment that they will let you borrow and instruct you how to use.
Re:Strategies for offline PGP key storage by zokier on Thursday October 05, 2017 @01:03PM (#15410709)
> I've written my main key down on paper by hand as a backup, but it's a tedious task.

Elliptic curves are nice because they allow short keys, for example curve25519 uses 32 byte keys that are pretty reasonable to copy manually (44 base64 chars or 64 hexs).

Re:Strategies for offline PGP key storage by jopsen on Thursday October 05, 2017 @10:09PM (#15413960)
Also the keys can be any random secret...

Meaning you could use PBKDF2 of your favorite passphrase as your private key, then keep it in organic memory.

Personally, I would love to see a strategy for generating a private from an analog picture.. But I don't see a good way to do it reliably.. Maybe one could generate it from error correction bits in a QR code.

Re:Strategies for offline PGP key storage by ecesena on Friday October 06, 2017 @01:08PM (#15418377)
I'm not sure you can use a KDF because it requires a salt.

I'm working on a blog post on deterministic passwords (i.e. not keys for ECC), but I guess that if you really want determinism you can do something similar, maybe sha3.512 and "cut" a 256-bit ECC key.

This is the post, still a draft. Hopefully I'll publish it next week, but if you have any comments, they are more than welcome! https://medium.com/@0x0ece/how-i-manage-my-passwords-technic...

Re:Strategies for offline PGP key storage by zokier on Friday October 06, 2017 @11:50AM (#15417731)
> Personally, I would love to see a strategy for generating a private from an analog picture.. But I don't see a good way to do it reliably.. Maybe one could generate it from error correction bits in a QR code

Not clear exactly what you meant, but but deriving a key from a photograph shouldn't be that difficult. A good perceptual hash should work, maybe some preprocessing is needed (straighten/crop/normalize/resize). It helps that the amount of data in an image is absolutely massive compared to typical key size.

Re:Strategies for offline PGP key storage by im3w1l on Thursday October 05, 2017 @04:54PM (#15412506)
For RSA keys shouldn't it be possible to store some 256 bit seed and then use a deterministic algorithm to convert that to a 4096 bit key?
Re:Strategies for offline PGP key storage by ecesena on Friday October 06, 2017 @01:10PM (#15418399)
Prime number generation is typically done like this. Pick a random number, then add 2 until you get a prime.

So you can do something similar. Pick a deterministically generated bit string, and use as key the next prime number (you need to do it twice, for p and q).

You certainly get less security and I unfortunately don't have any reference to quantify that.

As I was saying in another post, I'm writing about deterministic password generation (i.e. not RSA keys). Draft here: https://medium.com/@0x0ece/how-i-manage-my-passwords-technic...

Re:Strategies for offline PGP key storage by icebraining on Thursday October 05, 2017 @06:05PM (#15412920)
Even if there is, such a key would be much less safe (assuming the attacker knew the algorithm, which must be assumed, otherwise why keep the key in a safe?)
Re:Strategies for offline PGP key storage by sigjuice on Thursday October 05, 2017 @01:34PM (#15410923)
Engrave it on stone or etch it on metal or both :)
Re:Strategies for offline PGP key storage by nosuchthing on Thursday October 05, 2017 @07:14PM (#15413284)
M-DISC's are archival grade DVDs/Blurays, and when properly stored M-DISC DVD recordings are claimed to last 1000 years.

https://en.wikipedia.org/wiki/M-disc

Re:Strategies for offline PGP key storage by sigjuice on Thursday October 05, 2017 @09:36PM (#15413846)
I think I have more faith in the people who built the Pyramids than those peddling these fancy optical discs :)
Re:Strategies for offline PGP key storage by digikata on Thursday October 05, 2017 @12:17PM (#15410350)
Encrypt before sending it to QR code?
Re:Strategies for offline PGP key storage by brandmeyer on Thursday October 05, 2017 @12:28PM (#15410445)
The GPG private key should be password-protected. Its basically symmetric encryption keyed off of the password using something akin to scrypt.
Re:Strategies for offline PGP key storage by digikata on Thursday October 05, 2017 @12:33PM (#15410490)
Oh, then a printer secretly storing that representation of the key doens't matter, correct?
Re:Strategies for offline PGP key storage by Fire-Dragon-DoL on Thursday October 05, 2017 @04:52PM (#15412494)
Can't you buy a 50 printer, print it and destroy it after that?
Re:Strategies for offline PGP key storage by Grollicus on Thursday October 05, 2017 @04:25PM (#15412321)
Of course, because that drastically reduces the key space.

Before: 2^2048, After: 256^20 = 2^160 (when using a 20 key password. Obviously you could use looong random generated passphrases, but then you could just base64encode your key?)

Re:Strategies for offline PGP key storage by palunon on Thursday October 05, 2017 @06:55PM (#15413187)
2^160 is still a massive key space for symetric encryption.

Symetric and asymmetric encryption don't have the same key length standards.

Re:Strategies for offline PGP key storage by oh_sigh on Thursday October 05, 2017 @01:48PM (#15411026)
What's the point of encrypting it? It seems like just another thing to mess up, and much more likely that you'll forget the password versus someone breaks into your house, goes into your safe, and knows what a private key is.
Re:Strategies for offline PGP key storage by sillysaurus3 on Thursday October 05, 2017 @11:25AM (#15409930)
I didn't expect to see "Strategies for PGP key storage" to include "Store them in my $16k vault."

It'd be amusing if someone stole your vault, but left its contents.

Re:Strategies for offline PGP key storage by MrZongle2 on Thursday October 05, 2017 @11:38AM (#15410018)
Perhaps the price of the vault pales in comparison to what else is in the vault.
Re:Strategies for offline PGP key storage by KekDemaga on Thursday October 05, 2017 @01:39PM (#15410968)
They are beautiful pieces of equipment if you look at the site, i'd like one without even having the wealth to need one.
Re:Strategies for offline PGP key storage by subleq on Thursday October 05, 2017 @05:29PM (#15412721)
What's the point of storing data inside a combination safe? Isn't that equivalent to encrypting the data with the combination to the safe and storing it wherever?
Re:Strategies for offline PGP key storage by icebraining on Thursday October 05, 2017 @06:11PM (#15412956)
No, because if someone found the paper, they could easily copy it (take a photo) and then take their time to "attack" it in a safe space.
Re:Strategies for offline PGP key storage by toomuchtodo on Thursday October 05, 2017 @10:30AM (#15409461)
Love that vault suggestion, but for a lot of folks, a safety deposit box might be sufficient (with your own enclosure within it using tamper evident stickers).

Having moved 5+ times in the last decade, I'd dread thinking about having to move that safe you linked to.

Re:Strategies for offline PGP key storage by chrissnell on Thursday October 05, 2017 @11:04AM (#15409726)
We are a military family so we typically move every two or three years. My vault weighs about 900 pounds but the movers never have any trouble with it. In fact, the guy that installed it was an old man driving a pick up truck. He used an amazing motorized dolly that had no problem pushing it around and could climb stairs.
Re:Strategies for offline PGP key storage by nathancahill on Thursday October 05, 2017 @03:16PM (#15411823)
> cannot be carted away

> old man driving a pick up truck literally carted it away

hmm emoji.

Re:Strategies for offline PGP key storage by chrissnell on Thursday October 05, 2017 @04:59PM (#15412538)
My vault is bolted 4" into reinforced concrete using bolts that are only accessible from inside the vault. Unless you have the combination to open the vault first, you're going to have to rip out the slab to get this thing out of my garage.

http://ftknox.com/wp-content/uploads/2013/09/ANCHOR-LAYOUT-D...

Re:Strategies for offline PGP key storage by dom0 on Thursday October 05, 2017 @10:44AM (#15409554)
Movable safe? Doesn't sound very safe to me...
Re:Strategies for offline PGP key storage by mseebach on Thursday October 05, 2017 @11:16AM (#15409838)
The idea is that the mount points are only accessible from inside the safe. The open safe is easy to move, the closed one less so.
Re:Strategies for offline PGP key storage by chiph on Thursday October 05, 2017 @09:30PM (#15413827)
Re:Strategies for offline PGP key storage by ransom1538 on Thursday October 05, 2017 @09:29PM (#15413822)
For your PEM formatted keys, why a vault? Don't vaults just advertise "what is in here is SUPER important"? Police love vaults. Wouldn't it be safer on a sd hiding case in a few places (mom's house in attic, one under your oven?)

https://www.amazon.com/US-Mint-Quarter-Covert-Compartment/dp...

Re:Strategies for offline PGP key storage by chrissnell on Thursday October 05, 2017 @09:37PM (#15413851)
I should have explained this better: the vault is not to keep the private key safe from home intruders, it’s to keep the key safe from loss and fire and anyone that might compromise my CA machine. It acts as an air gap of sorts.

Once in a blue moon when the intermediate cert expires, I pull out the QR code and scan it and convert it to a PEM on a burner laptop, VM, or phone. There I generate a new intermediate and securely delete the root PEM file and put the QR back in the vault. Then I copy the inermediate off the burner machine and go about my business.

Re:Strategies for offline PGP key storage by jopsen on Thursday October 05, 2017 @09:58PM (#15413912)
Glue the QR code onto an old boarding pass and keep it in your photo album... then stick a broken yubikey into your grandmothers coffin for plausible deniability.

- the latter is a joke ofcourse! :)

For plausible deniability it's a lot less controversial to mix a broken yubikey in concrete and cast it as pavement.

Re:Strategies for offline PGP key storage by watersb on Friday October 06, 2017 @02:58AM (#15414932)
YubiKeys are hard to break without obvious tampering. Better use an unbroken one. :-)
Re:Strategies for offline PGP key storage by j7ake on Friday October 06, 2017 @03:50AM (#15415090)
I have tried printing QR code of keys but with no success (the phone does not recognise the image) what do you use to generate the image that is sufficiently resolved to print and be functional ?
Re:Strategies for offline PGP key storage by jvz on Thursday October 05, 2017 @01:25PM (#15410860)
Do you encrypt your keys before exporting? How do you ensure you'll remember the passphrase, if so?
Re:Strategies for offline PGP key storage by xelxebar on Thursday October 05, 2017 @03:31PM (#15411947)
At least with gpg2 exported private keys are encrypted by default. In fact,

    $ gpg2 --export-private-keys
won't even ask you for a password because of this.
Re:Strategies for offline PGP key storage by IncRnd on Thursday October 05, 2017 @10:38AM (#15409512)
That safe is a pretty strong lynchpin. Nice.