0

In some articles and books the authors advise the developers to keep a paper copy of their certificate (e.g. Programming Android). What part of the keystore/certificate exactly should be written on paper and how can it be used to recover or recreate the certificate later?

Sample keystore listing:

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

androiddebugkey, 2013-3-3, PrivateKeyEntry,
Certificate fingerprint (MD5): 2A:88:21:96:D8:A1:4C:DC:A5:35:E8:FE:0F:DF:62:42
luben
  • 2,512
  • 4
  • 30
  • 41

1 Answers1

1

Like any public/private key pair, you need to have the private key or you'll never be able to sign another application or decrypt anything.

So in this case, you need to save your private key onto paper so you could recover it later. Though, it's probably better to print it off than hand write it since it will be quite lengthy. Or maybe copying the keystore/certificate to a USB thumb drive.

You can read some of the tips about securing the private key on Android's documentation page.

Steven V
  • 16,357
  • 3
  • 63
  • 76
  • Ok, I still don't get it: First, where is the private key, how to see it, so I can write it down? Second, how do I recreate the keystore from the paper written private key? – luben Dec 09 '13 at 20:31
  • 1
    @Lyuben http://stackoverflow.com/a/5596842/254973 has a good tutorial on how to use `keytool` to extract the private key from the keystore. Then you'll be able to print/copy/write those files into a safe location off your machine. Then if you ever need to recover them you would do the reverse process. Take the extracted key and create a keystore from it (similar to http://stackoverflow.com/a/17710626/254973). In all honesty though, you'll save yourself a lot of work if you just copy the keystore into a secure location which you can use on any computer in the event of disaster. – Steven V Dec 09 '13 at 20:41
  • Thanks for these clarifications. I guess I'll not write it on paper, but I was curious of the different parts of the keystore and how I can see what's inside it. – luben Dec 09 '13 at 21:01