Re: Encryption in .NET and CryptoAPI Certificate Stores

From: Yuan Ze (NaturalArtTrader_at_hotmail.com)
Date: 12/09/03


Date: Tue, 9 Dec 2003 22:33:10 +0800

Thank you very much!

"Michel Gallant" <neutron@NOSPAMistar.ca> wrote in message
news:#JSy0jPtDHA.1884@TK2MSFTNGP10.phx.gbl...
> A new article on using CryptoAPI cert stores in .NET to
> envelop symmetric keys used for encryption is available:
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncapi/html/encryptdecrypt2a.asp
>
> Briefly, it demonstrates how to use CryptoAPI store certificates, or X509
> certificate files to encrypt a .NET-generated random session key (3DES in
> the sample; easily changed) that has been used to encrypt file binary
data.
> It also demonstrates accessing a private key, associated with a store
> certificate to decrypt the encrypted session key (and IV in this case).
> Therefore, it shows some of the concepts used in CMS/PKCS#7 Enveloped Data
structuring.
> The code also demonstrates extracting and parsing certificate
publickeyblob
> info for use in managed code.
>
> PKCS#7 is coming in next .NET release. This article shows how to
accomplish
> similar capability in FCL 1.0/1.1, using Pinvoke to CryptoAPI capability,
> without the full complexity of asn.1 encapsulation.
>
> Cheers,
> - Michel Gallant
> MVP Security
> http://pages.istar.ca/~neutron
>
>
>



Relevant Pages

  • Re: Encryption in .NET and CryptoAPI Certificate Stores
    ... > envelop symmetric keys used for encryption is available: ... > Briefly, it demonstrates how to use CryptoAPI store certificates, or X509 ...
    (microsoft.public.dotnet.security)
  • Re: Security - Best Encryption Tool
    ... DPAPI with user store cannot be used from an ASP.NET application unless you ... If you use DPAPI encryption with machine store and your machine ...
    (microsoft.public.dotnet.framework.component_services)
  • Re: Security - Best Encryption Tool
    ... DPAPI with user store cannot be used from an ASP.NET application unless you ... If you use DPAPI encryption with machine store and your machine ...
    (microsoft.public.vb.general.discussion)
  • Re: Security - Best Encryption Tool
    ... DPAPI with user store cannot be used from an ASP.NET application unless you ... If you use DPAPI encryption with machine store and your machine ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: Security - Best Encryption Tool
    ... DPAPI with user store cannot be used from an ASP.NET application unless you ... If you use DPAPI encryption with machine store and your machine ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)