Keystore is nothing more than a container. It contains keys, public key certificates used to sign your applications before they are deployed.
Android requires all APKs to be digitally signed with a certificate before they can be installed. When you sign the APK, the signature tool attaches the public key certificate to the APK. The public key certificate serves as the “fingerprint” that uniquely associates the APK with you and your corresponding private key. This helps Android ensure that any future updates to your APK are genuine and come from the original author. The key used to create this certificate is called the application signing key.
A keystore is a binary file containing one or more private keys.
You can create a new keystore, and if you post your original certificate there, it makes no difference. You can extract the certificate from one keystore and place it in another.
Basically, an Android Studio tool or keytool , for example, generates these keys for you and puts them in the keystore. Physically RSA keypair keys are RSA keypair , like this example http://phpseclib.sourceforge.net/rsa/examples.html , the private key used to sign and store in the keystore only , the public key used to verify the signature.
There is no way to recover the key if you have lost the keystore. So, do your best to protect the keystore , especially if you published applications signed by it with certificates.
source share