Paper backup for cryptographic key

Use this page to pretty-print your cryptographic key to paper as a 'disconnected' backup.
It does nothing with the data, it just formats it for printing.
Feel free to look at the code of this page, download it, modify it.

Don't worry : NOTHING is sent to the Internet, you can disconnect from the network if you wish.

Please fill the following form, then print this page to backup your key data to paper.
Make sure that you can read all characters on the printed result, because in order to restore the key you will need to type exactly all characters. Especially, make sure that you can distinguish i,I,l,1 and o,O,0.

The page will look like : Use the "print preview" feature of your browser to preview accurate rendering

foo@android

Date : Sat Jan 31 2015 15:45:59 GMT+0100 (CET)
Sample character set :
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
1234567890+/
Password : foobar
Enjoy !
change font size : + -
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDAXbjIm8OXPTuZ
P2Eou+Fr9FI5aj5knw4gM3QC3e2RRqLIqZeSOmChAs4i6NDeoqSk6ofdZMUiOGA7
mOelle6IjvAGd3G6MoxaYjUfKN2lEfZ1nAM+jQszDD8Ix2hKkzBlG0O8ZUe8+FVI
j8z0gccSKQJvlV+RX7Zexo43oxt7552fy8jE0zBWGrcj/KblyfvO97tXaaOYJ9kk
5QfVN7ZandOmYS8Jab0k53oZ+MGC35h+a4XEaTSwYheaDtkxDv9GYqaDAJfrwDbt
MSc/vIVoeggIh4HnkXVFJiC9mk3ljzB9WyKHcsaeItPMemci2vjIvFnvIB/Skzsq
E2ce7XW1AgMBAAECggEAS230oSUC4vDtx7+kd3aEg/I/s6fHY2lC/rluShl/qDGM
byag+oPNlBUng2TLUiFwcgJM2DFFY4+7nGLuom1SJVX3JHH9tEdR5bcQoXFCyBFt
FNziIMrpk1C//s9CQ8vHdD3mp58HLEAsINHSSiYBS0utWte1q6leN3egGIzqoACa
Mwd1A0Il/Kk4e0iLKawR6IdYfZLkRHK0x3osjQVK06jvhQyizCZtBJw8bOEGc/xc
2mAS1+OFj5hZ2DahD9OLS4y8e8A24U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PwOWLelXhoUuQpzg1hxzXyII6GcmkyV9jox64Cuyz0oZ
qEsMlDicsPdMaJs4Y5/yI1ZzTJMOD+g=
-----END CERTIFICATE-----

How to restore this key

To restore this key, type the characters from the frame into a text file that you will import into your key store. Also include line breaks and 'BEGIN' and 'END' lines.

Instructions for Java keystores

Restoring key from text file

openssl pkcs12 -export -in foo-restored.pem -out foo-restored.p12

keytool -importkeystore -srckeystore foo-restored.p12 -srcstoretype pkcs12 -destkeystore restored.jks -deststoretype jks -srcalias 1 -destalias foorestored

Exporting key to readable text

Follow those instructions if you want to backup another key.

keytool -importkeystore -srcstoretype jks -srcalias foo -deststoretype pkcs12 -srckeystore mykeys.jks -destkeystore foo.p12

openssl pkcs12 -in foo.p12 -out foo.pem -nodes

Useful links