In that case I think it should be 2048. No one recommends 1024 bit keys 
anymore.


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: 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