RSA Encryption/Decryption across diff platform
From: Ben (benvogan_at_hotmail.com)
Date: 09/26/03
- Next message: SQL Server Development Team [MSFT]: "Re: Look at this internet patch from Microsoft Corporation"
- Previous message: Luther Miller: "Re: Implementing Security - Advice Please"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
- Next message: SQL Server Development Team [MSFT]: "Re: Look at this internet patch from Microsoft Corporation"
- Previous message: Luther Miller: "Re: Implementing Security - Advice Please"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|