troubleshooting Question

XOR Encryption and Security

Avatar of Mohamed Abowarda
Mohamed AbowardaFlag for United States of America asked on
CC++SecurityVisual C++.NETEncryption
62 Comments18 Solutions1132 ViewsLast Modified:
I am trying to create strong XOR encryption using C++ to encrypt files and then load the decrypted file into memory as LPCVOID

I want idea about a STRONG XOR encryption, since I know the following is easy to crack:
encryptedData = originalData ^ key;

I thought about something similar to the following:
encryptedData = originalData ^ key;
encryptedData ^= 52955258604;
encryptedData ^= 25435347522;
encryptedData ^= 25435443543;

However, I am not sure if that will be strong enough to the file very hard to crack.

Here is what I want:
1. Idea about a STRONG XOR Encryption and Decryption method.
2. How to load the decrypted data into LPCVOID for further use.
ASKER CERTIFIED SOLUTION
evilrix
Senior Software Engineer (Avast)

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 18 Answers and 62 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 18 Answers and 62 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros