Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Golang: protect source code

Tags:

go

encryption

Go/Golang in general at the moment is a hard thing to search for, nor did I find what I was looking for here. I know there some level of encryption that can be done during compilation of an app in several languages. Can anyone give me a quick rundown of the security of Go source code after being compile to an exe? If it can be read, at least in part, is there anything out there to increase security of the source code?

like image 785
kwolfe Avatar asked Jan 12 '23 18:01

kwolfe


1 Answers

Distribute only the binary (per platform/architecture). That's the best you can get with any language. There's no way how to distribute a program while being safe of reverse engineering it. Anyone telling you something different is probably just trying to sell you a "protection" scheme. No such thing really exists.

On the other hand: 99.9% of your potential users probably have no idea how to reverse engineer your program.

On the yet another hand: It's enough if 0.01 of your potential users have the ability to reverse engineer your program and you're doomed.

IOW, try to find out a business model which relies on anything else but security by obscurity. Actually, even open source code can generate profit - if the value of it is not only in having access to the source code per se.

like image 52
zzzz Avatar answered Jan 30 '23 20:01

zzzz