Can anybody from Microsoft help me out please.

From: Ron (namortaror@hotmail.com)
Date: 04/25/03


From: "Ron" <namortaror@hotmail.com>
Date: Thu, 24 Apr 2003 15:19:20 -0700


I'm getting the 'Illegal key size for this algorithm '
exception when running my application on Win 98. It runs
fine on XP. The The cipher strength, according to the IE,
is 128 on all platforms.

I don't control the client's environment. The application
is a window forms application and it is excpected to be
installed on any .net platform win98 and up. I am
desperate for a solution. The application (client
application) needs to encode some personal info. prior to
sending it over the net (web service connection) the
center. The exacutable is build on XP and it works fine
on XP but not on NT, 98 and 2000.
Please Help.

Here is my implementation of my encription method;

public static byte[] Encrypt(string text, string
rsaPubKey)
{
UTF8Encoding utf8 = new UTF8Encoding();
byte[] plaintext = utf8.GetBytes(text);

RSACryptoServiceProvider rsa = new
RSACryptoServiceProvider();
rsa.FromXmlString(rsaPubKey);

byte[] cipherText = rsa.Encrypt(plaintext, false);

return cipherText;
}

and here is the code that created the keys;

RSACryptoServiceProvider rsa = new
RSACryptoServiceProvider();

publicKye = rsa.ToXmlString(false);
privateKye = rsa.ToXmlString(true);

Any help greatly appreciated,
Ron
.



Relevant Pages

  • Illegal key size for this algorithm
    ... I'm getting the 'Illegal key size for this algorithm ' ... I don't control the client's environment. ... installed on any .net platform win98 and up. ... RSACryptoServiceProvider rsa = new ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Illegal key size for this algorithm
    ... I'm getting the 'Illegal key size for this algorithm ' ... exception when running my application on Win 98. ... RSACryptoServiceProvider rsa = new ...
    (microsoft.public.dotnet.framework.aspnet.security)