0

I want to implement a RSA algorithm in C so I'm going to use large numbers. If select a p and q of 8 digits and I multiply them I get an overflow error when trying to compile the code so I've thought that maybe there is some way to use bignumbers or some method to work with very large numbers.

Can anyone give 5 cents?

Kxzym
  • 11
  • 1
  • 4
  • http://www3.cs.stonybrook.edu/~skiena/392/programs/bignum.c – pm100 Feb 22 '16 at 22:20
  • [The GNU MP Bignum Library](https://gmplib.org/) is useful – MikeCAT Feb 22 '16 at 22:20
  • https://stackoverflow.com/questions/2640625/store-and-work-with-big-numbers-in-c – otc Feb 22 '16 at 22:20
  • You need a “big” or “multi precision” integer library. Those are readily available as free software, use your search engine. Of course, if you're going to use a library for integer arithmetic, you could also consider using a library for RSA as a whole but I suspect that this is a learning project. If you consider this part of the learning too, you can of course also try implementing your own multi precision integer library, if you find this an interesting task to solve. – 5gon12eder Feb 22 '16 at 22:21
  • Take a look at [GMP](https://en.wikipedia.org/wiki/GNU_Multiple_Precision_Arithmetic_Library). – Robert Dodier Feb 22 '16 at 22:21

0 Answers0