Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to encrypt in device and decrypt in server side with encryptoin key

What is the best practice to encode the string with encryption key(like password) in device

side(android and ios).And to decode that encoded string in server side with the encryption

key used in the device side.

like image 812
user1965581 Avatar asked Jul 22 '13 09:07

user1965581


People also ask

Can you encrypt and decrypt with the same key?

Two types of encryption algorithms can be used by the encryption key server: symmetric algorithms and asymmetric algorithms. Symmetric, or secret key encryption, uses a single key for both encryption and decryption.

Can you encrypt with private key and decrypt with public key?

Anyone can encrypt a message by using your public key, but only you can read it. When you receive the message, you decrypt it by using your private key. Similarly, you can encrypt a message for anyone else by using their public key, and they decrypt it by using their private key.


1 Answers

You could try one of the following

  • RSA Encryption:

    Encrypt using public key in iOs Device and decrypt it using private key in web service

  • Host the web service with SSL certificates

  • Set up a Secured VPN and access the service through the VPN.

Since you mentioned about encrypting passwords.salting and hashing the password is most preferred.

like image 63
Durai Amuthan.H Avatar answered Oct 03 '22 05:10

Durai Amuthan.H