<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>MS-OFFCRYPTO Examples</title><link>http://offcrypto.codeplex.com/project/feeds/rss</link><description>MS-OFFCRYPTO examples</description><item><title>Updated Wiki: Home</title><link>http://offcrypto.codeplex.com/wikipage?version=9</link><description>&lt;div class="wikidoc"&gt;&lt;b&gt;Project Description&lt;/b&gt;&lt;br /&gt;This project demonstrates the techniques documented in MS-OFFCRYPTO.&lt;br /&gt;&lt;br /&gt;The code presented here is for demonstration purposes only. While the code has been written to be robust, it has not been tested to production quality, and some shortcuts may have been taken because the code is not intended for general use. You are welcome to use the code for any purpose you like, but you should review it and test it carefully before using it for any production purpose.&lt;br /&gt;&lt;br /&gt;This project currently consists of:&lt;br /&gt;&lt;br /&gt;1) ExtractStream.cpp - many of the techniques rely on isolating a stream from a compound file. This application can extract streams, even if there are unprintable characters in the stream name. It can also be used to list the streams and storages.&lt;br /&gt;&lt;br /&gt;2) OoxmlEncrypt.cs - a C# project that demonstrates how to correctly verify an entire EncryptionInfo stream, and check that the password matches. The code only works for ECMA-376 Document Encryption - the older RC4 encryption will be handled in another project, which is TBD at the moment. This is written in C# because the original code was written in C++, and by using a different language, we can ensure that language and library-specific assumptions are taken into account.&lt;br /&gt;&lt;br /&gt;3) ManagedRC4 - A wrapper over CAPI RC4 needed by the other RC4 encryption projects.&lt;br /&gt;&lt;br /&gt;4) CapiRC4Encrypt - a C# project that demonstrates how to correctly verify the encryption info header and verify the password for CAPI RC4 encryption, which is the default for PowerPoint encryption of .ppt files, and is an option on Word and Excel files.&lt;br /&gt;&lt;br /&gt;5) Legacy RC4 - another C# project that demonstrates how to verify a legacy encryption header and verify the password. Note - completing this entailed a minor bug fix to ManagedRC4 - if you grab this project, please get that one as well.&lt;br /&gt;&lt;br /&gt;Note - the ManagedRC4 project has just been updated to make some of the behavior underlying CryptDeriveKey explicit. This should help facilitate porting to crypto libraries other than CAPI (including CNG).&lt;br /&gt;&lt;br /&gt;4/9/2009 - Just updated ExtractStream to get it to pull out the encryption header directly from a PowerPoint file, as it is a bit of a pain to find the correct offset. I&amp;#39;ve also updated the CapiRC4Encrypt project to deal correctly with the fact that there is now (as of Office 2007 SP2) a major version of 4. previously, we enforced major version of 2 or 3 only.&lt;br /&gt;&lt;br /&gt;11/22/2012 - added a C# project that demonstrates reading and writing version4 encrypted Office documents, and a test application to read an existing encrypted OpenXml file and dump out various information.&lt;br /&gt;&lt;br /&gt;To get all the files, go to the Releases tab.&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>DrTusk</author><pubDate>Thu, 22 Nov 2012 21:26:00 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20121122092600P</guid></item><item><title>Source code checked in, #70372</title><link>http://offcrypto.codeplex.com/SourceControl/changeset/changes/70372</link><description></description><author>DrTusk</author><pubDate>Thu, 22 Nov 2012 03:11:55 GMT</pubDate><guid isPermaLink="false">Source code checked in, #70372 20121122031155A</guid></item><item><title>Source code checked in, #70371</title><link>http://offcrypto.codeplex.com/SourceControl/changeset/changes/70371</link><description>Initial implementation of OfficeAgile crypto support library.&amp;#13;&amp;#10;&amp;#13;&amp;#10;Also included test exe</description><author>DrTusk</author><pubDate>Thu, 22 Nov 2012 02:55:56 GMT</pubDate><guid isPermaLink="false">Source code checked in, #70371 20121122025556A</guid></item><item><title>Source code checked in, #69709</title><link>http://offcrypto.codeplex.com/SourceControl/changeset/changes/69709</link><description>Upgrade&amp;#58; New Version of LabDefaultTemplate.xaml. To upgrade your build definitions, please visit the following link&amp;#58; http&amp;#58;&amp;#47;&amp;#47;go.microsoft.com&amp;#47;fwlink&amp;#47;&amp;#63;LinkId&amp;#61;254563</description><author>Project Collection Service Accounts</author><pubDate>Mon, 01 Oct 2012 22:10:56 GMT</pubDate><guid isPermaLink="false">Source code checked in, #69709 20121001101056P</guid></item><item><title>Source code checked in, #69708</title><link>http://offcrypto.codeplex.com/SourceControl/changeset/changes/69708</link><description>Checked in by server upgrade</description><author>Project Collection Service Accounts</author><pubDate>Mon, 01 Oct 2012 22:06:45 GMT</pubDate><guid isPermaLink="false">Source code checked in, #69708 20121001100645P</guid></item><item><title>Source code checked in, #52373</title><link>http://offcrypto.codeplex.com/SourceControl/changeset/changes/52373</link><description>Checked in by server upgrade</description><author>_TFSSERVICE</author><pubDate>Wed, 28 Jul 2010 17:08:20 GMT</pubDate><guid isPermaLink="false">Source code checked in, #52373 20100728050820P</guid></item><item><title>Updated Release: CapiRC4Encrypt (Jan 08, 2009)</title><link>http://offcrypto.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=21507</link><description>&lt;div&gt;This code demonstrates parsing an EncryptionInfo struct generated by a PowerPoint file. It depends on the ManagedRC4 project.&lt;br&gt;&lt;br&gt;Use ExtractStream -e to get the header from the PowerPoint file. The password for the file is 'password'.&lt;br&gt;&lt;br&gt;Note - I updated this to use CryptImportKey instead of CryptDeriveKey - this takes one layer of the black box out of the equation.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;</description><author>dcleblanc</author><pubDate>Fri, 10 Apr 2009 02:30:29 GMT</pubDate><guid isPermaLink="false">Updated Release: CapiRC4Encrypt (Jan 08, 2009) 20090410023029A</guid></item><item><title>Released: CapiRC4Encrypt (Jan 08, 2009)</title><link>http://offcrypto.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=21507</link><description>&lt;div&gt;This code demonstrates parsing an EncryptionInfo struct generated by a PowerPoint file. It depends on the ManagedRC4 project.&lt;br&gt;&lt;br&gt;Use ExtractStream -e to get the header from the PowerPoint file. The password for the file is 'password'.&lt;br&gt;&lt;br&gt;Note - I updated this to use CryptImportKey instead of CryptDeriveKey - this takes one layer of the black box out of the equation.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;</description><author></author><pubDate>Fri, 10 Apr 2009 02:30:29 GMT</pubDate><guid isPermaLink="false">Released: CapiRC4Encrypt (Jan 08, 2009) 20090410023029A</guid></item><item><title>Updated Release: ExtractStream (Dec 21, 2008)</title><link>http://offcrypto.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=20831</link><description>&lt;div&gt;ExtractStream is a utility used to list and extract streams from an OLE compound file, which is what is used for Office 2003 and earlier files, as well as encrypted files generated by Office 2007.&lt;br&gt;&lt;br&gt;Note - updated to allow PowerPoint files to have the encryption header extracted directly, since it was a pain to specify the offset. Will tackle Word and Excel shortly.&lt;/div&gt;</description><author>dcleblanc</author><pubDate>Fri, 10 Apr 2009 02:28:34 GMT</pubDate><guid isPermaLink="false">Updated Release: ExtractStream (Dec 21, 2008) 20090410022834A</guid></item><item><title>Released: ExtractStream (Dec 21, 2008)</title><link>http://offcrypto.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=20831</link><description>&lt;div&gt;ExtractStream is a utility used to list and extract streams from an OLE compound file, which is what is used for Office 2003 and earlier files, as well as encrypted files generated by Office 2007.&lt;br&gt;&lt;br&gt;Note - updated to allow PowerPoint files to have the encryption header extracted directly, since it was a pain to specify the offset. Will tackle Word and Excel shortly.&lt;/div&gt;</description><author></author><pubDate>Fri, 10 Apr 2009 02:28:34 GMT</pubDate><guid isPermaLink="false">Released: ExtractStream (Dec 21, 2008) 20090410022834A</guid></item><item><title>Updated Wiki: Home</title><link>http://offcrypto.codeplex.com/Wiki/View.aspx?title=Home&amp;version=8</link><description>&lt;div class="wikidoc"&gt;&lt;b&gt;Project Description&lt;/b&gt;&lt;br /&gt;This project demonstrates the techniques documented in MS-OFFCRYPTO.&lt;br /&gt;&lt;br /&gt;The code presented here is for demonstration purposes only. While the code has been written to be robust, it has not been tested to production quality, and some shortcuts may have been taken because the code is not intended for general use. You are welcome to use the code for any purpose you like, but you should review it and test it carefully before using it for any production purpose.&lt;br /&gt;&lt;br /&gt;This project currently consists of:&lt;br /&gt;&lt;br /&gt;1) ExtractStream.cpp - many of the techniques rely on isolating a stream from a compound file. This application can extract streams, even if there are unprintable characters in the stream name. It can also be used to list the streams and storages.&lt;br /&gt;&lt;br /&gt;2) OoxmlEncrypt.cs - a C# project that demonstrates how to correctly verify an entire EncryptionInfo stream, and check that the password matches. The code only works for ECMA-376 Document Encryption - the older RC4 encryption will be handled in another project, which is TBD at the moment. This is written in C# because the original code was written in C++, and by using a different language, we can ensure that language and library-specific assumptions are taken into account.&lt;br /&gt;&lt;br /&gt;3) ManagedRC4 - A wrapper over CAPI RC4 needed by the other RC4 encryption projects.&lt;br /&gt;&lt;br /&gt;4) CapiRC4Encrypt - a C# project that demonstrates how to correctly verify the encryption info header and verify the password for CAPI RC4 encryption, which is the default for PowerPoint encryption of .ppt files, and is an option on Word and Excel files.&lt;br /&gt;&lt;br /&gt;5) Legacy RC4 - another C# project that demonstrates how to verify a legacy encryption header and verify the password. Note - completing this entailed a minor bug fix to ManagedRC4 - if you grab this project, please get that one as well.&lt;br /&gt;&lt;br /&gt;Note - the ManagedRC4 project has just been updated to make some of the behavior underlying CryptDeriveKey explicit. This should help facilitate porting to crypto libraries other than CAPI (including CNG).&lt;br /&gt;&lt;br /&gt;4/9/2009 - Just updated ExtractStream to get it to pull out the encryption header directly from a PowerPoint file, as it is a bit of a pain to find the correct offset. I've also updated the CapiRC4Encrypt project to deal correctly with the fact that there is now (as of Office 2007 SP2) a major version of 4. previously, we enforced major version of 2 or 3 only.&lt;br /&gt;&lt;br /&gt;To get all the files, go to the Releases tab.&lt;/div&gt;</description><author>dcleblanc</author><pubDate>Fri, 10 Apr 2009 02:26:38 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20090410022638A</guid></item><item><title>New Post: Incorrect versions exception with PPTX</title><link>http://offcrypto.codeplex.com/Thread/View.aspx?ThreadId=52574</link><description>&lt;div style="line-height: normal;"&gt;Greetings,&lt;br&gt;
&lt;br&gt;
Thank you for your great work, David.&lt;br&gt;
&lt;br&gt;
I tried to run the &lt;span&gt;OoxmlEncrypt.cs against a file that I created
in Office 2007 and I got an error complaining the first 4-bytes block
of the file stream does not contain the correct versions.&lt;br&gt;
&lt;br&gt;
Would you please let me know what's the workaround for this little problem?&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
Thank you again.&lt;br&gt;
&lt;br&gt;
-- Tommy.&lt;br&gt;
&lt;/div&gt;</description><author>tcnguyen</author><pubDate>Tue, 07 Apr 2009 16:48:51 GMT</pubDate><guid isPermaLink="false">New Post: Incorrect versions exception with PPTX 20090407044851P</guid></item><item><title>Updated Release: ManagedRC4 (Jan 08, 2009)</title><link>http://www.codeplex.com/offcrypto/Release/ProjectReleases.aspx?ReleaseId=21506</link><description>&lt;div&gt;
This project is to get around the issue that RC4 is not available in .NET. It isn't a fully featured RC4 wrapper, but it is enough to illustrate the concepts. &lt;br&gt; &lt;br&gt;An issue worth mentioning here is that CryptDeriveKey and CryptImportKey have some special behaviors with respect to 40-bit encryption. The MSDN topic &amp;quot;Salt Value Functionality&amp;quot; explains this:&lt;br&gt; &lt;br&gt;=== begin quote====&lt;br&gt;The Base Provider creates 40-bit symmetric keys created with eleven bytes of zero-value salt, eleven bytes of nonzero salt if CRYPT&lt;i&gt;CREATE&lt;/i&gt;SALT is specified, or no salt value. A 40-bit symmetric key with zero-value salt, however, is not equivalent to a 40-bit symmetric key without salt. For interoperability, keys must be created without salt. This problem results from a default condition that occurs only with keys of exactly 40 bits. All other key lengths do not have salt allocated by default.&lt;br&gt; &lt;br&gt;Both the Base Providers and the Extended Provider can use the CRYPT&lt;i&gt;NO&lt;/i&gt;SALT flag to specify that no salt value is allocated for a 40-bit symmetric key. The functions that accept this flag are CryptGenKey, CryptDeriveKey, and CryptImportKey. By default, these functions provide backward compatibility for the 40-bit symmetric key case by continuing the use of the eleven-byte-long zero-value salt.&lt;br&gt;=== end quote =====&lt;br&gt; &lt;br&gt;1/9/09 - Made a minor tweak to RC4Native::ImportKey to make the above explicit. Comments from the code:&lt;br&gt; &lt;br&gt;   // This step makes explicit what the Microsoft implementation of RC4 is really doing, unless&lt;br&gt;   // CRYPT&lt;i&gt;NO&lt;/i&gt;SALT flag is set. Essentially, there's a 128-bit key, just that the last 88 bits&lt;br&gt;   // are all 0. Unfortunately, there is no standard for RC4, which is part of why this happens.&lt;br&gt;   if( cbKeyData == 5 )&lt;br&gt;      *pcbKeyData = 16;&lt;br&gt; &lt;br&gt;So essentially, a PLAINTEXTBLOB for 40-bit RC4 is exactly the same if:&lt;br&gt;a) Data size = 5&lt;br&gt;b) Data size = 16 AND the last 11 bytes are 0&lt;br&gt; &lt;br&gt;This project is needed in order to use the CapiRC4Encrypt project.&lt;br&gt; &lt;br&gt;Note - this was just updated to use CryptImportKey, instead of CryptDeriveKey - removes one more layer of the CAPI calls.&lt;br&gt; &lt;br&gt;2/6 - Minor bug fix for Legacy RC4 example&lt;br&gt; &lt;br&gt;
&lt;/div&gt;</description><author>dcleblanc</author><pubDate>Fri, 06 Feb 2009 09:02:36 GMT</pubDate><guid isPermaLink="false">Updated Release: ManagedRC4 (Jan 08, 2009) 20090206090236A</guid></item><item><title>Released: ManagedRC4 (Jan 08, 2009)</title><link>http://www.codeplex.com/offcrypto/Release/ProjectReleases.aspx?ReleaseId=21506</link><description>&lt;div&gt;
This project is to get around the issue that RC4 is not available in .NET. It isn't a fully featured RC4 wrapper, but it is enough to illustrate the concepts. &lt;br&gt; &lt;br&gt;An issue worth mentioning here is that CryptDeriveKey and CryptImportKey have some special behaviors with respect to 40-bit encryption. The MSDN topic &amp;quot;Salt Value Functionality&amp;quot; explains this:&lt;br&gt; &lt;br&gt;=== begin quote====&lt;br&gt;The Base Provider creates 40-bit symmetric keys created with eleven bytes of zero-value salt, eleven bytes of nonzero salt if CRYPT&lt;i&gt;CREATE&lt;/i&gt;SALT is specified, or no salt value. A 40-bit symmetric key with zero-value salt, however, is not equivalent to a 40-bit symmetric key without salt. For interoperability, keys must be created without salt. This problem results from a default condition that occurs only with keys of exactly 40 bits. All other key lengths do not have salt allocated by default.&lt;br&gt; &lt;br&gt;Both the Base Providers and the Extended Provider can use the CRYPT&lt;i&gt;NO&lt;/i&gt;SALT flag to specify that no salt value is allocated for a 40-bit symmetric key. The functions that accept this flag are CryptGenKey, CryptDeriveKey, and CryptImportKey. By default, these functions provide backward compatibility for the 40-bit symmetric key case by continuing the use of the eleven-byte-long zero-value salt.&lt;br&gt;=== end quote =====&lt;br&gt; &lt;br&gt;1/9/09 - Made a minor tweak to RC4Native::ImportKey to make the above explicit. Comments from the code:&lt;br&gt; &lt;br&gt;   // This step makes explicit what the Microsoft implementation of RC4 is really doing, unless&lt;br&gt;   // CRYPT&lt;i&gt;NO&lt;/i&gt;SALT flag is set. Essentially, there's a 128-bit key, just that the last 88 bits&lt;br&gt;   // are all 0. Unfortunately, there is no standard for RC4, which is part of why this happens.&lt;br&gt;   if( cbKeyData == 5 )&lt;br&gt;      *pcbKeyData = 16;&lt;br&gt; &lt;br&gt;So essentially, a PLAINTEXTBLOB for 40-bit RC4 is exactly the same if:&lt;br&gt;a) Data size = 5&lt;br&gt;b) Data size = 16 AND the last 11 bytes are 0&lt;br&gt; &lt;br&gt;This project is needed in order to use the CapiRC4Encrypt project.&lt;br&gt; &lt;br&gt;Note - this was just updated to use CryptImportKey, instead of CryptDeriveKey - removes one more layer of the CAPI calls.&lt;br&gt; &lt;br&gt;2/6 - Minor bug fix for Legacy RC4 example&lt;br&gt; &lt;br&gt;
&lt;/div&gt;</description><author></author><pubDate>Fri, 06 Feb 2009 09:02:35 GMT</pubDate><guid isPermaLink="false">Released: ManagedRC4 (Jan 08, 2009) 20090206090235A</guid></item><item><title>Updated Release: ManagedRC4 (Jan 08, 2009)</title><link>http://www.codeplex.com/offcrypto/Release/ProjectReleases.aspx?ReleaseId=21506</link><description>&lt;div&gt;
This project is to get around the issue that RC4 is not available in .NET. It isn't a fully featured RC4 wrapper, but it is enough to illustrate the concepts. One limitation is that it does not load the CAPI provider which gives you 128-bit encryption - the default for this encryption approach is 40-bit, which works just fine.&lt;br&gt; &lt;br&gt;An issue worth mentioning here is that CryptDeriveKey and CryptImportKey have some special behaviors with respect to 40-bit encryption. The MSDN topic &amp;quot;Salt Value Functionality&amp;quot; explains this:&lt;br&gt; &lt;br&gt;=== begin quote====&lt;br&gt;The Base Provider creates 40-bit symmetric keys created with eleven bytes of zero-value salt, eleven bytes of nonzero salt if CRYPT&lt;i&gt;CREATE&lt;/i&gt;SALT is specified, or no salt value. A 40-bit symmetric key with zero-value salt, however, is not equivalent to a 40-bit symmetric key without salt. For interoperability, keys must be created without salt. This problem results from a default condition that occurs only with keys of exactly 40 bits. All other key lengths do not have salt allocated by default.&lt;br&gt; &lt;br&gt;Both the Base Providers and the Extended Provider can use the CRYPT&lt;i&gt;NO&lt;/i&gt;SALT flag to specify that no salt value is allocated for a 40-bit symmetric key. The functions that accept this flag are CryptGenKey, CryptDeriveKey, and CryptImportKey. By default, these functions provide backward compatibility for the 40-bit symmetric key case by continuing the use of the eleven-byte-long zero-value salt.&lt;br&gt;=== end quote =====&lt;br&gt; &lt;br&gt;1/9/09 - Made a minor tweak to RC4Native::ImportKey to make the above explicit. Comments from the code:&lt;br&gt; &lt;br&gt;   // This step makes explicit what the Microsoft implementation of RC4 is really doing, unless&lt;br&gt;   // CRYPT&lt;i&gt;NO&lt;/i&gt;SALT flag is set. Essentially, there's a 128-bit key, just that the last 88 bits&lt;br&gt;   // are all 0. Unfortunately, there is no standard for RC4, which is part of why this happens.&lt;br&gt;   if( cbKeyData == 5 )&lt;br&gt;      *pcbKeyData = 16;&lt;br&gt; &lt;br&gt;So essentially, a PLAINTEXTBLOB for 40-bit RC4 is exactly the same if:&lt;br&gt;a) Data size = 5&lt;br&gt;b) Data size = 16 AND the last 11 bytes are 0&lt;br&gt; &lt;br&gt;This project is needed in order to use the CapiRC4Encrypt project.&lt;br&gt; &lt;br&gt;Note - this was just updated to use CryptImportKey, instead of CryptDeriveKey - removes one more layer of the CAPI calls.&lt;br&gt; &lt;br&gt;2/6 - Minor bug fix for Legacy RC4 example&lt;br&gt; &lt;br&gt;
&lt;/div&gt;</description><author>dcleblanc</author><pubDate>Fri, 06 Feb 2009 09:01:12 GMT</pubDate><guid isPermaLink="false">Updated Release: ManagedRC4 (Jan 08, 2009) 20090206090112A</guid></item><item><title>Updated Release: Legacy RC4 (Feb 06, 2009)</title><link>http://www.codeplex.com/offcrypto/Release/ProjectReleases.aspx?ReleaseId=22783</link><description>&lt;div&gt;
Demonstrates the legacy RC4 encryption technique. Files include:&lt;br&gt; &lt;br&gt;LegacyRC4.cs - source code to verify the header.&lt;br&gt;password_dump.txt - notes on the intermediate hash results for the password.doc file&lt;br&gt;password.doc - a 40-bit RC4 encrypted document with a password of (you guessed it) 'password'&lt;br&gt;
&lt;/div&gt;</description><author>dcleblanc</author><pubDate>Fri, 06 Feb 2009 08:58:09 GMT</pubDate><guid isPermaLink="false">Updated Release: Legacy RC4 (Feb 06, 2009) 20090206085809A</guid></item><item><title>Released: Legacy RC4 (Feb 06, 2009)</title><link>http://www.codeplex.com/offcrypto/Release/ProjectReleases.aspx?ReleaseId=22783</link><description>&lt;div&gt;
Demonstrates the legacy RC4 encryption technique. Files include:&lt;br&gt; &lt;br&gt;LegacyRC4.cs - source code to verify the header.&lt;br&gt;password_dump.txt - notes on the intermediate hash results for the password.doc file&lt;br&gt;password.doc - a 40-bit RC4 encrypted document with a password of (you guessed it) 'password'&lt;br&gt;
&lt;/div&gt;</description><author></author><pubDate>Fri, 06 Feb 2009 08:58:08 GMT</pubDate><guid isPermaLink="false">Released: Legacy RC4 (Feb 06, 2009) 20090206085808A</guid></item><item><title>Created Release: Legacy RC4 (Feb 06, 2009)</title><link>http://www.codeplex.com/offcrypto/Release/ProjectReleases.aspx?ReleaseId=22783</link><description>&lt;div&gt;
Demonstrates the legacy RC4 encryption technique. &lt;br&gt;
&lt;/div&gt;</description><author>dcleblanc</author><pubDate>Fri, 06 Feb 2009 08:54:17 GMT</pubDate><guid isPermaLink="false">Created Release: Legacy RC4 (Feb 06, 2009) 20090206085417A</guid></item><item><title>Updated Wiki: Home</title><link>http://www.codeplex.com/offcrypto/Wiki/View.aspx?title=Home&amp;version=7</link><description>&lt;div class="wikidoc"&gt;
&lt;b&gt;Project Description&lt;/b&gt;&lt;br /&gt;This project demonstrates the techniques documented in MS-OFFCRYPTO.&lt;br /&gt; &lt;br /&gt;The code presented here is for demonstration purposes only. While the code has been written to be robust, it has not been tested to production quality, and some shortcuts may have been taken because the code is not intended for general use. You are welcome to use the code for any purpose you like, but you should review it and test it carefully before using it for any production purpose.&lt;br /&gt; &lt;br /&gt;This project currently consists of:&lt;br /&gt; &lt;br /&gt;1) ExtractStream.cpp - many of the techniques rely on isolating a stream from a compound file. This application can extract streams, even if there are unprintable characters in the stream name. It can also be used to list the streams and storages.&lt;br /&gt; &lt;br /&gt;2) OoxmlEncrypt.cs - a C# project that demonstrates how to correctly verify an entire EncryptionInfo stream, and check that the password matches. The code only works for ECMA-376 Document Encryption - the older RC4 encryption will be handled in another project, which is TBD at the moment. This is written in C# because the original code was written in C++, and by using a different language, we can ensure that language and library-specific assumptions are taken into account.&lt;br /&gt; &lt;br /&gt;3) ManagedRC4 - A wrapper over CAPI RC4 needed by the other RC4 encryption projects.&lt;br /&gt; &lt;br /&gt;4) CapiRC4Encrypt - a C# project that demonstrates how to correctly verify the encryption info header and verify the password for CAPI RC4 encryption, which is the default for PowerPoint encryption of .ppt files, and is an option on Word and Excel files.&lt;br /&gt; &lt;br /&gt;5) Legacy RC4 - another C# project that demonstrates how to verify a legacy encryption header and verify the password. Note - completing this entailed a minor bug fix to ManagedRC4 - if you grab this project, please get that one as well.&lt;br /&gt; &lt;br /&gt;Note - the ManagedRC4 project has just been updated to make some of the behavior underlying CryptDeriveKey explicit. This should help facilitate porting to crypto libraries other than CAPI (including CNG).&lt;br /&gt; &lt;br /&gt;To get all the files, go to the Releases tab.&lt;br /&gt;
&lt;/div&gt;</description><author>dcleblanc</author><pubDate>Fri, 06 Feb 2009 08:52:16 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20090206085216A</guid></item><item><title>Updated Wiki: Home</title><link>http://www.codeplex.com/offcrypto/Wiki/View.aspx?title=Home&amp;version=6</link><description>&lt;div class="wikidoc"&gt;
&lt;b&gt;Project Description&lt;/b&gt;&lt;br /&gt;This project demonstrates the techniques documented in MS-OFFCRYPTO.&lt;br /&gt; &lt;br /&gt;The code presented here is for demonstration purposes only. While the code has been written to be robust, it has not been tested to production quality, and some shortcuts may have been taken because the code is not intended for general use. You are welcome to use the code for any purpose you like, but you should review it and test it carefully before using it for any production purpose.&lt;br /&gt; &lt;br /&gt;This project currently consists of:&lt;br /&gt; &lt;br /&gt;1) ExtractStream.cpp - many of the techniques rely on isolating a stream from a compound file. This application can extract streams, even if there are unprintable characters in the stream name. It can also be used to list the streams and storages.&lt;br /&gt; &lt;br /&gt;2) OoxmlEncrypt.cs - a C# project that demonstrates how to correctly verify an entire EncryptionInfo stream, and check that the password matches. The code only works for ECMA-376 Document Encryption - the older RC4 encryption will be handled in another project, which is TBD at the moment. This is written in C# because the original code was written in C++, and by using a different language, we can ensure that language and library-specific assumptions are taken into account.&lt;br /&gt; &lt;br /&gt;3) ManagedRC4 - A wrapper over CAPI RC4 needed by the other RC4 encryption projects.&lt;br /&gt; &lt;br /&gt;4) CapiRC4Encrypt - a C# project that demonstrates how to correctly verify the encryption info header and verify the password for CAPI RC4 encryption, which is the default for PowerPoint encryption of .ppt files, and is an option on Word and Excel files.&lt;br /&gt; &lt;br /&gt;Code to demonstrate the legacy RC4 encryption is in progress, and will posted once I sort out the nuances of CryptDeriveKey.&lt;br /&gt; &lt;br /&gt;Note - the ManagedRC4 project has just been updated to make some of the behavior underlying CryptDeriveKey explicit. This should help facilitate porting to crypto libraries other than CAPI (including CNG).&lt;br /&gt; &lt;br /&gt;To get all the files, go to the Releases tab.&lt;br /&gt;
&lt;/div&gt;</description><author>dcleblanc</author><pubDate>Fri, 09 Jan 2009 19:16:53 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20090109071653P</guid></item></channel></rss>