Initial public key loading work

- [ ] I think the use of PKCS8/PEM might be wrong?
- [ ] Docs
- [ ] Tests (need vectors, where do they come from? Just re-process the private keys?)
- [ ] Still a bit too much code duplication
rsa.load_public_key, or serialization.load_public_key? Why not just load
whatever ;-)


On Thu, Jul 10, 2014 at 1:46 PM, Paul Kehrer <notifications@github.com>
wrote:

> In cryptography/hazmat/backends/openssl/backend.py:
>
> > @@ -793,6 +813,34 @@ def load_pkcs8_pem_private_key(self, data, password):
> >
> >          return self._evp_pkey_to_private_key(evp_pkey)
> >
> > +    def load_pkcs8_pem_public_key(self, data, password):
>
> Random idea that might be terrible: Do we need to even specify? Should we
> consider having a function rsa.load_public_key that detects/loads the
> available permutations? (PEM/DER bare subjectPublicKey, PEM/DER
> SubjectPublicKeyInfo)
>
> That approach has the benefit of being much simpler to use, but the
> disadvantage of being significantly more difficult to test since different
> backends would support a different subset. It'd also be problematic for
> multibackend I suppose.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pyca/cryptography/pull/1233/files#r14792127>.
>



-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084