Re: AES cryptographic provider

From: shiva (shiva_at_discussions.microsoft.com)
Date: 02/02/05


Date: Wed, 2 Feb 2005 02:11:02 -0800

Hi doug

Thanks...
iam running windows xp and also windows 2000..
As u said i had changed the cryptacquirecontext parameters.
but now iam getting the error as "keyset not defined"

if(CryptAcquireContext(
      &hCryptProv,
      NULL,
      NULL,
      PROV_RSA_AES,
      CRYPT_VERIFYCONTEXT))

please help me to resolve this issue

regards
shiva

"Doug Barlow" wrote:

> If you're running on Windows XP, the MS_ENH_RSA_AES_PROV string is wrong.
> If you expressly want the Microsoft AES CSP on Windows XP, change it to
>
> > NULL,
> > MS_ENH_RSA_AES_PROV" (Prototype)",
> > PROV_RSA_AES,
>
> An alternative is to specify the provider type (PROV_RSA_AES) and NULL for
> the provider name, and it will give you the default provider for that type.
> That way you don't have to worry about getting the provider name right.
>
>
> Also (since you're using 'NULL' as the container name), if you don't need
> persisted keys, change the last parameter from '0' to 'CRYPT_VERIFYCONTEXT',
> just to avoid other problems down the road.
>
> Doug Barlow
> The Soft Pedal Shop
> CSP Design & Development Consulting
> http://www.SoftPedal.net
>
> --
> "shiva" <shiva@discussions.microsoft.com> wrote in message
> news:DD03AF4D-C733-4165-B76E-C3102CA459D8@microsoft.com...
> > iam trying to do a file encryption using AES.
> > iam finding the probelm in cryptaquirecontext as keyset not defined
> >
> > the following is the code that iam using
> >
> > f(CryptAcquireContext(
> > &hCryptProv,
> > NULL,
> > MS_ENH_RSA_AES_PROV,
> > PROV_RSA_AES,
> > 0))
> > {
> > printf("A cryptographic provider has been acquired. \n");
> > }
> > else
> > {
> > MyHandleError("Error during CryptAcquireContext!");
> > }
> >
> > please help me to resolve this issue
> >
> > regards
> > shiva
>
>
>



Relevant Pages

  • Re: using vc++ dll in smart device application
    ... Iam new Windows Ce development, ... Iam having a VC++ Application which is used for GPIO Controls, ... wParam, Int32 lParam) ... Can't find PInvoke DLL '\NAND Flash\ram.dll'. ...
    (microsoft.public.windowsce.app.development)
  • Re: winXP Driver Debugger in local machine
    ... debug spew from the Windows service I am currently developing. ... up, quite nicely I might add, all the debug spew coming from Broadcom's TPM ... I have developed a winxp SDIO device driver, when Iam ...
    (microsoft.public.development.device.drivers)
  • Re: Event ID 3034
    ... >i have windows 2000 advanced server. ... From the last few days iam ... >"The redirector was unable to initialize security context or query ...
    (microsoft.public.win2000.advanced_server)
  • Re: PC104
    ... > There is dos installed on the pc104 disk on chip, basically what Iam trying ... > to do is comunicate between dos and windows 98 through tcp/ip. ...
    (comp.os.linux.embedded)
  • Re: Help to Get User Name And their roles ! Urgent
    ... Iam getting user name and domain ... dim uns ... > When you are using Windows Authentication in ASP.NET, ... > user is a member of the Domain Users group. ...
    (microsoft.public.dotnet.security)

Quantcast