jks or pkcs12: which one should I use to sign the apk for Google Play Store?
Asked Answered
G

2

11

Android Studio 3.5.3, after the creation of my new Key Store, suggests me to convert it using this command:

keytool -importkeystore -srckeystore /path/myKeyStore.jks -destkeystore /path/myKeyStore.jks -deststoretype pkcs12

On the Web and on SO I read a little about it (for example the pkcs12 format is widely supported regardless of the programming language used to read it) but I can't find the answer to this question:

Is the format pkcs12 perfectly compatible with Google Play Store to publish my Apps?

If yes, which one should I use to sign my apks and why?

Thanks a lot!

Gran answered 13/12, 2019 at 6:7 Comment(1)
You can store it in pkcs12 but you need to convert it to jks in order to use it to sign your app. IMHO using a language netutral format for storing sounds more future-proof.Hectoliter
Q
13

Both pkcs12 and jks are formats holding the public and private key (PPK) used for signing the APK for release and publishing on Google Play Store. It doesn't matter how the PPK is stored as long you can use it for signing. Certain tools or services might prefer using one format over the other and converting between them is by using either command line tools, KeyStore Explorer or similar. Regardless of the conversion direction, the PPK contained stays always the same.

Convert from PKCS12 to JKS

Convert from JKS to PKCS12

KeyStore Explorer

Quondam answered 17/12, 2019 at 17:34 Comment(1)
I've had some trouble using PKCS even though it is suggested. Thus, I'm sticking to JKS for now.Kunzite
G
1

jks is java key store, which is more of a java related format, and you can use it directly for signing your release apks for the playstore. So if you're just going to be using it for this purpose, you don't really need to convert it to pkcs12. PKCS12 is not specific to java. If you want to store other keys for other purposes, in the same key store, in a language-neutral format, you may want to convert it to pkcs12.

Gustave answered 23/12, 2019 at 5:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.