Re: [crypt32] CryptProtectData/CryptUnprotectData helper functions

2005-05-18 Thread Dimi Paun
On Wed, 2005-05-18 at 22:57 +0100, Mike Hearn wrote: > > if (TRACE_ON(crypt)) > MESSAGE("foo\n"); There's no reason to use this, ever. Just use the regular FIXME/ERR/WARN/TRACE() as appropriate. -- Dimi Paun <[EMAIL PROTECTED]> Lattica, Inc.

Re: [crypt32] CryptProtectData/CryptUnprotectData helper functions

2005-05-18 Thread Mike Hearn
On Wed, 18 May 2005 13:34:39 -0700, Kees Cook wrote: > Ah-ha, yeah. I should use MESSAGE for that. It's only going to appear > if peopl have already turned on trace/warn, or immediately following a > FIXME that includes a path. I just want to use it for the readability > of the structure. Ac

Re: [crypt32] CryptProtectData/CryptUnprotectData helper functions

2005-05-18 Thread Alexandre Julliard
Kees Cook <[EMAIL PROTECTED]> writes: > FIXME is sane for the "announce_bad_opaque_data", but I'd still like to > use something that doesn't prefix the hexdumps with the function name > for easier readability in the crypt_report_func_input, since there is > already a TRACE/FIXME call being made pr

Re: [crypt32] CryptProtectData/CryptUnprotectData helper functions

2005-05-18 Thread Kees Cook
On Wed, May 18, 2005 at 12:29:58PM -0700, Kees Cook wrote: > Take two. Ignore... this patch is broken, and I need to do an update of wine_dbg_printf() -> MESSAGE() -- Kees Cook@outflux.net

Re: [crypt32] CryptProtectData/CryptUnprotectData helper functions

2005-05-18 Thread Kees Cook
On Wed, May 18, 2005 at 08:44:17PM +0100, Mike Hearn wrote: > It's usually OK to use MESSAGE for that, but if it's a message users might > be seeing often it's best to keep it as a WARN or TRACE. Ah-ha, yeah. I should use MESSAGE for that. It's only going to appear if peopl have already turned

Re: [crypt32] CryptProtectData/CryptUnprotectData helper functions

2005-05-18 Thread Mike Hearn
On Wed, 18 May 2005 12:08:35 -0700, Kees Cook wrote: > FIXME is sane for the "announce_bad_opaque_data", but I'd still like to > use something that doesn't prefix the hexdumps with the function name > for easier readability in the crypt_report_func_input, since there is > already a TRACE/FIXME call

Re: [crypt32] CryptProtectData/CryptUnprotectData helper functions

2005-05-18 Thread Kees Cook
On Wed, May 18, 2005 at 07:31:03PM +0200, Alexandre Julliard wrote: > > +wine_dbg_printf("%s\n",report); > > You should use wine_dbg_sprintf here and return a string. Okay. > > +static > > +void serialize_dword(DWORD value,BYTE ** ptr) > > +{ > > +/*TRACE("called\n");*/ > > + > > +*(

Re: [crypt32] CryptProtectData/CryptUnprotectData helper functions

2005-05-18 Thread Alexandre Julliard
Kees Cook <[EMAIL PROTECTED]> writes: > +static int > +hexprint(const char *s, unsigned char *p, int n) > +{ > +char report[80]; > +int r=-1; > +snprintf(report,16,"%14s:", s); > +while (--n >= 0) > +{ > +if (r++ % 20 == 19) > +{ > +wine_dbg_printf("

Re: crypt32: CryptProtectData/CryptUnprotectData

2005-05-04 Thread Kees Cook
On Wed, May 04, 2005 at 10:38:40AM +0200, Michael Jung wrote: > DATA_BLOB somewhere. He also has to be able to restore in some way the > entropy and the description, if he wants to decrypt the DATA_BLOB at some > later time. Actually, the description is returned by CryptUnprotectData (and is st

Re: crypt32: CryptProtectData/CryptUnprotectData

2005-05-04 Thread Michael Jung
Hi Kees, On Wednesday 04 May 2005 12:43, Alexandre Julliard wrote: > Of course it > would be even better to do true encryption with a hardcoded key; it > still doesn't provide any security, but it's much closer to the > desired end result, which makes it more likely that someone will be > able to

Re: crypt32: CryptProtectData/CryptUnprotectData

2005-05-04 Thread Alexandre Julliard
Michael Jung <[EMAIL PROTECTED]> writes: > In my opinion, the Crypt(Un)ProtectData APIs should basically be implemented > as no-ops at the moment (IMHO XOR-ing with some magic value is senseless in > an open source project. I think it's not a good idea, since it gives the > impression of securi

Re: crypt32: CryptProtectData/CryptUnprotectData

2005-05-04 Thread Michael Jung
Hi Kees, It seems to me that there is some misunderstanding involved here. I'll pick some comments from your previous posts and comment on them. On Wednesday 13 April 2005 17:51, Kees Cook wrote: > Mostly I did this because there is some optional data (description, > entropy). I didn't want to

Re: crypt32: CryptProtectData/CryptUnprotectData

2005-05-03 Thread James Hawkins
On 5/3/05, Kees Cook <[EMAIL PROTECTED]> wrote: > > Is there somewhere I can find details on what's been completed in the > CryptoAPI? The http://winehq.com/site/winapi_stats page say it's at "21%". > The easiest way to determine how much of CryptoAPI is implemented is to dig into the code and s

Re: crypt32: CryptProtectData/CryptUnprotectData

2005-05-03 Thread Kees Cook
On Tue, May 03, 2005 at 01:58:18PM -0700, Juan Lang wrote: > 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 si

Re: crypt32: CryptProtectData/CryptUnprotectData

2005-05-03 Thread Juan Lang
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 >

Re: crypt32: CryptProtectData/CryptUnprotectData

2005-05-03 Thread Kees Cook
On Thu, Apr 14, 2005 at 03:44:34PM +0200, Alexandre Julliard wrote: > > I don't like the ssh-agent idea because not everyone uses ssh-agent. If > > inventing a data format and XORing stuff is prefered, I can write it > > that way. > > > > What direction should I take this? > > You should do th

Re: crypt32: CryptProtectData/CryptUnprotectData

2005-04-14 Thread Alexandre Julliard
Kees Cook <[EMAIL PROTECTED]> writes: > I don't like the ssh-agent idea because not everyone uses ssh-agent. If > inventing a data format and XORing stuff is prefered, I can write it > that way. > > What direction should I take this? You should do this as close to Windows as possible, so that

Re: crypt32: CryptProtectData/CryptUnprotectData

2005-04-13 Thread Kees Cook
On Wed, Apr 13, 2005 at 12:16:44PM +0200, Alexandre Julliard wrote: > I don't understand while you come up with such an elaborate scheme of > storing things in the registry when it's clearly not the way this > thing is supposed to work. If you can't figure out what Windows does, > then just xoring

Re: crypt32: CryptProtectData/CryptUnprotectData

2005-04-13 Thread Michael Jung
On Wednesday 13 April 2005 12:16, Alexandre Julliard wrote: > I don't understand while you come up with such an elaborate scheme of > storing things in the registry when it's clearly not the way this > thing is supposed to work. If you can't figure out what Windows does, > then just xoring the data

Re: crypt32: CryptProtectData/CryptUnprotectData

2005-04-13 Thread Alexandre Julliard
Kees Cook <[EMAIL PROTECTED]> writes: > ChangeLog: > Black-box implementation of CryptProtectData/CryptUnprotectData > > This is a resend, since it looks like current patches are making their > way into CVS now. :) It was reviewed last week by several people, and > includes docs, tests, e

Re: crypt32: CryptProtectData/CryptUnprotectData take 2

2005-04-06 Thread Jakob Eriksson
Kees Cook wrote: On Tue, Apr 05, 2005 at 02:32:11PM +0900, Mike McCormack wrote: The new patch looks good. I should have mentioned before that writing a test case will help your patch be accepted. Did you have any test code about that you could turn into a test case for your newly implemente

Re: crypt32: CryptProtectData/CryptUnprotectData take 3

2005-04-06 Thread Kees Cook
On Wed, Apr 06, 2005 at 11:08:12PM +0900, Dmitry Timoshkov wrote: > It's better to keep alphabetical order of .spec file entries. Oh, whoops. I just blindly grouped them. Fixed. > if you are not going to conditionally include headers using '#ifdef HAVE_xxx' > there is no need to include config.

Re: crypt32: CryptProtectData/CryptUnprotectData take 3

2005-04-06 Thread Dmitry Timoshkov
"Kees Cook" <[EMAIL PROTECTED]> wrote: > diff -u -p -u -p -r1.19 crypt32.spec > --- dlls/crypt32/crypt32.spec 10 Nov 2004 01:31:50 - 1.19 > +++ dlls/crypt32/crypt32.spec 6 Apr 2005 05:52:55 - > @@ -133,6 +133,7 @@ > @ stub CryptMsgUpdate > @ stub CryptMsgVerifyCountersignatureEncoded >

Re: crypt32: CryptProtectData/CryptUnprotectData take 2

2005-04-05 Thread Kees Cook
On Wed, Apr 06, 2005 at 10:29:37AM +0900, Mike McCormack wrote: > The best way to write a test is to look at some of the test cases that > are there already. Write and run the test under Windows, and make sure > it passes on Windows first. The test is something like this: Ah! Whoops, I didn't

Re: crypt32: CryptProtectData/CryptUnprotectData take 2

2005-04-05 Thread Mike McCormack
Kees Cook wrote: Sure, I can write something. I'll look around for docs on how to run tests -- I didn't find that when I looked around this morning. The best way to write a test is to look at some of the test cases that are there already. Write and run the test under Windows, and make sure it

Re: crypt32: CryptProtectData/CryptUnprotectData take 2

2005-04-05 Thread Joris Huizer
Kees Cook wrote: On Tue, Apr 05, 2005 at 02:32:11PM +0900, Mike McCormack wrote: The new patch looks good. I should have mentioned before that writing a test case will help your patch be accepted. Did you have any test code about that you could turn into a test case for your newly implemented

Re: crypt32: CryptProtectData/CryptUnprotectData take 2

2005-04-05 Thread Kees Cook
On Tue, Apr 05, 2005 at 02:32:11PM +0900, Mike McCormack wrote: > The new patch looks good. I should have mentioned before that writing a > test case will help your patch be accepted. Did you have any test code > about that you could turn into a test case for your newly implemented > functions

Re: crypt32: CryptProtectData/CryptUnprotectData take 2

2005-04-04 Thread Mike McCormack
Kees Cook wrote: ChangeLog: Black-box implementation of CryptProtectData/CryptUnprotectData. Here is an updated patch with various recommendations implemented. Hi Kees, The new patch looks good. I should have mentioned before that writing a test case will help your patch be accepted. Did you

Crypt32 - CryptProtectData

2003-11-30 Thread Thomas Brix Larsen
Hi list, I've been trying to get the application "Skype" (http://skype.org) working in wine. But it complains about that it can't locate the function CryptProtectData, which MSDN says belongs to crypt32.dll. I've been trying to implement this function as a stub. By adding this to crypt32/main.c: