Click here to Skip to main content
14,926,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I all,
After years, I start to play with C again, and I need a bigint library.
What library would you advice, preferably free with source code.

What I have tried:

Actually searching internet.
Just found that there is a GMP, but no idea how it is.
[Update]
Want to play/butchering with numbers like RSA2048.
Posted
Updated 28-Nov-20 1:48am
v3
Comments
CPallini 19-Nov-20 16:04pm
   
GMP looks a good choice, but I never dealt with bigint libraries, sorry.
Patrice T 19-Nov-20 16:46pm
   
No problem.
k5054 19-Nov-20 17:49pm
   
Patrice T 19-Nov-20 17:58pm
   
Got some experience with it ?
k5054 19-Nov-20 18:02pm
   
No, but it looks a lot simpler than mucking about with gmp. But there's a boost multi-precision class that might be a better option. One of the types wraps gmp bigints so you get a cleaner interface and trusted goodness of gmp and boost.
Rick York 19-Nov-20 18:52pm
   
How big do they need to be? This one supports 96-bit integers : https://www.codeproject.com/Articles/371/CInt96-v1-04-96-Bit-Integers. Except it uses MFC but probably just for CString and that can replaced easily enough.
Patrice T 19-Nov-20 19:38pm
   
:) Want to play with RSA2048.

see if this helps:
math lib written in C
   
Hi,

I would recommend that you take a look at MPIR[^].

Best Wishes,
-David Delaune
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900