|
| 1 | +Compatibility with standards and other software |
| 2 | +================================================== |
| 3 | + |
| 4 | +Python-RSA implements encryption and signatures according to PKCS#1 |
| 5 | +version 1.5. This makes it compatible with the OpenSSL RSA module. |
| 6 | + |
| 7 | +Keys are stored in PEM or DER format according to PKCS#1 v1.5. Private |
| 8 | +keys are compatible with OpenSSL. However, OpenSSL uses X.509 for its |
| 9 | +public keys, which are not supported. |
| 10 | + |
| 11 | +:Encryption: |
| 12 | + PKCS#1 v1.5 with at least 8 bytes of random padding |
| 13 | + |
| 14 | +:Signatures: |
| 15 | + PKCS#1 v1.5 using the following hash methods: |
| 16 | + MD5, SHA-1, SHA-256, SHA-384, SHA-512 |
| 17 | + |
| 18 | +:Private keys: |
| 19 | + PKCS#1 v1.5 in PEM and DER format, ASN.1 type RSAPrivateKey |
| 20 | + |
| 21 | +:Public keys: |
| 22 | + PKCS#1 v1.5 in PEM and DER format, ASN.1 type RSAPublicKey |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | +Public keys from OpenSSL |
| 27 | +-------------------------------------------------- |
| 28 | + |
| 29 | +To get a Python-RSA-compatible public key from OpenSSL, you need the |
| 30 | +private key. Get the private key in PEM or DER format and run it |
| 31 | +through the ``pyrsa-priv2pub`` command:: |
| 32 | + |
| 33 | + |
| 34 | + Usage: pyrsa-priv2pub [options] |
| 35 | + |
| 36 | + Reads a private key and outputs the corresponding public key. Both |
| 37 | + private and public keys use the format described in PKCS#1 v1.5 |
| 38 | + |
| 39 | + Options: |
| 40 | + -h, --help show this help message and exit |
| 41 | + --in=INFILENAME Input filename. Reads from stdin if not specified |
| 42 | + --out=OUTFILENAME Output filename. Writes to stdout of not specified |
| 43 | + --inform=INFORM key format of input - default PEM |
| 44 | + --outform=OUTFORM key format of output - default PEM |
0 commit comments