RE: Problem with RSA encryption on w2k

From: Patrick C. Cole (patcole@online.microsoft.com)
Date: 10/03/02


From: patcole@online.microsoft.com (Patrick C. Cole (MS))
Date: Thu, 03 Oct 2002 21:10:50 GMT


Joseph,

Let me research the issue further and I will respond as soon as possible.

Patrick Cole
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.
--------------------
| From: "Joseph" <joseph@bluefield.com.hk>
| Subject: Problem with RSA encryption on w2k
| Date: Wed, 2 Oct 2002 13:33:51 +0800
| Lines: 52
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
| Message-ID: <#0usiUdaCHA.2556@tkmsftngp09>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.security
| NNTP-Posting-Host: 203.85.151.129
| Path: cpmsftngxa09!cpmsftngxa10!tkmsftngp01!tkmsftngp09
| Xref: cpmsftngxa09 microsoft.public.dotnet.framework.aspnet.security:2420
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security
|
| Hi,
|
| I tried to perform a direct RSA encryption using OAEP padding as follows:
|
| CspParameters param = new CspParameters();
|
| param.Flags = CspProviderFlags.UseMachineKeyStore;
|
| RSACryptoServiceProvider rsaEncrypt = new RSACryptoServiceProvider(param);
|
| rsaEncrypt.FromXmlString(publicKey);
|
| int dataSize = 0;
|
| bool fOAEP = true;
|
| if (fOAEP)
|
| dataSize = (rsaEncrypt.KeySize / 8) - 41;
|
| else
|
| dataSize = (rsaEncrypt.KeySize / 8) - 11;
|
| byte[] toEncrypt = new byte[dataSize];
|
| toEncrypt = System.Text.Encoding.UTF8.GetBytes("My String comes here");
|
| Byte[] encrypted = rsaEncrypt.Encrypt(toEncrypt, fOAEP);
|
|
| }
|
|
| I got the following error when calling Encrypt():
|
| Direct Encryption and decryption using RSA OAEP padding are not available
on
| this platform. SOURCE: mscorlib STACK TRACE: at
|
System.Security.Cryptography.RSACryptoServiceProvider._EncryptPKWin2KEnh(Int
| Ptr hPubKey, Byte[] rgbKey, Boolean fOAEP) at
| System.Security.Cryptography.RSACryptoServiceProvider.Encrypt(Byte[] rgb,
| Boolean fOAEP)
|
|
| High Encryption Pack is already installed on my W2K server. My machine is
| running W2K Server 5.00.2195 SP2. What else is causing this problem?
| Thanks.
|
| Joseph
|
|
|
|



Relevant Pages

  • RE: Problem with RSA encryption on w2k
    ... Joseph, ... | I tried to perform a direct RSA encryption using OAEP padding as follows: ... | bool fOAEP = true; ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Math processor
    ... > It can do an 1024bit RSA encryption in 7ms. ... > algorithm" implemented in a bleeding edge FPGA. ...
    (sci.electronics.design)
  • Encryption: 1024 bits are not enough
    ... The strength of the encryption used now to protect banking and e-commerce transactions on many Web sites may not be effective in as few as five years, a cryptography expert has warned after a new distributing key-cracking achievement. ... But "it is good advanced warning" of the coming dusk of 1024-bit RSA encryption, widely used now for Internet commerce, as computers and mathematical techniques become more powerful, Lenstra said. ...
    (alt.privacy)
  • 1024 bits not enough according to study
    ... The strength of the encryption used now to protect banking and e-commerce transactions on many Web sites may not be effective in as few as five years, a cryptography expert has warned after a new distributing key-cracking achievement. ... But "it is good advanced warning" of the coming dusk of 1024-bit RSA encryption, widely used now for Internet commerce, as computers and mathematical techniques become more powerful, Lenstra said. ...
    (talk.politics.crypto)
  • Re: Math processor
    ... It can do an 1024bit RSA encryption in 7ms. ... algorithm" implemented in a bleeding edge FPGA. ... people out there designing super fast encryption algorithms, ...
    (sci.electronics.design)

Loading