1. ## Encryption Lite

I decided to make a legitimate regkey for APISpy32 V2.4 (same regkey also works for V2.5) rather than unpack it, then patch it. That always seems so messy and I would rather not do that if I can avoid it. I was able to create a regkey for my regname halifax. However, I had to do it using brute force. It took about 20 minutes to test/record all 255 byte combinations (01 to FF) results for the encryption method used. Then you have to XOR the bytes that are needed for your name with 50+i (where i is the name char position). What I could use some help with is if somebody knows how to do the math so that brute force isn't needed. Below is an example of the encryption technique:

START WITH BYTE 1A TO ENCRYPT (OR DECRYPT DEPENDING ON HOW YOU LOOK AT IT)

1 1 x 1A= 1A (IF <=8899h CONTINUE)
2 1A x 1A= 2A4 (IF <=8899h CONTINUE)
3 2A4 x 1A= 44A8 (IF <=8899h CONTINUE)
4 44A8 x 1A= 6F910 (IF >8899h DIVIDE 6F910/8899= D REMAINDER 94B)
5 94B x 1A= F19E (IF >8899h DIVIDE F19E/8899= 1 REMAINDER 6905)
6 6905 x 1A= AAA82 (IF >8899h DIVIDE AAA82/8899=13 REMAINDER 8727)
7 8727 x 1A= DB9F6 (IF >8899h DIVIDE DB9F6/8899=19 REMAINDER 6305)

DIVIDE THE REMAINDER OF THE SEVEN ITERATIONS BY BB
6305/BB = 87 REMAINDER 68h (h)

h - first letter of my regname

Now if I want the remainder to be 61h (a-second letter of regname), how would I mathematically find what byte to start with? Turns out to be 3A, but how can that be determined mathmatically? Any math whizes out there or someone that can point me in the right direction?

(Sorry about the format of the example.) 2. Well, if I understood this algorithm correctly, it's a
very silly byte stream cipher, and your method to break
it is just fine. The complete algorithm is just useless,
since one can indeed build a lookup table that will be
used for any encryption/decryption ; therefore, this
cannot be called brute-force since you do it only once
and then you can reuse it to generate any key. To my
knowledge there's no analytical solution to this algorithm.

Regards,

Spath. 3. Thanks for taking the time to look at the algorithm. I spent a few hours trying to reverse it mathmatically, after I had built the table, and didn't really get anywhere. Looked up stuff for modulo math, etc. Guess I will move on to something else. #### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•