Actually I'm trying to create a program that encrypts the input string & amp; Then decrypts it back to the original state using ASM x86.
The program accepts an encryption key (referenced as an EK in the program) which is a random letter and then encrypts the 6 character string after that. / P>
I'm having trouble writing the decrypt function. I just started leaving each line of encryption behind (the exx was changed to pop ecox, etc.) but it was advised that this is not correct.
Here is the main encryption function:
zero encrypted_chars (int length, four ek) {char temp_char; Temporary store for variable // (int i = 0; i
Returns;
and By-laws encrypt '':
Encrypt: ASI push Isiaks mop ASI, EX and Diward PTR [SSI], 0 Aksff RoR byte ptr [ASI] 1 RoR byte ptr [SSI] 1 by byte ptr [SSI], 0x01 Emoji Isiaks [SSI] pop ADX X 17: RoR DL, 1 dc Ansisian Jeanji x 17 Mega eX, ADX Ed eX, 0 x 20 XX eX, 0 XAAPAP ASIT
Input: EE C = Register 32-bit address of the e-e, Isiaks = Register is being encrypted characters (8-bit field, cl)
Output: EX = source (encrypted value of character Less 8-bit fields, AL).
Can anyone tell me (or can I indicate that I can find out somewhere) what lines are required for the decryption function?
Thanks in advance for any answers!
Try it:
decrypt: ESI push Isiaks mop ASI, EX and Divord PTR [SSI], 0 Aksff RoR byte ptr [SSI], 1 RoR byte ptr [SSI] 1 by byte ptr [SSI], 1 Emoji XX [SSI] pop EX XX EX, 0xAA all AX, 0x20 And EX, 0x FF X18: ROL L, 1 DC NCX JNG X18 POP SI RT
Why do you do it in the assembly Do not? You can simulate left and right bit rotation with view of shift operator or table.
No comments:
Post a Comment