|Summary:||Support for Office Binary Document RC4 Encryption|
|Component:||POIFS||Assignee:||POI Developers List <dev>|
Description bearbalu 2014-11-10 03:47:16 UTC
I have a bunch of xlsx file with this issue. Unfortunately these files are non-public and the moment I edit them using my Excel 2010 to remove the confidential info, the issue goes away. I am happy to email them to someone. The exception thread is: org.apache.poi.EncryptedDocumentException: cipher algorithm not found at org.apache.poi.poifs.crypt.CipherAlgorithm.fromEcmaId(CipherAlgorithm.java:65) at org.apache.poi.poifs.crypt.standard.StandardEncryptionHeader.<init>(StandardEncryptionHeader.java:56) at org.apache.poi.poifs.crypt.standard.StandardEncryptionInfoBuilder.initialize(StandardEncryptionInfoBuilder.java:42) at org.apache.poi.poifs.crypt.EncryptionInfo.<init>(EncryptionInfo.java:72) at org.apache.poi.poifs.crypt.EncryptionInfo.<init>(EncryptionInfo.java:47)
Comment 1 Dominik Stadler 2014-11-26 19:59:54 UTC
Unfortunately the code currently does not print out the details of which cipher the document uses, I have added this to the latest trunk version, so if you can grab the binaries from https://builds.apache.org/job/POI/lastSuccessfulBuild/artifact/build/dist/ (build is currently running), then we should see which exact cipher these documents use...
Comment 2 Andreas Beeker 2014-11-26 21:44:20 UTC
I have already uploaded a temporary patch for this - see https://issues.apache.org/bugzilla/show_bug.cgi?id=35897#c35 I'm currently trying to get cryptoapi encryption to work. As I also refactored the internals of the other crypto modules, I'll commit both when the cryptoapi impl. is ready.
Comment 3 Andreas Beeker 2014-12-25 02:01:43 UTC
Applied as part of r1647867 Looking at the MS-OFFCRYPTO docs, I'm still a little bit puzzled, that there's a rc4 encryption , which is record based (see Biff8DecryptingStream) and the same term is used for a container based mode  http://msdn.microsoft.com/en-us/library/dd907466(v=office.12).aspx