I am the current maintainer of Spreadsheet::ParseExcel and I am looking for help from some people with an interest in cryptography in Perl.

I would like to extend Spreadsheet::ParseExcel to parse encrypted Excel files with user supplied or default passwords. This is a frequently requested feature from end users.

The problem is as follows. At its most basic level an Excel file is comprised of sequential binary records like this:

Name Length Data 2 bytes 2 bytes variable length

When the file is encrypted some additional unencrypted records are added to the start of the file to define the encryption type (usually RC4) along with some information such as salt and verifier hash. The Data segment of the subsequent records, but not the Name or Length bytes, are then encrypted.

I would like to add a function that decrypts the data block using the a password and returns the unencrypted data so that ParseExcel can continue to parse the data. There is also a class of files that are encrypted but can be decrypted without a password (or with a default password) that I would also like to be able to handle.

The encryption algorithms are reasonably well documented and I can point anyone who is interested to various sources including documentation from Microsoft. I can also provide some debugging tools and I can provide an encrypted version of the test suite.

Note, I am not interested in brute force decryption of Excel files. Only the user supplied and default password cases.

I could probably figure it out myself but I have a large number of other issues to deal with and this task would suit someone with some experience and interest in cryptography.

If you are interested drop me a line at jmcnamara@cpan.org.

--
John.


In reply to Looking for help with decryption in Spreadsheet::ParseExcel by jmcnamara

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.