C Programming Language
DI Management Services, Sydney, Australia  
DI Management Services is a database design and business systems consultant based in Sydney, Australia ...more... We analyse your business management systems and design custom software solutions + database design + programming
Back Home Page Next
===
 

Modular Arithmetic Freeware

To help with your modular arithmetic calculations we have released two freeware command line programs that carry out modular exponentiation and inversion computations on reasonably large natural numbers.

Download modarith.zip (44 kB)

bd_modexp computes the modular exponentiation a^e mod m, and bd_modinv computes the modular inversion a^-1 mod m.

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 2^192 (or up to the character limit in your command line).

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 instructions in the readme file.

To comment on this Contact DI Management.    Return to the RSA Algorithm Page.    [Top]Return to top of page

 
===
Copyright © 2002 DI Management Services Pty Limited ABN 78 083 210 584 Sydney, Australia. www.di-mgt.com.au. All rights reserved.

Home | What We Do | Services | Our Approach | About Us | Projects | Tips | Links | Cryptography | CryptoSys API | About This Site | Contact | Email Us

Valid HTML 4.0!