DI Management Home > Cryptography > Modular Arithmetic Freeware

Modular Arithmetic Freeware


To help with your modular arithmetic calculations we have released some freeware command line programs that carry out modular exponentiation and inversion computations on large natural numbers. Updated 18 June 2009.

Download bd_funcs-1.1.0.zip (102 kB)

You use these utilities from the command line prompt. They work in either decimal or hexadecimal format, and can cope with positive digits up to 28192 which covers integers up to 2466 decimal digits in length (your command line interpreter may have shorter limits).

To use, copy the EXE files into a directory that will be searched when you are in the command prompt.

Some simple examples of their use are

C:\>bd_modexp 14313 3 17947
14313^3 mod 17947 = 13366

C:\>bd_modinv 3 17680
3^-1 mod 17680 = 11787

C:\>bd_modexp 13366 11787 17947
13366^11787 mod 17947 = 14313

C:\>bd_modexp -x 3436 2e0b 461b
3436^2e0b mod 461b = 37e9

Note that the last calculation was just the previous one but in hex.

There are more examples in the readme file.

Contact

Email Us

This page last updated 18 June 2009