Now I got to user registration and there was a question about data encryption at the stage of data transfer to the server. Does it need to be encrypted during transmission or should all processing take place on the server?

I read several articles and information on this topic a lot has been written and everyone has their own opinion + you need to be well versed in all concepts of how and what works.

  • one
    standardly encrypt only the password. Otherwise, it will be difficult to work with user data by its identifier, which is almost always his login. It is necessary to encrypt only the password (when saving to the database). Usually for this purpose they take just some password hash and write it to the base. As @EugeneKrivenja said, HTTPS encryption is enough. It has already been implemented everywhere, and nothing should be done with our hands. The only problem - you need to buy a certificate. - Vladyslav Matviienko
  • You have already decided on what kind of attacks are defending? - D-side
  • @metalurgus I changed the question. I am not sure that we understood each other correctly, my question is exactly whether it is necessary to encrypt the data at the moment of their transfer to the server or does all the processing take place on the server? - Aleksey Timoshchenko
  • @ D-side I changed the question. I am not sure that we understood each other correctly, my question is exactly whether it is necessary to encrypt the data at the moment of their transfer to the server or does all the processing take place on the server? - Aleksey Timoshchenko
  • @AlekseyTimoshchenko perhaps you did not understand me, but I ask what you are protecting from, it depends on what you trust and what you don’t. - D-side

1 answer 1

It's not entirely clear what you want to encrypt. If the channel between the client and the server, then HTTPS for the "normal user" is enough.

ADDON
Here's how to create a secure connection to the server using HttpsURLConnection :

 URL url = new URL("https://..."); HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); 

Everything, now the transmission channel is encrypted.

  • Comments are not intended for extended discussion; conversation moved to chat . - Nick Volynkin ♦