-----BEGIN PGP SIGNED MESSAGE----- Hi, I found a bug in PGP5.0i-b8 which prevent a user to create RSA keys larger then 1024 bits. I included a simple patch for this problem. It's really a simple bug and should not result in security problems. The patch itself contains the whole documentation of this problem. Please note that the patch is pgp signed. The affected file is: pgp50i-b8/src/apps/pgpk/pgpkKeyGen.c cu Michael Roth +----------------------------------------------+ | eMail: mroth@wirlweb.de | | mroth@arago.de | | WWW: http://www.wirlweb.de/~mroth | | PGP Key ID: 1024/A77DDABD | +----------------------------------------------+ -----BEGIN PGP SIGNATURE----- Version: 2.6.3i Charset: noconv iQCVAwUBM/XQjnMIZX+nfdq9AQGonAP9EzJ1yfbrUeTVDmmRJsObE/XSCiUXJulO amigjFd++AGVz6k6fLlhXlZx1mq66HVPKRDqhmD4AZincFbs9ipxsOfNZRk1E0lz 62aWA4a6D/ocEjuFRazN7tDG79rBHlEWiHQ/kqilIVeHijkQlqrV+DpkHCr6hZ6k mnzcwpwLuSY= =XVSK -----END PGP SIGNATURE----- -----BEGIN PGP SIGNED MESSAGE----- - --- pgpkKeyGen.c.orig Sat Aug 16 17:27:47 1997 +++ pgpkKeyGen.c Sat Aug 16 17:52:01 1997 @@ -412,21 +412,41 @@ } else { if(*keybits > maxlen) { error = PGPERR_BADPARAM; fprintf(stderr, "Maximum key size is %u.\n", maxlen); } else { *subkeybits = *keybits; - - if(*keybits >= 1024) { + + /* + ** This original lines are the problem: + ** + ** if(*keybits >= 1024) + ** *keybits = 1024; + ** + ** Only the DSA algorithmn uses 'subkeybits'. + ** RSA uses the 'keybits' to determine the key length. + ** Because this if statement sets the 'keybits' value + ** to a maximum of 1024 bits, it isn't possible to create + ** RSA keys larger then 1024 bits with PGP5.0i-b8 + ** + ** The solution is to check if the user would like to calculate + ** a key which needs a subkey or doesn't. If the key doesn't + ** need the 'subkeysbits' variable such as RSA we can ignore + ** the maximum length because the maximum length of 'keybits' + ** is catched correctly some lines above. + */ + + if(*keybits >= 1024 && pkalg != PGP_PKALG_RSA) { *keybits = 1024; } if(!GotArgs) { if(keybits != subkeybits) { fprintf(stderr, "\ (Producing a %i bit DSS and a %i bit Diffie-Hellman key)\n", *keybits, *subkeybits); } -----BEGIN PGP SIGNATURE----- Version: 2.6.3i Charset: noconv iQCVAwUBM/XOanMIZX+nfdq9AQHWXQP9Geqmc4Li+KOYd7/xw5y/srzn6K1g28Cp pqDygJ9j+4JRWD6BXq0g32y9rh0U6/zDdXBnYGm7ePMbLT3506IcWSO1hs2tBHFW cjkcUv6SwUvfaotrCoVa+pq4qvYPZS40skotir6NC16OMNy3Y2H3+QS5WwpugVLw 4aILDzufN/I= =O5uo -----END PGP SIGNATURE-----