http://ghiribizzo.tsx.org

Tutorials

The trimmed down version of my original tutorial is now available on the tutorials section. I might still write the extended version which gives details for cracking Hiew using both SoftICE and IDA.

Tools

Toolpack 1 - contains:
CN.EXE 		- Bignum hex/dec converter with bit counter
FACTOR.EXE	- Factorising program (modified)
CE.EXE		- Exponent calculator
GHIRIRSA.DLL	- Exports RSA encrypt for use in keygens
RSADEMO.ASM	- Example of how to use the RSA DLL (TASM)
RSADEMO.EXE	- Precompiled binary

Using GHIRIRSA.DLL

Using this DLL and the tools I supply, you will never need to touch a bignum library yourself - you can write your programs as usual. The DLL exports the following function:

int ghRSAexp(char * lpe, char * lpn, int base, char * lpm, char * output)

I have supplied RSADEMO.ASM as a demonstration of how to use the DLL. Compile it with TASM or run the supplied precompiled RSADEMO.EXE. The DLL is fairly bloated (64k) it should shrink down to around 25k if you want to pack it. You can of course use a bignum library directly, but then you'll either have to write your keygen in C (I prefer asm for keygens) or deal with interfacing with the library in assembly. By using the DLL, you don't need to learn anything else. Also, I find spreading a keygen with a separate DLL a little messy. You might like to include the DLL into your exe (perhaps compressed) and recreate it at run time.

Notes

- These utils can deal with reasonably large numbers, if you need them to deal with larger ones, email me and I'll recompile to allocate greater space. All the programs were written using the MIRACL multi-precision library. It's a good idea to download it and take a look for yourself.

- The bignum hex/dec converter will also count the number of bits in a number in addition to its converter duties.

- The factor program is taken from the MIRACL library. I've stripped out almost all the the ECM method as it isn't really useful for the RSA key sizes we will be dealing with. Also, I've added new input method(s) - I don't really remember what I added now. The binary file input mode expects number to be LSB first. I will also add hex input and strip out the message suppression code too.

- The exponent calculator calculates the inverse exponent for you. It takes decimal and hexadecimal input. Note that you cannot explicitly force it into hexadecimal mode, it will do this automatically if it detects a digit 'a'-'f'. The chances of this not occuring the the size of number we will be using is pretty small, but if you really want explicity hex mode, email me. You can also use a maths package, for example, Mathematica, to calculate the inverse exponent.


Site Maintained by Ghiribizzo.