You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
633 B

10 years ago
RSA Key Generation, Encryption and Decryption example in python
10 years ago
You can use as reference OpenSSL's RSA module that can produce following output, e.g.
10 years ago
```bash
10 years ago
$ 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
10 years ago
```
10 years ago