Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top