[pycrypto] Bug in Crypto.PublicKey.RSA?

Bill Broadley bill at broadley.org
Wed Sep 10 02:09:48 CST 2008


Please disregard my gpg benchmark numbers, turns out that gpg --encrypt with a 
private/public key and --symmetric both use a symmetric encryption for files.

> Oh, as to performance my symmetric vs public key encryption tests didn't find 
> much difference:
> $ dd if=/dev/urandom of=/tmp/100MB bs=10240 count=10240
> $ time (echo a-test-password-of-non-trivial-length | gpg -o /dev/null 
> --symmetric --passphrase-fd 0  /tmp/100MB)
> real	0m8.563s
> user	0m8.513s
> sys	0m0.052s
> $ ls -alh /tmp/100MB
> -rw-r--r-- 1 bill bill 100M 2008-09-09 19:43 /tmp/100MB
> 
> Using a 2kbit RSA key:
> $ gpg --list-keys
> /home/bill/.gnupg/pubring.gpg
> -----------------------------
> pub   1024D/07DDAB8A 2008-09-08
> uid                  Python benchmark <py at bench>
> sub   2048g/37E185E1 2008-09-08
> $ time (echo | gpg -o /dev/null -e -r benchmark --passphrase-fd 0 /tmp/100MB )
> Reading passphrase from file descriptor 0
> 
> real	0m9.555s
> user	0m9.513s
> sys	0m0.048s


More information about the pycrypto mailing list