-
Notifications
You must be signed in to change notification settings - Fork 107
Open
Description
This library is excellent, but some quick benchmarking with a small message on my machine shows decryption taking ~200ms, encryption ~100ms (using Uncompressed). Is this to be expected with PGP, which was created for email back in the day? Or is it the Python implementation? Can anything be done to optimize, maybe on my side?
Using 2048 bit RSA keys created like this:
key = pgpy.PGPKey.new(PubKeyAlgorithm.RSAEncryptOrSign, 2048)
key.add_uid(uid, usage={KeyFlags.Sign, KeyFlags.EncryptCommunications, KeyFlags.EncryptStorage},
hashes=[HashAlgorithm.SHA256, HashAlgorithm.SHA384, HashAlgorithm.SHA512, HashAlgorithm.SHA224],
ciphers=[SymmetricKeyAlgorithm.AES256, SymmetricKeyAlgorithm.AES192, SymmetricKeyAlgorithm.AES128],
compression=[CompressionAlgorithm.ZLIB, CompressionAlgorithm.BZ2, CompressionAlgorithm.ZIP, CompressionAlgorithm.Uncompressed])
Edit: by comparison, the GnuPG wrapper around gpg encrypts and decrypts 10x faster with the same key and message.
Metadata
Metadata
Assignees
Labels
No labels