Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ Exe Encryption? [duplicate]

Tags:

c++

encryption

Do I need to encrypt the exe file that the Microsoft Visual C++ compiler makes for me? I have a game made with a few libraries and I have all of the resources encrypted but I'm worried about people breaking into the exe and changing the code, is that possible?

like image 399
user2184442 Avatar asked Mar 21 '13 06:03

user2184442


People also ask

Can exe files be encrypted?

Just right-click on your .exe file you want to encrypt and select “Encrypt with Free EXE Lock” menu item. Check it if you need. Another option – “Password needed when start Free EXE Lock” – offers the password protection for Free EXE Lock itself.

Can I decrypt EXE file?

You can't "decrypt" a normal EXE file to get anything like the original input: the compiler "translates" a higher level language such as C++ into machine code, optimises it, and produces a binary file which cannot easily be converted back to C++ again.

What is Cypher EXE?

Cipher.exe is a command-line tool (included with Windows 2000) that you can use to manage encrypted data by using the Encrypting File System (EFS).


2 Answers

There's no way to make uncrackable software. If it's on a user machine, user has theoretically full control over it.

What you can try to do is make it harder for people to crack. What you are looking for is called "Executable compression". Armadillo does something like this, so does UPX.

A comprehensive list of PE format packers can be found here.

To encrypt zipped resources you can use the LZMA SDK with an archive format that supports encryption. Beware where you try to hide that encryption key though. As they say, "you can run, but you can't hide" :)

Welcome to the ugly world of DRM.

like image 154
Ed Rowlett-Barbu Avatar answered Sep 25 '22 00:09

Ed Rowlett-Barbu


No matter, which technique you will use, if you ship both executable and resources to end user and if it is worth it, they eventually will be cracked and you can do nothing about it. You may only make the decryption process harder, but increasing security will only affect legal users and you will waste your time, which you could spend on improving your software.

Apple programmers are for sure better than you and me, yet all of their iPhones eventually got jailbreaked.

like image 20
Spook Avatar answered Sep 28 '22 00:09

Spook