I'm looking to protect my software that is written in PHP. The nature of PHP is that it is delivered as plain text and therefore cannot be protected by itself. I don't want to install libs to the server like ZendGuard, IonCube or SourceGuardian. I want that individuals should use the software but should not interfere with the protected part of the application (licensing, sensitive parts). The software is distributed to clients as trial software.
Encrypt the payload with a blockcipher (AES) and store the key on a remote system. To software would require the key to decrypt the payload. An obfuscated part of the software should contact the key server via cURL over SSL and request the decryption key. The decryption key should only be sent back to the Server IP that holds a trial license. A checksum of the files could also be posted with the key request and if it even fails once, the key server could reject to provide the decryption key forever, which should hopefully prevent tampering.
- The client requesting the trial will be known in advance so unauthorized copies of the software should never receive a (correct) decryption key in first place.
- The decryption keys are unique to every client and the payload parts are too.
- The code will never be stored decrypted but only decrypted at runtime and eval()'ed.
- Is this a feasable or doomed to failure?
- Wouldn't this protect even against the tiniest tampering by anyone?