Departure (10-31-2012),[MPGH]Flengo (10-31-2012),luccss (10-31-2012),New - Hacker (11-03-2012),Otaviomorais (10-31-2012),pDevice (10-31-2012),Timboy67678 (05-15-2014)
Well it seems that people here seem to be under the impression that XOR is the only way to go in encryption, so I figured I'd demonstrate a little combination of a few methods I whipped up to enhance security. So basically what this method does is first it XOR's each character against a key. Then, it rotates the bits of each character, fucking up the string a bit more. After that, it adds the index of each character to it to remove the issue that characters which are the same are still the same after encryption. This is still not great, but it is more secure than standard XOR which can be cracked easily.
Code:#define rotateRight(a) __asm ror a, 1 #define rotateLeft(a) __asm rol a, 1 enum rotDir{ ROT_LEFT, ROT_RIGHT }; char* xor(char* str, int key){ int len = strlen(str); char* x = new char[len]; for(int i = 0; i < len; ++i) x[i] = str[i]^key; x[len] = 0; return x; } char* rotEachChar(char* str_, rotDir ROTDIR){ int len = strlen(str_); char* x = new char[len]; char cur; if(ROTDIR==ROT_LEFT){ for(int i = 0; i < len; ++i) { cur = str_[i]; rotateLeft(cur) x[i] = cur; } } else if (ROTDIR == ROT_RIGHT) { for(int i = 0; i < len; ++i) { cur = str_[i]; rotateRight(cur) x[i] = cur; } } else return "******s"; x[len] = 0; return x; } char* addEach(char* str){ int len = strlen(str); char* x = new char[len]; for(int i = 0; i < len; ++i) x[i] = str[i] + i; x[len] = 0; return x; } char* subEach(char* str){ int len = strlen(str); char* x = new char[len]; for(int i = 0; i < len; ++i) x[i] = str[i] - i; x[len] = 0; return x; } char* encrypt(char* text, int key){ return addEach(rotEachChar(xor(text,key),ROT_RIGHT)); } char* decrypt(char* text, int key){ return xor(rotEachChar(subEach(text),ROT_LEFT),key); }Hope this bumps you guys in the right direction. Example usage to prove it works:Code:encrypt() and decrypt() are the only methods you should be calling, the others are used only to perform each individual step.
Outputs:Code:char* x = encrypt("HURR DURR IM AN PIZZA",13); char* y = decrypt(x,13); cout << "HURR DURR IM AN PIZZA"<<endl << x << endl << y;
If you have any questions dont hesitate to ask. Also don't hesitate to tell me where I made mistakes/ have left room for improvement. Don't mind the unnecessary use of construct like the enum, just did that for the lulz. Also, Rotational XOR Encryption is a BS name, just sounded cool :P
The reason I release this in this section is because the users of this section are those in most dire need of what I have to offer. That is all.
Oh no! Vortex is gay!
Departure (10-31-2012),[MPGH]Flengo (10-31-2012),luccss (10-31-2012),New - Hacker (11-03-2012),Otaviomorais (10-31-2012),pDevice (10-31-2012),Timboy67678 (05-15-2014)
dis here iz da coolest encryption ah've seen in uh while. pimp-tight motha fuckin werk it's amazing all ye damn hood ratz..
Saltine (10-30-2012)
@Saltine good work and yes its a lot better than normal xor.. there is one slight problem... your encrypted results can go outside the ascii table boundary, meaning it can and will generate non readable characters, this is fine if you want to first convert all your string to byte array ready for decryption, but wouldn't it be a lot easier to input readable strings, you can do this of cause by using mod function in your algo so you stay within the readable characters.
Saltine (10-31-2012)
helped me understand a little more about what i have to do bad thing is i have no idea how to do it LOL so help me please
ok so i have this
and i need thisCode:#define STRING_Pickup /*PickupHack*/Dencrypt("Pickup") #define STRING_WireFrameP /*WireFrame*/Dencrypt("") #define STRING_Skeleton /*Skeleton*/Dencrypt("")
Code:#define STRING_NxChams /*Nx Chams*/Dencrypt("{¥Mp•Žš*") #define STRING_ShowxFPS /*Show FPS*/Dencrypt("€•œ¤Ms}€") #define STRING_CrossHair /*CrossHair*/Dencrypt("pŸœ**uŽ–Ÿ")
basically i need to find a way to turn the Pickup WireFramep and Skeleton into the decrypt code like i have it there for Nx Chams Show FPS and CrossHair
So please help if anyone knows and understands how to make this possible ^.^
Can you give me compiled project?
That is pretty pimpin.
Thanked 138 Times in 16 Posts
Gamer2125 Links:
Hacks:
https://www.mpgh.net/forum/232-crossf...ck-v1-0-a.html
https://www.mpgh.net/forum/175-crossf...ion-0-5-a.html
Bypasses:
https://www.mpgh.net/forum/175-crossf...ion-0-3-a.html
Mods:
https://www.mpgh.net/forum/194-crossf...on-remake.html
https://www.mpgh.net/forum/194-crossf...osion-mod.html
https://www.mpgh.net/forum/194-crossf...creen-mod.html
https://www.mpgh.net/forum/194-crossf...backgroud.html
[IMG]https://i1128.photobucke*****m/albums/m493/derek2125/profilepic-2.gif[/IMG]
[IMG]https://i265.photobucke*****m/albums/ii208/GraveDigger2125/NewSig.jpg[/IMG]
I Read All Of My PM's & VM'sIf you need help with anything, just let me know.
Staff Administrator Since 10.13.2019
Publicist Since 04.04.2015
Middleman Since 04.14.2014
Global Moderator Since 08.01.2013
Premium Since 05.29.2013
Minion+ Since 04.18.2013
Combat Arms Minion Since 12.26.2012
Contributor Since 11.16.2012
Member Since 05.11.2010