Support for traditional OpenSSL and PKCS8 RSA private key serialization

This temporarily uses the backend to do it until the alternate approach is ready. DSA/ECDSA and public key support will follow if this is deemed 
the `Proc-Type` and `DEK-Info` stuff are a part of the PEM standard, they
can (in theory) be applied to any data encapsulated in a PEM block.

On Sat Nov 29 2014 at 4:10:30 PM Ron Frederick <notifications@github.com>
wrote:

> In docs/hazmat/primitives/asymmetric/serialization.rst:
>
> > @@ -114,6 +114,53 @@ all begin with ``-----BEGIN {format}-----`` and end with ``-----END
> >          is not supported by the backend.
> >
> >
> > +Serializers
> > +~~~~~~~~~~~
> > +
> > +.. class:: PKCS8(enctype, password)
> > +
> > +    .. versionadded:: 0.7
> > +
> > +    A serializer for the PKCS #8 format.
> > +
> > +    :param enctype: :class:`~cryptography.hazmat.primitives.serialization.EncryptionTypes`
> > +
> > +    :param bytes password: The password for encryption.
> > +
> > +.. class:: TraditionalOpenSSL(enctype, password)
>
> What do you mean by PEM encryption? Are you talking about the "BEGIN RSA
> PRIVATE KEY" format with the Proc-Type and DEK-Info headers? If so, that's
> specific to PKCS#1. For PCKS#8, it uses "BEGIN PRIVATE KEY" (without "RSA")
> or "BEGIN ENCRYPTED PRIVATE KEY" without any PEM headers, since the
> encryption is done as a wrapper at the ASN.1 DER level and is part of the
> BASE64-encoded PEM data.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pyca/cryptography/pull/1503/files#r21056605>.
>