First of all, I have done a lot of research before but I have to ask something that may be simple... or not, but I prefer to ask you in order to be sure...
I have two kind of keys, one set up by me and the other is a simple FourCC code. However, It's pretty simple to find them in the code of the .exe by using HxD for example. So I would like to hide the key in the .exe, but not to change it, here is the example of my key :
BYTE * pbData = new BYTE[dwDataSize];
file.Read(pbData, dwDataSize);
CLZObject zObj;
static DWORD mykey[4] =
{
000000,
11111111,
222222222,
33333333
};
if (!CLZO::Instance().Decompress(zObj, pbData, mykey))
{
delete[] pbData;
return false;
}
As you can see, I use LZO but it's still easy to find the key as we usually know where she is...
Then, here's the FourCC (it's absolutely easy to find because we just have to type the letter, example : DXT1.
case MAKEFOURCC('D','X','T','1'):
strncpy_s(strPixelFormat, 512, "DXT1", 31);
m_CompFormat = PF_DXT1;
break;
So I thought to hide the key by using memory (I don't have example but I could provide one) or to encrypt the key in order to hide it from the program, but I don't know (or I'm not sure) how to encrypt something like that :
000000,
11111111,
222222222,
33333333
Thanks, Have a nice day ! :)
Edit: Years ago I have come with a whole different approach using some obfuscating algorithm (some publicly available) that did exactly what I was looking for.