[crypt32] implementation of CryptProtectData/CryptUnprotectData

Mike McCormack mike at codeweavers.com
Tue May 17 00:34:53 CDT 2005

Kees Cook wrote:
> Hi, I'm back again.  :) This implements the crypt32 functions
> CryptProtectData and CryptUnprotectData, using a best-guess at the true
> Windows opaque data format and encryption methods.  It attempts to
> follow the "details" in the MSDN article that described
> CryptProtectData.
> Please let me know how this all looks.  Hopefully I've got it mostly 
> right this time.  If there is a more sane way to handle the structure
> serialization/unserialization, I'm all ears.  
> (Anyone paying really close attention will note that I uncovered some
> crash bugs in rsaenh as a result of my crypt32 test cases.  Make sure
> you've done a "cvs update" to catch those changes before running them.)
> ChangeLog:
> 	Implements a best-guess of CryptProtectData/CryptUnprotectData.

Hi Kees,

Wow. That's alot of work :)

It's usually easier to review these things in smaller chunks.  An easy 
way to do that is to submit header changes first, then stub functions, 
implementation of each function and a test program, all as seperate patches.

A further way for your patch would be to seperate CryptProtectData and 
CryptUnprotectData data into to two seperate patches, though I 
understand they are dependent on each other to some extent.

This patch looks OK to me at a quick glance, but if it's not applied, 
please consider breaking it up.  At least that way, you'll have less to 
submit next time round.


More information about the wine-devel mailing list