2048 runs the risk that we make it impossible to port apps from PyCrypto.


On Mon, Feb 10, 2014 at 11:14 PM, Alex Stapleton
<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):
>
> In that case I think it should be 2048. No one recommends 1024 bit keys
> anymore.
> … <#1441fcc39d12beba_>
> On 11 February 2014 01:01:23 Alex Gaynor <notifications@github.com>
> wrote: > @@ -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): Talking this over with @dreid<https://github.com/dreid>:
> I think we should enforce `key_size >= 1024`. Here's why: * Any smaller key
> is practically factorable. * PyCrypto enforces this check, which means no
> one who is porting will be effected. * Removing the check (or lowering the
> bound) is a backwards compatible change in the future, increasing or adding
> it is not, so we should be more aggressive now. --- Reply to this email
> directly or view it on GitHub:
> https://github.com/pyca/cryptography/pull/580/files#r9610067
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pyca/cryptography/pull/580/files#r9615249>
> .
>



-- 
"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