Re: "Microsoft Base Cryptographic Provider v1.0" does not work on Win2000

From: Valery Pryamikov (valery_at_harper.no)
Date: 10/04/05


Date: Tue, 4 Oct 2005 23:16:05 +0200

Hi,
Base Cryptographic Provider doesn't support RSA encryption keys stronger
than 512 bits. This provider is reminders of last century's USA strong
crypto exporting restrictions and it should not be used nowadays - use
Strong or Enhanced providers instead.

-Valery.
http://www.harper.no/valery

"Oleg Shadrunov" <shogel@hotmail.com> wrote in message
news:evUIOKCyFHA.2556@TK2MSFTNGP10.phx.gbl...
> Hi, All!
>
>
>
> Following code works on Windows XP SP2/SP1 (eng, IE 6.0.2900.2180), but
> does not work on Windows 2000 SP4 (eng, IE 5.00.3700.1000). On both system
> .NET Framework 1.1.4 is installed.
>
>
>
> CspParameters csp = new CspParameters();
>
> csp.KeyContainerName = "OC_AS_asax_1_11";
>
> csp.ProviderType=1;
>
> csp.ProviderName="Microsoft Base Cryptographic Provider v1.0";
>
> csp.Flags = CspProviderFlags.UseMachineKeyStore;
>
> RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(1024,csp);
>
> byte[] buf = new byte[58];
>
> byte[] ebuf=rsa.Encrypt(buf, false);
>
>
>
> "Bad key" exception throws when Encrypt is called. It works only when I
> replace "Microsoft Base Cryptographic Provider v1.0" with "Microsoft
> Enhanced Cryptographic Provider v1.0". Why? Does anybody know what is the
> problem?
>
>