blob: c9dac393ba901c9635fc328123d3cd34cfb506cd [file] [log] [blame]
Sybren A. Stüvela3fd61a2011-07-31 00:22:31 +02001Compatibility with standards and other software
2==================================================
3
Sybren A. Stüvelc1c455d2011-08-01 23:04:30 +02004.. index:: OpenSSL
5.. index:: compatibility
6
Sybren A. Stüvela3fd61a2011-07-31 00:22:31 +02007Python-RSA implements encryption and signatures according to PKCS#1
8version 1.5. This makes it compatible with the OpenSSL RSA module.
9
10Keys are stored in PEM or DER format according to PKCS#1 v1.5. Private
11keys are compatible with OpenSSL. However, OpenSSL uses X.509 for its
12public keys, which are not supported.
13
14:Encryption:
15 PKCS#1 v1.5 with at least 8 bytes of random padding
16
17:Signatures:
18 PKCS#1 v1.5 using the following hash methods:
19 MD5, SHA-1, SHA-256, SHA-384, SHA-512
20
21:Private keys:
22 PKCS#1 v1.5 in PEM and DER format, ASN.1 type RSAPrivateKey
23
24:Public keys:
25 PKCS#1 v1.5 in PEM and DER format, ASN.1 type RSAPublicKey
26
Sybren A. Stüvelc1c455d2011-08-01 23:04:30 +020027:VARBLOCK encryption:
28 Python-RSA only, not compatible with any other known application.
Sybren A. Stüvela3fd61a2011-07-31 00:22:31 +020029
30
31Public keys from OpenSSL
32--------------------------------------------------
33
34To get a Python-RSA-compatible public key from OpenSSL, you need the
35private key. Get the private key in PEM or DER format and run it
36through the ``pyrsa-priv2pub`` command::
37
38
39 Usage: pyrsa-priv2pub [options]
40
41 Reads a private key and outputs the corresponding public key. Both
42 private and public keys use the format described in PKCS#1 v1.5
43
44 Options:
45 -h, --help show this help message and exit
46 --in=INFILENAME Input filename. Reads from stdin if not specified
47 --out=OUTFILENAME Output filename. Writes to stdout of not specified
48 --inform=INFORM key format of input - default PEM
49 --outform=OUTFORM key format of output - default PEM
Sybren A. Stüveld92b6672011-07-31 17:44:44 +020050