doulao2029 2017-07-27 06:41
浏览 85
已采纳

在PHP Bcrypt中散列整个MySQL数据库的优点和缺点是什么?

I have seen on the internet that it is a good practice of hashing user names and passwords using BCrypt for better security. If your database was compromised, there would be still a chance for your data (User Names and Passwords) keep secret. So my problems are,

  1. Can we hash All Database Tables (not only tbl_users) for better security.? (such as comments, payments, balance, etc...)

  2. If we can, does it slows down the PHP Application?

  3. Other Advantages and Disadvantages

  4. Any other methods which can use for keeping data secret, if my database was hacked, stolen of compromised?

Thank you in advance..!

  • 写回答

1条回答 默认 最新

  • dqwh26750 2017-07-27 06:49
    关注
    1. Hashing is one way only. That means if you want to retrieve the first and last name of your user, you won't be able to. Another example is if you hash balances, you won't be able to see who owns the most money, or who owes what.
    2. Hashing, or encrypting is slow. That's one reason why it is secure, because you need a big computing power to be able to break it.
    3. Other advantages? None.
    4. Something that banks use, along other things. Is to have your database table names and column names be meaningless... Name them just a,b,c,d that way it is harder to know what is what. But again, that is just a slim layer of security by obscurity. If the database is hacked and its content pumped out, the hacker will have all the time he needs to figure out what he needs...

    Try reading more on how to manage your database securely on https://dba.stackexchange.com/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大