I have to send user data from a form to server side and process it. But I would like to encrypt this information to make sure the information is safe.
I am using a random word Array as salt, another random word array as IV, userId as passphrase to encrypt the password. Same salt and IV, password (without encryption) as passphrase is used to encrypt userId.
Salt, IV, userId (both plain and encrypted), encrypted password is sent to server side where the reverse operation is performed to decrypt the data.
But since passphrase is also available at client end, this doesn't seem safe. What is the best way to achieve this?