MIRACL (Multiprecision Integer and Rational Arithmetic C/C++ Library) is a famous library used most of the time for implementing number-theoretic based methods of cryptography. I don't know how to code in C and C++ so I was wondering are there other libraries like MIRACL but for python?


I'm not familiar with MIRACL and I don't know what features you're looking for, anyway, but Python has arbitrary-sized integers (int) and rational numbers (fractions.Fraction) built in.


For Python, you can use Charm: https://jhuisi.github.io/charm/install_source.html

In Charm, you will find a wide range of implemented schemes that can be easily used, please see this example for the RSA public key encryption https://jhuisi.github.io/charm/charm/schemes/pkenc/pkenc_rsa.html

This is a list of all the implemented cryptographic protocols: https://jhuisi.github.io/charm/schemes.html


I'm also not familiar with MIRACL but one very good Python Cryptographic library would be PyCryptoDome. You can find it's documentation here.

Hope this helps :)

  • How do we know it supports multiprecision?
    – Mr.
    Sep 7 at 3:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.