Re: Files Encrypted on Win9x/NT/2K Cannot be Decrypted on WinXP

From: David Lowndes (davidl@mvps.org)
Date: 06/11/02


From: David Lowndes <davidl@mvps.org>
Date: Tue, 11 Jun 2002 17:36:10 +0100


>We've been using the Microsoft Cryptography functions to encrypt and
>decrypt files. The encryption in XP seems to be incompatible with
>previous versions of Windows: files encrypted on previous versions
>cannot be decrypted on WindowsXP.

The usual problem is that you're using the sample code, which uses
NULL in the call to CryptAcquireContext:

>CryptAcquireContext(&hProv,NULL,NULL,PROV_RSA_FULL,CRYPT_VERIFYCONTEXT);

Here's the reply I had from MS:

"... The default provider also may
change due to installation of IE. I believe Win2000, NT, and Win9x
behave differently when installing IE though I don't know the
specifics. To fix the problem it is necessary to be specific about
which provider you want. So you may want to use MS_DEF_PROV
when calling CryptAcquireContext instead of NULL.
"

Dave

--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.


Relevant Pages

  • Re: Problems with EFS
    ... Peolko wrote: ... > have my documents in other partition and to some of them I used Windows XP:s ... > EFS to encrypt those files. ... > after the new installation of XP. ...
    (microsoft.public.windowsxp.security_admin)
  • EFS : Cipher.exe works but not the GUI interface
    ... decrypt files or folders, so all is working, the problem came just from the ... option in advanced field stays gray, ... > I don't understand why I can't encrypt files on my windows 2000 Pro. ...
    (microsoft.public.win2000.security)
  • Re: How can I decrypt my files...
    ... You can only decrypt files from the same user account that encrypted these ... This can only be done if You start the operating system. ... You must reinstall (repair the Windows installation) ...
    (microsoft.public.windowsxp.customize)
  • Re: decryption of user files
    ... If the certificate used to encrypt the files was never backed ... >I had user files that were encrypted mistakingly in ... > Windows XP OS, now that OS was deleted from the hard disk ... > and a new installation was done but I cant get to open ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Encrypted partition solution for Windows OSes?
    ... is to encrypt the file, ... For Windows you have several ... choices, PGP, and GnuPG, as well as Guardbot for web based file transfers. ... files as drives, and aren't terribly interesting. ...
    (Focus-Microsoft)