Fine with me (should we do the same for the other checks on
public_exponent?)


On Mon, Feb 10, 2014 at 1:08 PM, Paul Kehrer <notifications@github.com>wrote:

> In cryptography/hazmat/backends/openssl/backend.py:
>
> > @@ -259,6 +261,43 @@ def _handle_error_code(self, code):
> >              )
> >          )
> >
> > +    def _bn_to_int(self, bn):
> > +        hex_cdata = self._lib.BN_bn2hex(bn)
> > +        assert hex_cdata != self._ffi.NULL
> > +        hex_str = self._ffi.string(hex_cdata)
> > +        self._lib.OPENSSL_free(hex_cdata)
> > +        return int(hex_str, 16)
> > +
> > +    def generate_rsa_private_key(self, public_exponent, key_size):
>
> If we want to disallow < 1024 in general we could enforce this in
> RSAPrivateKey.generate in #582<https://github.com/pyca/cryptography/pull/582>rather than each individual backend.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pyca/cryptography/pull/580/files#r9601846>
> .
>



-- 
"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