TomsFastMath is a fast public domain, open source, large integer arithmetic library written in portable ISO C. It is a port of LibTomMath with optional support for inline assembler multipliers. It has the following features.

  • Public domain, open source and freely accessible
  • Builds with GCC [preferably v3.3.x or higher] on any 32-bit/64-bit box
  • Includes ASM optimizations (inline) for
    • x86-32 (e.g. i386 and SSE2)
    • x86-64 (e.g. AMD64)
    • ARM (ARMv4 and higher)
    • PPC32 (e.g. G3/G4)
    • PPC64 (e.g. G5)
    • AVR32 (Atmel 32-bit RISC processor)
    • MIPS (32-bit)
  • Includes fairly complete API (provides most of what LibTomMath provides)
  • Uses similar API as LibTomMath makes porting easy
  • Competitive speeds (and getting higher).
    • Faster than OpenSSL on the AMD64
    • Still room for improvements
  • No heap usage (malloc/calloc/free)
  • Uses only inline asm, simplifies build process, simple to add new ports