Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Library for RSA implementation in pure C

I'm looking for a very simple implementation of RSA in C. I need to place it in a DSP, so I'd like to use something very thin and straightforward. Nonetheless, I just found only examples with little numbers (int or long) while I need to implement RSA at least at 1024 bits, so I also have to cope with large numbers.

Can you point me to some libraries or examples for this?

like image 666
Cristiano Ghersi Avatar asked Dec 25 '12 00:12

Cristiano Ghersi


2 Answers

The LibTomCrypt and related projects are very clean and understandable.

like image 195
President James K. Polk Avatar answered Sep 22 '22 09:09

President James K. Polk


The latest openssl release's source contains an implementation of RSA, which should work fine for your purposes. Alternatively, you may also consider the GNUPg project, another open-source project with an RSA component.

like image 42
hd1 Avatar answered Sep 24 '22 09:09

hd1