How to handle big integers in C

后端 未结 5 1506
无人及你
无人及你 2021-01-13 13:26

I want to implement cryptography algorithms. So I need a suitable data type to handle integers with a lot of digits.

Many recent languages, such as Java, Python and

5条回答
  •  情歌与酒
    2021-01-13 13:45

    If you are interested in Cryptography, then everything has to be correct. Either you spend many months writing and testing and testing and testing... your own big number arithmetic functions, or you use an existing library.

    It is difficult enough getting crypto to work correctly when you know that the methods you are using are correct. It is almost impossible if the methods you are using have subtle errors.

    For crypto use GMP, and concentrate on the crypto.

    If you want to write your own large number arithmetic package, then by all means do so. I have done the same myself and it is an interesting and useful experience. But don't use your own work for anything critical.

提交回复
热议问题