andrewkiluk / RSA-Library

This is a C library for RSA encryption. It provides three functions for key generation, encryption, and decryption.
MIT License
378 stars 145 forks source link

A question on modulus #2

Open unitware opened 6 years ago

unitware commented 6 years ago

Hi, I'm looking for a leight weight rsa library and this surely is one.

But can it handle keys with 2048 bits? The key classes only handles long long modulus?

struct public_key_class{
  long long modulus;
  long long exponent;
};

I'm trying to find out the values to use with this command:

openssl rsa -pubin -inform PEM -text -noout < ../qep/scripts/usb_flash/public.pem 
Public-Key: (2048 bit)
Modulus:
    00:d5:f5:ae:6f:8c:3d:34:f6:da:05:91:d0:50:ad:
...some lines rmoved...
    dc:99
Exponent: 65537 (0x10001)