blob: cbc0eb325c424b9a47245bb1cf5cbf2880cb96ca [file] [log] [blame]
Sybren A. Stüvela3fd61a2011-07-31 00:22:31 +02001Compatibility with standards and other software
2==================================================
3
4Python-RSA implements encryption and signatures according to PKCS#1
5version 1.5. This makes it compatible with the OpenSSL RSA module.
6
7Keys are stored in PEM or DER format according to PKCS#1 v1.5. Private
8keys are compatible with OpenSSL. However, OpenSSL uses X.509 for its
9public 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
26Public keys from OpenSSL
27--------------------------------------------------
28
29To get a Python-RSA-compatible public key from OpenSSL, you need the
30private key. Get the private key in PEM or DER format and run it
31through 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