10

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?

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Cristiano Ghersi
  • 1,944
  • 1
  • 20
  • 46

2 Answers2

7

The LibTomCrypt and related projects are very clean and understandable.

President James K. Polk
  • 40,516
  • 21
  • 95
  • 125
  • apparently, the web site has moved to here -> http://www.libtom.net/?page=features&newsitems=5&whatfile=crypt – torus May 15 '15 at 02:38
1

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.

hd1
  • 33,938
  • 5
  • 80
  • 91