I have a database containing user data, including sensitive data. They are not as sensitive as financial, but nonetheless they are sensitive. Account passwords are hashed and salted, but the rest can be encrypted without a hash to allow editing.
How far could you encrypt the fields? Could you encrypt everything, including common fields, such as username, first name, last name, or only fields such as address and telephone number. The first name is often used after a user logs in.
Can someone suggest an algorithm (with sample code, if available) for encrypting fields? I use primarily PHP and MySQL.
You want to encrypt the database, but you can still access it using the application. This means that the application must have a way to decrypt the data. If an attacker has access to the database, it is likely that he will gain access to the application and figure out how to decrypt the database.
You can use transparent disk encryption. However, this only protects against physical access to the disk. This does not increase security if your server is kept somewhere secure.
I would not encrypt the fields at all, as this will be a royal pain in the back :-)
, .
, (user user_sensitive) userID. - user , ( ) user_sensitive ).
user
user_sensitive
userID
( , MySQL), , .
, , , - DB2, . , , . , , . , .
, , . MySQL, .
Google " " - , - .
, :
The ofc password should not be clearly stored in any table. Keys should be stored only for the session. Thus, the attacker does not have the means to decrypt information about whether the database and / or application is compromised (forgetting for a moment the ability to change the application code and quietly collecting keys).
Source: https://habr.com/ru/post/1753247/More articles:Hibernate not conforming to JPA regarding @Access? - javaDoes HTML5 remove the distinction between strict and transitional? - html5How to get the running Perl script path and name (argv [0] in C) - perlDatabase design: one table versus three tables - databaseИнтеграция OpenID - phpХранение зашифрованной личной информации - здравый смысл? - phpHow to call UpdateModel from a custom ModelBinder? (MVC) - asp.net-mvcHow to change the default framebuffer for Android? - androidBinary grouping in R - rThe intersection position of the 3d vector and the cube - cAll Articles