Modifying the number of iterations in S2K generation

Roscoe eocsor at
Mon Apr 25 09:33:07 CEST 2005

loop-aes comes with the following patch for gnupg:
--- gnupg-1.4.1/g10/passphrase.c.old	Tue Feb 15 13:02:31 2005
+++ gnupg-1.4.1/g10/passphrase.c	Wed Mar 16 17:35:20 2005
@@ -1331,7 +1331,7 @@
 	    if( create && !pass ) {
 		randomize_buffer(s2k->salt, 8, 1);
 		if( s2k->mode == 3 )
-		    s2k->count = 96; /* 65536 iterations */
+		    s2k->count = 208; /* 8388608 byte count */
 	    if( s2k->mode == 3 ) {

Any comments on modifying the number of iterations like was done here
to something higher? Looking at the rfc it would seem that the number
of iterations is some arbitary value set by the client and taking a
guess here one would expect gpg's value to be on the low end of the
scale to accommodate 486 users and the like.
(I know that iteration count will linearly effect the time the S2K
function will take to run, and also the time it takes to bruteforce
the password.)

I take it this will effect all password to key generation and hence
the private key's encryption as well as gpg -c?

Trivial matter I know, I was just curious to see that the loop-aes
folk felt the need to bother patching gpg.

More information about the Gnupg-users mailing list