通过多重加密确保加密字符串的安全
我已经开发了一段时间的系统需要 DPA,并询问了有关保持数据密码安全的问题。自从他们想出了一个解决这个问题的想法,其中涉及将数据库的数据解密密码存储在数据库中,但在不同类型的加密后使用经过验证的用户密码(存储为 MD5 密钥)对其进行加密。散列。
问题是,使用不同的密钥(至少 20 个字符长,可能有扩展名)对密码进行多次加密是否会使在没有事先了解密码或密码信息的情况下解密变得更加容易?
A system I have been working on for a while requires DPA, and asked a question about keeping the data passcodes safe. I have since them come up with an idea to fix that, which involves having the data decrypt password for the database stored on the database, but have that encrypted with validated users password (which is stored as an MD5 key) after a different type of hashing.
The question is that does encrypting the password multiple times with different keys (at least 20 characters long, with possible extension) make it considerably easier to decrypt without prior knowledge or information on the password?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,一般来说,一个好的密码应该具有即使你知道明文也无法检索数据的属性。即使有好的密码和足够大的密钥空间,对数据进行加密也不会有太大影响。
No, in general a good cipher should have the property that you cannot retrieve data even if you know the plaintext. Having the data encrypted should not have much influence, geven a good cipher and a big enough key space.
首先,MD5 不再被视为安全加密算法。请参阅http://www.kb.cert.org/vuls/id/836068 了解详情。
其次,数据的加密密钥不应存储在数据库本身中。应单独存放。这样,至少需要获得两个东西(数据库文件和密钥)才能解密数据。如果密钥存储在数据库本身中,那么一旦有人拥有数据库文件,可能不需要很长时间就能找到它。
找到一个单独的方法来存储密钥。它应该被编码到应用程序中或存储在以某种方式混淆的文件中。
First off, MD5 is no longer considered a secure encryption algorithm. See http://www.kb.cert.org/vuls/id/836068 for details.
Secondly, the encryption key for the data should not be stored in the database itself. It should be stored separately. That way there are at least two things that have to be obtained (the database file and the key) to decrypt the data. If the key is stored in the database itself, it probably wouldn't take long to find it once someone has the database file.
Find a separate method for storing the key. It should either be coded into the application or stored in a file that is obfuscated in some way.