Go - 二进制密码安全
我打算在我的 Go 应用程序中保存密码/密钥,以便与其他一些应用程序进行通信。我想知道如何保护它,例如某人获取二进制文件并在某些十六进制查看器中搜索它。这种安全做法是否常见,还是我担心太多了?
I intend to save a password/secret key in my Go application to be used in communication with some other applications. I wonder how to secure it from for example someone obtaining the binary and searching for it in some hex viewer. Are such security practices common, or am I worrying too much?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
简而言之:
不要!
它不会安全;它会被打破。此外,如果每个人都使用相同的密码,那么当一个人的密码被破解一次时,每个人的密码都会被永久破解。
Succinctly:
Don't!
It won't be secure; it will be broken. Further, if everyone is using the same password, then when it is broken once for one person, it is broken for all time for everyone.
混淆数据和/或代码。这意味着以相当难以搜索的形式存储密码,并且如果找到其位置,则密码相当难以破译。
如果没有足够安全的混淆方法(您想要完全安全),唯一的解决方案是不要将密码以任何形式放入可执行文件中。
Obfuscate the data and/or code. This means to store the password in a form that is reasonably difficult to search for, and if its location is found the password is reasonably difficult to decipher.
In case no obfuscation method is secure enough (you want full security), the only solution is not to put the password into the executable in any form.