diff --git a/phe/paillier.py b/phe/paillier.py index ecda669..68e94fa 100644 --- a/phe/paillier.py +++ b/phe/paillier.py @@ -28,7 +28,10 @@ from phe import EncodedNumber from phe.util import invert, powmod, getprimeover, isqrt -DEFAULT_KEYSIZE = 2048 +# Paillier cryptosystem is based on integer factorisation. +# The default is chosen to give a minimum of 128 bits of security. +# https://www.keylength.com/en/4/ +DEFAULT_KEYSIZE = 3072 def generate_paillier_keypair(private_keyring=None, n_length=DEFAULT_KEYSIZE):