crypt32: CryptProtectData/CryptUnprotectData

Juan Lang juan_lang at
Tue May 3 15:58:18 CDT 2005

Hi Kees,

> If I understand correctly, you want me to:
> - parse the Windows data format as best I can
> - produce output that looks like the Windows data format
> - do some kind of encryption on the data so that nothing needs to be
>   stored to the computer between calls of CryptProtectData and
>   CryptUnprotectData.  (The existing patches intentionally avoid 
>   any encryption.)
> From looking at Wine's, it seems safe to depend on openssl 
> being available.  Is that correct?

Someone previously posted pretty good information about the format of
CryptProtectData on MSDN.  I think it should be possible to implement a
close facsimile, except that the user's credentials (password) would be
missing in Wine since there isn't any at the moment.  If you have time to
do this, it would be ideal.  Failing that, doing any stateless
transformation (e.g. no change at all, or xor-ing with some magic value)
would be preferrable to storing this data in the registry, if I understood
Alexandre's comments correctly.

We're trying to avoid proliferation of OpenSSL in Wine.  Relying on
CryptoAPI is a safer bet.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the wine-devel mailing list