I encrypted my password in android (client side) using rsa. Because we know that it uses the public key for encryption and the secret key for decryption. I generate a public key and a private key, for example the code below
KeyPairGenerator gen = KeyPairGenerator.getInstance(RSA);
gen.initialize(1024, new SecureRandom());
KeyPair keyPair = gen.generateKeyPair();
uk = keyPair.getPublic();
rk = keyPair.getPrivate();
im successfully encrypts and decrypts this in android with this key. but on the server side, the person who processes the decryption needs my private key as the result that it generates. how do I provide this private key to the person who processes the server side to decrypt the data using my private key.
thank...
source
share