RSA Key Generation, Encryption and Decryption example
Go to file
2014-09-11 16:20:38 +02:00
README.md minor addition 2014-09-11 16:20:38 +02:00
rsatest-run.png resized rsatest-run.png 2014-09-11 14:49:11 +02:00
rsatest.py set e = 2^16+1 (65537) as per recommendation in Dan Boneh's Twenty Years of Attacks on the RSA Cryptosystem - http://crypto.stanford.edu/~dabo/pubs/papers/RSA-survey.pdf 2014-09-11 15:29:41 +02:00

RSA Key Generation, Encryption and Decryption example in python

You can use as reference OpenSSL's RSA module that can produce following output, e.g.

$ openssl genrsa 32 |openssl rsa -noout -text Generating RSA private key, 32 bit long modulus .+++++++++++++++++++++++++++ .+++++++++++++++++++++++++++ e is 65537 (0x10001) Private-Key: (32 bit) modulus: 2719120549 (0xa2127ca5) publicExponent: 65537 (0x10001) privateExponent: 1790467441 (0x6ab85d71) prime1: 53267 (0xd013) prime2: 51047 (0xc767) exponent1: 37383 (0x9207) exponent2: 28991 (0x713f) coefficient: 16388 (0x4004)

$ openssl genrsa 32 |openssl asn1parse