diff options
author | Коренберг Марк <socketpair@gmail.com> | 2018-06-26 23:26:27 +0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2018-06-26 13:26:27 -0500 |
commit | 3bab819c558ead888825e33f8df3f17707ff2c20 (patch) | |
tree | d1c0b2d4e50ef4920d109fab4499897d15e60d81 /docs | |
parent | 0d9fc8ec6d35ec6c4f834a8873e7ca63e9e769d0 (diff) | |
download | cryptography-3bab819c558ead888825e33f8df3f17707ff2c20.tar.gz cryptography-3bab819c558ead888825e33f8df3f17707ff2c20.tar.bz2 cryptography-3bab819c558ead888825e33f8df3f17707ff2c20.zip |
Add serialisation output examples (#4286)
Diffstat (limited to 'docs')
-rw-r--r-- | docs/hazmat/primitives/asymmetric/serialization.rst | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/asymmetric/serialization.rst b/docs/hazmat/primitives/asymmetric/serialization.rst index 24e2b89c..90ec10eb 100644 --- a/docs/hazmat/primitives/asymmetric/serialization.rst +++ b/docs/hazmat/primitives/asymmetric/serialization.rst @@ -418,12 +418,24 @@ Serialization Formats Frequently known as PKCS#1 format. Still a widely used format, but generally considered legacy. + A PEM encoded RSA key will look like:: + + -----BEGIN RSA PRIVATE KEY----- + ... + -----END RSA PRIVATE KEY----- + .. attribute:: PKCS8 A more modern format for serializing keys which allows for better encryption. Choose this unless you have explicit legacy compatibility requirements. + A PEM encoded key will look like:: + + -----BEGIN PRIVATE KEY----- + ... + -----END PRIVATE KEY----- + .. class:: PublicFormat .. versionadded:: 0.8 @@ -443,11 +455,23 @@ Serialization Formats identifier and the public key as a bit string. Choose this unless you have specific needs. + A PEM encoded key will look like:: + + -----BEGIN PUBLIC KEY----- + ... + -----END PUBLIC KEY----- + .. attribute:: PKCS1 Just the public key elements (without the algorithm identifier). This format is RSA only, but is used by some older systems. + A PEM encoded key will look like:: + + -----BEGIN RSA PUBLIC KEY----- + ... + -----END RSA PUBLIC KEY----- + .. attribute:: OpenSSH .. versionadded:: 1.4 |