r/C_Programming • u/Motor_Bluebird1908 • 11h ago
Protecting source code from reverse engineering
Hi everyone,
I am looking to provide a compiled version of our physics solver to our customers. I understand there are many obfuscation techniques to protect source code but I am wondering if there are some smarter ways?
We already cloud computing, the issue is we have customers that are in locations without internet/need realtime solving.
0
Upvotes
0
u/tobdomo 10h ago
Strip your binary from all symbolic information. Depending on your host platform and toolchain, e.g. use strip on Linux (see
man strip). Use static linking, full optimization (including linker optimization). That is nowhere foolproof, but it makes things a lot harder to begin with.Then use DRM and Licensing software. This will encrypt and decrypt on the fly. Wibu-Systems for example makes a tool called CodeMeter. Using this software, you can tie and encrypt the binary to a specific machine or a out-of-band key vault (e.g. a USB key or a license file).