Search code examples
ccryptography128-bit

Is there a library or other way to do 128-bit math operations?


I am writing a cryptography application and need to work with 128 bit integers.

In addition to standard add, subtract, multiply, divide, and comparisons, I also need a power and modulo function as well.

Does anyone know of a library or other implementation that can do this? If not 128-bit, is there a 64-bit option available?


Solution

  • Check out the GNU Multiple Precision Arithmetic Library.