October 2018
Beginner to intermediate
436 pages
9h 36m
English
Besides using bitwise operations, basic mathematical operations can also be used. If addition has a subtraction counterpart, we can encrypt a file using addition and decrypt it with subtraction, and vice-versa. The following code shows decryption using addition:
mov ecx, 0x10 mov esi, 0x00402000loc_00401000: mov al, [esi] add al, 0x10 mov [esi], al inc esi dec ecx jnz loc_00401000
The beauty of byte values is that they can be processed as signed numbers, if, for example, given this set of encryption information:
data = 0x00, 0x01, 0x02, 0x0a, 0x10, 0x1A, 0xFE, 0xFF key = 0x11 encrypt algorithm = byte subtraction decrypt algorithm = byte addition
After each byte gets subtracted with 0x11, the encrypted data would be the ...
Read now
Unlock full access