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?

有帮助吗?

解决方案

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.

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top