Much slower than other block cipher implementations?

Kosuke Kaizuka cai.0407 at gmail.com
Thu Dec 5 03:41:32 CET 2013


Hi Will,

On Thu, 5 Dec 2013 13:14:27 +1300, Will Bryant wrote:
> Hi all,
> 
> My understanding is that when you encrypt a file using GPG a random session key gets generated, that gets encrypted using public key crypto, and then that session key is used to encrypt the file using a regular block cipher.
> 
> Why then does GPG only encrypt at about 12 MB/s when OpenSSL can encrypt using the same block cipher at over 260 MB/s on the same machine?
> 
> Is it just a faster implementation of the block cipher, or is GPG doing something else that slows it down?
> 
> I'm using fairly modern Intel CPUs that do have AES instructions, so I was wondering if that was it.

Which version of GnuPG (ligcrypt) and OS are you using?
As far as I know, only GnuPG 2.0.x on x86 environments supports AES-NI.

1. GnuPG 1.4.x or lower does not support AES-NI at all.

2. GnuPG 2.0.x with ligcrypt 1.5.0 and above supports AES-NI on x86 environments.

3. GnuPG 2.0.x on x86-64
Ligcrypt 1.5 branch does not support AES-NI yet on x86-64 environments.
Support of AES-NI on x86-64 has been implemented to ligcrypt master[1], but not
backported to current 1.5 branch[2].

[1]
http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=d8bdfa42ed582655c180e7db9b16d4e756a12a6e
[2]
http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=shortlog;h=refs/heads/LIBGCRYPT-1-5-BRANCH
-- 
Kosuke Kaizuka <cai.0407 at gmail.com>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20131205/fa9bd3fb/attachment.sig>


More information about the Gnupg-users mailing list