From 9e5b6f1d0ed012090633a656a031fdfa30bd28b6 Mon Sep 17 00:00:00 2001 From: meejah Date: Mon, 17 Jun 2019 22:16:50 -0600 Subject: [PATCH] better comment, cleanup --- src/allmydata/crypto/rsa.py | 9 ++++++++- src/allmydata/test/test_util.py | 2 -- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/allmydata/crypto/rsa.py b/src/allmydata/crypto/rsa.py index c5a5b5626..86936d486 100644 --- a/src/allmydata/crypto/rsa.py +++ b/src/allmydata/crypto/rsa.py @@ -28,8 +28,15 @@ def create_signing_keypair(key_size): :returns: 2-tuple of (private_key, public_key) """ + # as per + # 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, # serisously don't change this value + public_exponent=65537, key_size=key_size, backend=default_backend() ) diff --git a/src/allmydata/test/test_util.py b/src/allmydata/test/test_util.py index 17c79b744..dcc22d855 100644 --- a/src/allmydata/test/test_util.py +++ b/src/allmydata/test/test_util.py @@ -793,8 +793,6 @@ class FileUtil(ReallyEqualMixin, unittest.TestCase): f = EncryptedTemporaryFile() f.write("foobar") f.close() - print(f.file) - print(dir(f.file)) class PollMixinTests(unittest.TestCase):