Multiprecision Integer and Rational Arithmetic C/C++ Library

MIRACL is a Big Number Library which implements all of the primitives necessary to design Big Number Cryptography into your real-world application. It is primarily a tool for cryptographic system implementors. RSA public key cryptography, Diffie-Hellman Key exchange, DSA digital signature, they are all just a few procedure calls away. Support is also included for even more esoteric Elliptic Curves and Lucas function based schemes. The latest version offers full support for Elliptic Curve Cryptography over GF(p) and GF(2m) - see the links on this page for more details. Less well-known techniques can also be implemented as MIRACL allows you to work directly and efficiently with the big numbers that are the building blocks of number-theoretic cryptography. Although implemented as a C library, a well-thought out C++ wrapper is provided, which greatly simplifies program development. Most example programs (25+ of them) are provided in both C and C++ versions.

MIRACL now provides more support for conventional cryptography. The latest version implements the Advanced Encryption Standard (AES), Modes of Operation, and the new hashing standards SHA-160/256/384/512.

MIRACL is compact, fast and efficient and its now easier than ever to get the same near-optimal performance from any processor. Although essentially a portable library, inline assembly and special techniques can be invoked for blistering speed. MIRACL has also been successfully used in both embedded and DSP environments where space is at a premium. A new special purpose macro assembler feature facilitates the achievement of best possible performance from your embedded processor (see embedded.doc). MIRACL is, to an extent, self-configuring. Use your compiler to compile and run a simple configuration program, which proceeds with user interaction to generate optimal settings for your environment.

New in Version 5.00 is support for very constrained environments. In this mode of operation, all memory can be allocated exclusively from the stack, so that no fragmenting of precious RAM resources is required. New configuration options further reduce the amount of program code. See the file update.txt

Unlike other Cryptographic libraries, MIRACL does not merely provide an opaque interface to a predetermined set of Cryptographic methods, but rather a set of tools that enable any new number-theoretic technique to be implemented quickly, so that the end-user is, for example, free to design their own Cryptographic API. It is particularly appropriate (and free!) for educational use.