From: Ale <ale...@da...> - 2006-06-19 10:29:06
|
Hello list, I'm experiencing a problem when decrypting uncompressed files generated with GnuPG version gpg (GnuPG) 1.2.7 with the following command line: gpg -z 0 --disable-mdc --batch --yes -o out.gpg -r 'fpr' --encrypt in.file I'm using the example provided with the cryptix snapshot version: Cryptix OpenPGP snapshot 2005/04/18 Cryptix JCE snapshot 2005/03/28 The problem is that when I try to decrypt a file, to say, of about 10 Mb and using a heap size of 256Mb (that to me seems way to big anyway), the engineInit for decodedInputStream takes a long time but it can decrypt the message. When trying to decrypt a bigger file, that is about 90 Mb, the engineInit takes a long time and after that long time, I get an OutOfMemory exception (even with -Xmx256m). - Format: OpenPGP:CryptixOpenPGP version 0.20050418 - before init.. - decryption key return.. - Decryption key returned cryptix.message.stream.DecryptionKeyReturnValue@65a77f -Exception in thread "Thread-5" java.lang.OutOfMemoryError: Java heap space When trying to decrypt files, encrypted without the -z 0 gpg option, the init process seems to be ok, it takes a very short time, but with the 90Mb file, the read() method of decodedInputStream throws an exception of: Error: java.io.IOException: Fatal data format exception: Read tried past end of inputstream. java.io.IOException: Fatal data format exception: Read tried past end of inputstream. at cryptix.openpgp.io.PGPInputStreamAdapter.read(PGPInputStreamAdapter.java:127) at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:214) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:134) at cryptix.openpgp.algorithm.PGPDeflate$ZlibIn.readInternal(PGPDeflate.java:112) at cryptix.openpgp.io.PGPCompressorInputStream.read(PGPCompressorInputStream.java:81) at cryptix.openpgp.io.PGPLengthDataInputStream.readDirect(PGPLengthDataInputStream.java:120) at cryptix.openpgp.io.PGPLengthDataInputStream.readInternal(PGPLengthDataInputStream.java:159) at cryptix.openpgp.io.PGPLengthDataInputStream.readBuffer(PGPLengthDataInputStream.java:286) at cryptix.openpgp.provider.PGPDecodedMessageInputStream$LiteralInputStream.read(PGPDecodedMessageInputStream.java:591) at cryptix.openpgp.provider.PGPDecodedMessageInputStream.engineRead(PGPDecodedMessageInputStream.java:472) at cryptix.message.stream.DecodedMessageInputStream.read(DecodedMessageInputStream.java:156) at java.io.InputStream.read(InputStream.java:89) at decryptmedia.DecryptionProvider.decryptFile(DecryptionProvider.java:112) at decryptmedia.DecodeXferUI$DecryptLauncher.run(DecodeXferUI.java:233) at java.lang.Thread.run(Thread.java:595) Seems that the file has been trunked an amount of file always less then the buffer size that is 4096 bytes. Any help will be appreciated, infact if we can overcome this problem, we will continue using this software in a production enviroment, even with some sort of commercial relationship. Regards, Alessandro Audero |