Page 1 of 1

Is it possible to build an encrypted .exe?

Posted: Sat Jan 25, 2020 4:19 pm
by artless
I want to share my game, but I don't want my players read the source code.
Is it possible to build a .exe that can't be unziped?

Re: Is it possible to build an encrypted .exe?

Posted: Sat Jan 25, 2020 5:14 pm
by grump
It is possible, you just have to modify the LÖVE source code to make it parse your custom/encrypted archive format.

Re: Is it possible to build an encrypted .exe?

Posted: Sat Jan 25, 2020 5:50 pm
by raidho36
It's definitely possible but it's more trouble than its worth. Consider how much time and effort you'd have to spend to do this, and if it outweighs the bad things that will happen if someone sees the code. Like, break out a calculator and try to really do the math on that one, put it in the numbers.

Re: Is it possible to build an encrypted .exe?

Posted: Sat Jan 25, 2020 7:56 pm
by grump
I'm offering my services: send me your LÖVE file under a confidentiality agreement, and I'll send back a package with your game that doesn't contain human-readable source code. I'm charging $49 USD per game. PM me for details.

Re: Is it possible to build an encrypted .exe?

Posted: Sat Jan 25, 2020 9:08 pm
by zorg
You can code horribly enough to not have anyone understand how it works, that's one solution :P
A bit more seriously, you can compile the code beforehand, but even that could be reverse engineered with enough effort, as raidho said.

Also, added to the master lists: https://love2d.org/forums/viewtopic.php ... 55#p223865

Re: Is it possible to build an encrypted .exe?

Posted: Sat Jan 25, 2020 11:55 pm
by monolifed
IMO, encryption is just another layer of deterrent like obfuscation, compiling to bytecode, combining with binary.
Player's machine will need unencrypted files at some point to run the game.

Re: Is it possible to build an encrypted .exe?

Posted: Sun Jan 26, 2020 1:52 am
by raidho36
People don't do this out of practical necessity, they do it because they're having a protracted brain fart. There are never seem to be any shortage of people who think that each of their individual pieces of work is valuable. Most of them understand that it's not the case once they start actually making things. There are never seem to be any shortage of people with cargo cult mentality either. Most of them never understand why they do the things they do.