Newsgroup: it.comp.sicurezza.pgp
Titolo: [Q] GnuPG : IDEA module not running (PGP decryption failed)

Hi,
I am developing some code to do a sort of brute force attack on PGP
IDEA-encrypted files (symmetric cipher).
I am using the GnuPG publily available code but I have found one major
problem:
- I have encrypted one small file with PGP7 and IDEA resulting "test.pgp"
- I have downloaded both versions of GnuPG from 
http://www.nullify.org
(1.0.4-2 and 1.0.6) with IDEA compiled-in and tried them to decrypt my
"test.pgp" file. Of course using the correct password. The thing is : ** It
Doesn't Work !! **
Have you had any success decrypting and IDEA file with an IDEA-patched
GnuPG? If so please tell me.
Also, if you have any idea what may be going on also tell.
I'll be searching the newsgroups for the answer. Thanks in advance,
C. J.

 Doesn't Work !! **
it does:
gpg --cipher-algo IDEA --digest-algo MD5 test.pgp
== <EOF> ==
Disastry  
http://i.am/disastry/
http://disastry.dhs.org/pgp
 <----PGP plugins for Netscape and MDaemon
 ^--GPG for Win32 (supports loadable modules and IDEA)
 ^---PGP 2.6.3ia-multi04 (supports IDEA, CAST5, BLOWFISH, TWOFISH,
     AES, 3DES ciphers and MD5, SHA1, RIPEMD160 hashes)
-----BEGIN PGP SIGNATURE-----
Version: Netscape PGP half-Plugin 0.14 by Disastry / PGPsdk v1.7.1
iQA/AwUBO4NLzTBaTVEuJQxkEQPYKwCgv4eoOrS8LCwaMkJbzwHVhXG9FrcAoMMA
H5EvBzCxVroEtc2Yt812pPbW
=kccI
-----END PGP SIGNATURE-----


Yes it certainly does. I didn't know I had to supply the optional arguments
(I though it would just recognice the algorithm in use).
Sorry for saying it didn't & Thanks a lot !
By the way, do you know how can I become certain that the message the user
is trying to decrypt was ciphered using IDEA?
With "gpg --list-packets" you can get the packets, but it doesn't print the
algorithm used (although, if I am not wrong, it should be possible reading
the "Symmetric-key encrypted session-key packet (tag 3)", shouldn't it?).
Thanks a lot again.
C. J.

 the "Symmetric-key encrypted session-key packet (tag 3)", shouldn't it?).
yes,
but if you encrypt conventionally with IDEA, PGP does not make "Symmetric-key
encrypted session-key packet" to be compatible with PGP 2.6 which
does not supports this packet.
in PGP 2.6.3ia-multi04 I solved this by trying to decrypt with all available ciphers.
but GPG defaults to 3DES (? or maybe blowfish ?) if there is no "Symmetric-key
encrypted session-key packet"
== <EOF> ==
Disastry  
http://i.am/disastry/
http://disastry.dhs.org/pgp
 <----PGP plugins for Netscape and MDaemon
 ^--GPG for Win32 (supports loadable modules and IDEA)
 ^---PGP 2.6.3ia-multi04 (supports IDEA, CAST5, BLOWFISH, TWOFISH,
     AES, 3DES ciphers and MD5, SHA1, RIPEMD160 hashes)
-----BEGIN PGP SIGNATURE-----
Version: Netscape PGP half-Plugin 0.14 by Disastry / PGPsdk v1.7.1
iQA/AwUBO4Ne5zBaTVEuJQxkEQPWXACgibUn268gD8p5ic09f20rHOsbUuoAoLKy
ZC9frIvRZZaCT3Wp/JSJg6Zy
=LPpk
-----END PGP SIGNATURE-----

 does not supports this packet.
So GnuPG doesn't print the algorithm (in this particular case).
I wonder if, when there is no "Symmetric-key encrypted session-key" packet
but just an "Encrypted data packet", one can be sure that the algorithm
being used is IDEA (I suppose so, if not how would PGP 2.6 recognize the
algorithm?).
Thanks a lot for your help Disastry, it is being terribly wellcomed at this
end of the cable  :-)
C. J.