mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-30 09:48:56 +00:00
use public_exponent 17 to match what was in use before
This commit is contained in:
parent
544ad5bb59
commit
ce27c2ee24
@ -28,15 +28,18 @@ def create_signing_keypair(key_size):
|
||||
|
||||
:returns: 2-tuple of (private_key, public_key)
|
||||
"""
|
||||
# as per
|
||||
# Tahoe's original use of pycryptopp would use cryptopp's default
|
||||
# public_exponent, which is 17
|
||||
#
|
||||
# Thus, we are using 17 here as well. However, there are other
|
||||
# choices; see this for more discussion:
|
||||
# https://security.stackexchange.com/questions/2335/should-rsa-public-exponent-be-only-in-3-5-17-257-or-65537-due-to-security-c
|
||||
#
|
||||
# Another popular choice is 65537. See:
|
||||
# https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa/#cryptography.hazmat.primitives.asymmetric.rsa.generate_private_key
|
||||
# and
|
||||
# https://www.daemonology.net/blog/2009-06-11-cryptographic-right-answers.htmlhttps://www.daemonology.net/blog/2009-06-11-cryptographic-right-answers.html
|
||||
# the public exponent is 65537
|
||||
# (I *believe* that pycryptopp would have used cryptopp's default,
|
||||
# though, which is 17)
|
||||
priv_key = rsa.generate_private_key(
|
||||
public_exponent=65537,
|
||||
public_exponent=17,
|
||||
key_size=key_size,
|
||||
backend=default_backend()
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user