使用 pgcrypto 代替分区级加密是否有一些安全优势?
此处的文档: http://www.postgresql.org/docs/8.2 /static/encryption-options.html 描述了使用 postgresql 时加密数据的几种方法。
我想知道使用 pgcrypto 加密特定列而不是简单地加密数据库所在的整个分区是否有任何安全优势。在我看来,pgcrypto 使用起来很麻烦(而不是仅仅使用 SQL 查询而不必担心东西被加密),所以它的存在应该有一个理由。仅仅是因为人们可能没有能力管理数据库服务器(共享主机/等等),所以他们不得不使用 pgcrypto 来凑合,还是有安全原因?
在我的特定情况下,应用程序代码和数据库位于同一主机上,因此在服务器运行时损害服务器本身将导致数据以任何方式泄露(在一种情况下,可以在代码中查找加密密钥,或者只是从另一个中已安装的卷中检索数据)。
编辑:我忘了提及,同样在这种特殊情况下,数据由服务器而不是客户端使用,即客户端无法在运行时提供密钥,它必须在应用程序代码中的服务器上。
The document here: http://www.postgresql.org/docs/8.2/static/encryption-options.html describes several approaches to encrypting data when using postgresql.
I would like to know if there's any security advantage to encrypting specific columns using pgcrypto instead of simply encrypting the entire partition on which the database resides. It seems to me that pgcrypto is cumbersome to use(instead of just using SQL queries without having to worry about things being encrypted) so there should be a reason for its existence. Is it simply that people may not have the ability to manage the database server(shared hosts/etc...) so they would have to make-do with pgcrypto, or is there a security reason?
In my particular case, the application code and the database are on the same host, so compromising the server itself while it is live would result in the data being leaked either way(one could look for the encryption key in the code in one case, or simply retrieve the data from the mounted volume in the other).
Edit: I forgot to mention, also in this particular case, the data is used by the server not the client, ie, the client can't provide the key at run-time it would have to be on the server in the application code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果客户端提供加密密钥,则服务器不必受信任If the client provides the encryption keys, The server does not have to be trusted