简体   繁体   中英

C RSA key generator

I create a program on a microntroller (which does not run any OS), and I can't find any library in C which can give me a RSA (PKCS#1) key generator (public and private).

I suppose that OpenSSH isn't an option because it's link to Linux or Unix. I found some SSH implementation, but it supports only the client side (encoding through a public key).

Does a such C lib exists (RSA (PKCS#1) key generator (public and private) + encoding, decoding)?

I highly doubt that there is a library like that, that makes no use of operating system functionality and runs on a microcontroller. A quick google search brought this up:

polarssl.org/rsa-source-code

Maybe you can use or adapt that.

For the embedded project without OS you can use:

  1. PolarSSL ( https://polarssl.org/ )
  2. CyaSSL ( http://www.yassl.com/yaSSL/Home.html )
  3. RSAEuro (github.com/mort666/RSAEuro)

Check the licenses for use this libraries in the comercial product. Currently I am trying to use PolarSSL for generating RSA key pairs. I use my cuted down version of this library that support all hardware features (AES, DES, 3DES, TRNG, SHA1, MD5, HMAC) incorporated into STM32F4 MCU.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM