PKCS 8 is probably too complex and poorly defined for us to cope with but 
JWK is more plausible.

I was intending this pattern to be carried over to public keys too and 
those commonly have much richer metadata we might want to expose.

Do you have any more concrete suggestions? A module with just a bunch of 
functions in? I'll probably split this PR in half anyway :-)




On 2 April 2014 18:49:04 David Reid <notifications@github.com> wrote:

> > @@ -0,0 +1,53 @@
> > +.. hazmat::
> > +
> > +Key Serialization
> > +=================
> > +
> > +.. currentmodule:: cryptography.hazmat.primitives.serialization
> > +
> > +There are several common schemes for serializing asymmetric private and 
> public
> > +keys to bytes. They generally support encryption of private keys and 
> additional
> > +key metadata.
> > +
> > +
> > +.. class:: OpenSSLPrivateKey(private_key)
>
> I don't totally buy this argument, I think any major differences in 
> serialization formats will need a higher level key management library to 
> deal with anyway.
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/pyca/cryptography/pull/627/files#r11217793