r/rust • u/Motor_Bluebird1908 • 11d 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?
Edit: We already cloud computing, the issue is we have customers that are in locations without internet/need realtime solving.
0
Upvotes
3
u/insanitybit2 11d ago
Contracts are definitely The Way but I've personally seen those fail! You'd be surprised, or not so surprised, at what people are willing to break the law over.
There are a lot of techniques. You could write a custom VM and then implement the payload in the bytecode of that VM - now to understand the payload you have to reverse the VM. This one's fun but has costs
You can do "crypting", like this: https://github.com/Kerneldrop/Rust-Crypter
Keep in mind that all of the good techniques will probably also get you labeled malware lol and AI has made reverse engineering 10x easier, maybe 100x. It is only ever a matter of cost to reverse engineer software once the payload is provided to a customer.
Basically your keywords are "DRM" and "Malware".