From b18ad1d2b8d0a45e2f57b9a7f06459541ea134fd Mon Sep 17 00:00:00 2001 From: Brian Thorne Date: Fri, 10 Aug 2018 16:21:29 +1000 Subject: [PATCH] Increase default keysize to 3072 (#66) --- phe/paillier.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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):