为 AES 256 位编译 mysql
根据mysql文档
“使用 128 位密钥长度进行编码,但您可以通过修改源将其扩展至 256 位。”
但他们似乎没有提供在哪里进行更改的说明。有人经历过这种情况吗?应该更改哪个源文件?
注意:我使用这些步骤进行编译。
According to mysql document
"Encoding with a 128-bit key length is used, but you can extend it up to 256 bits by modifying the source."
But they didn't seem to provide instruction where to change. Anyone experience with this situation? which source file should change?
Note: I use these steps to compile.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我发现 mysql 邮件列表
文件包含 的帮助很少/my_aes.h
因为我使用 OpenSuSe 11.1 需要有以下工具,
然后只需按此指令编译它 - 此处
感谢 LenZ 和 tripanel.net
I found little help from mysql mailing list
file include/my_aes.h
as I'm using OpenSuSe 11.1 need to have following tools
then just compile it by this instruction - here
Credit to LenZ and tripanel.net
在客户端应用程序中执行加密可能会是一个更易于维护的解决方案。
此外,您还可以受益于对网络上传输的数据进行加密,而不是通过网络发送密钥(当然您可以使用 SSL 连接到 mysql 来缓解这种情况)。
如果这看起来不是一个好方法,请发布您的要求。
您可能不想编译自己的 mysql 二进制文件;对于开发人员来说,除了构建自己的 mysql 二进制文件之外,还有更多有用的事情要做。 MySQL / Sun 的经过广泛测试,不会包含性能回归(我们希望)。
mysql AES_ENCRYPT() 函数也可能不安全,因为它们没有记录它们
如果它们以易受攻击的方式完成,则加密可能非常弱。这是否重要取决于您的用例。
It's probably going to be a more maintainable solution to carry out the encryption in the client application.
Moreover, you'll also then get the benefit of then having the data carried over the network encrypted and not sending the key over the network (Of course you can use SSL to connect to mysql to mitigate this anyway).
If this does not seem like a good approach, please post your requirements.
You probably do not want to compile your own mysql binaries; there are more useful things for developers to do than building their own mysql binaries. MySQL / Sun's ones are extensively tested and won't contain performance regressions (we hope).
The mysql AES_ENCRYPT() functions are also potentially not secure because they haven't documented
If they're done in a vulnerable way, the encryption could be very weak. It depends on your use-case whether this matters.