I think you misunderstand the possibilities generated by encryption.
While the program is running on an untrusted host, it is not possible to guarantee anything.
In the best case, you can make it difficult (encryption, obfuscation of the code) or extremely difficult (self-modifying code, detecting debugging / hooks) for someone to reverse engineer the code, but you cannot prevent cracking. And with the Internet, it will be available to everyone as soon as it is broken by one person.
The same is true so that a person does not interfere with the setting. Regardless of which method (CRC, Hash โ, by the way, encryption is not designed to prevent unauthorized access), you can still redesign it with sufficient time and money (and motivation).
The only way to guarantee a non-configurable configuration is to save it somewhere where you control (the server), sign it (asymmetrically) and check the program for signature. But even then, it would not hurt anyone to get out with a patch that allowed your program to work with a user-provided (unsigned) configuration file ...
And do you know the worst of it? People are likely to prefer the hacked version, as they are relieved of the burden of all these security measures, they will work faster ...
Note: yes, it is illegal, but let it be pragmatic ...
Note: in terms of motivation, the smarter you defend the program, the more attractive it is for hackers โ it is like a brain teaser for them!
So how do you provide a secure service?
- You need to trust the one who runs the program
- You need to trust the one who stores the configuration
This can be done only if you offer a thin client and run everything on a server that you trust ... and even then you will have problems with the fact that no one will find doors on your server that you did not think about.
In your boots, I would just make sure I found a slight tampering with the setup (consider it hostile and make sure to check the data before running anything). After all, file corruption is equally likely, and if a damaged configuration file meant a corrupted client machine, it would pay hell :)