[tahoe-lafs-trac-stream] [Tahoe-LAFS] #3914: Loading a huge RSA key is _extremely_ slow on Ubuntu 22.04

Tahoe-LAFS trac at tahoe-lafs.org
Fri Dec 2 18:56:37 UTC 2022


#3914: Loading a huge RSA key is _extremely_ slow on Ubuntu 22.04
--------------------------+-----------------------
     Reporter:  itamarst  |      Owner:
         Type:  defect    |     Status:  new
     Priority:  normal    |  Milestone:  undecided
    Component:  unknown   |    Version:  n/a
   Resolution:            |   Keywords:
Launchpad Bug:            |
--------------------------+-----------------------

Comment (by exarkun):

 Here's a very narrow demonstration of the performance difference:

 {{{
 ❯ time python -c 'from cryptography import __version__
 print(__version__)
 from cryptography.hazmat.primitives.serialization import
 load_der_private_key
 from base64 import b64decode
 with open("src/allmydata/test/data/pycryptopp-rsa-32768-priv.txt", "rb")
 as f:
   load_der_private_key(b64decode(f.read()), password=None)
 '
 36.0.2

 real    0m4.702s
 user    0m4.689s
 sys     0m0.012s

 ❯ pip install --upgrade cryptography==37.0
 Collecting cryptography==37.0
   Using cached cryptography-37.0.0-cp36-abi3-manylinux_2_24_x86_64.whl
 (4.0 MB)
 ...

 ❯ time python -c 'from cryptography import __version__
 print(__version__)
 from cryptography.hazmat.primitives.serialization import
 load_der_private_key
 from base64 import b64decode
 with open("src/allmydata/test/data/pycryptopp-rsa-32768-priv.txt", "rb")
 as f:
   load_der_private_key(b64decode(f.read()), password=None)
 '
 37.0.0

 real    3m8.899s
 user    3m8.556s
 sys     0m0.052s
 }}}

 OpenSSL 3 is basically 180x slower than OpenSSL 1.1.1 at decoding this
 key.

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3914#comment:4>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list