RSA Encryption/Decryption across diff platform

From: Ben (benvogan_at_hotmail.com)
Date: 09/26/03


Date: Fri, 26 Sep 2003 11:54:27 -0700


Hi all,

I want to implement a Client/Server architecture using
encrypted communications over sockets in C# using
the .NET framework. During the initial trust building
handshake between server and client I am using public key
encryption using the RSA algorithm. I am using the
RSACryptoServerviceProvider class and I have successfully
sent encrypted messages, which were decrypted properly by
my server (both client and server were windows xp).

My concern is this: If the client machine is running
Windows 98 or ME, and my server is running Windows2k or
XP then it appears that a message encrypted on the client
will use NO PADDING and that the server will use PKCS
padding (assuming I pass in fOAEP=false to
Encrypt/Decrypt).

See the Remarks section on this msdn page:
http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/cpref/html/frlrfsystemsecuritycryptographyrsacryptoserv
iceproviderclassencrypttopic.asp

Now unless there is some magic underneath that I can't
see, it seems that a message encrypted by my client won't
be decrypted properly on the server side. (I don't have a
test machine to try this out atm)

If that's not correct I would love to hear so. If not, I
will look into padding the message myself or otherwise
making sure my message matches the Key size.

Ben



Relevant Pages

  • Re: Socket Server with Encryption help
    ... Before the client ... Authentication protocols are fiercely difficult to get right. ... by Needham and Schroeder "Using encryption for authentication in large ... Client connects into Server and Server accepts the connection. ...
    (microsoft.public.dotnet.security)
  • Question on client/server application
    ... (one will act as a simple TCP server and the other will be a simple ... TCP client). ... What is the simplest way for me to implement a secure connection ... There are plenty of encryption libraries out ...
    (comp.lang.pascal.delphi.misc)
  • RE: Implementing RSACryptoServiceProvider *and* JavaScript
    ... JavaScript: hashing, synchronous encryption, and asynchronous ... This will enable me to ensure security between the client ... Send these back to the server. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: RDP Data Encryption Error
    ... If we make a remote connection to the server at work and then RDP into one ... we get this "encryption error" after a few seconds. ... the client will drop the connection ...
    (microsoft.public.windows.terminal_services)
  • RE: Help Newbie..Upload file from SQL Server
    ... Enable SSL Encryption for SQL Server 2000 with Microsoft Management ... Steps to Use to Install a Certificate on a Server with Microsoft Management ... Steps to Enable Encryption for a Specific Client ...
    (microsoft.public.sqlserver.programming)