3

Im currently developing a Silverlight application that connects to an old webservice. Our old webservice uses an encryption tool which silverlight does not support. Finally, we decided to used AesManaged for encryption, however, our webservice does not support AesManaged. Is their a way to decrypt an AesManaged to RijndaelManaged?

If yes, can you please post a sample snippet? Your feedback is highly needed.

Thank you.

xscape
  • 3,318
  • 9
  • 45
  • 86
  • I have no answer, but you can't mix and match algorithms. You'll have to create an intermediary web service that stands inbetween the old webservice and your silverlight app, which decrypts the Rijndael and reincrypts to AES. –  May 21 '10 at 11:18
  • @crazy They're both symmetric algorithms, but you can't say they are exactly the same in all cases, and they are, in fact, not the same in the .NET world (as in, RijndaelManaged does not extend AesManaged as they are different algorithms). Its confusing and I was not clear, my bad. –  May 21 '10 at 14:41
  • 1
    @crazyscot, they're not the same. Rijndael is a superset of AES. "AES has a fixed block size of 128 bits and a key size of 128, 192, or 256 bits, whereas Rijndael can be specified with block and key sizes in any multiple of 32 bits, with a minimum of 128 bits. The blocksize has a maximum of 256 bits, but the keysize has theoretically no maximum." – KTC May 21 '10 at 21:25

2 Answers2

12

As long as you make sure to set the blocksize of RijndaelManaged to 128 bits, AesManaged and RijndaelManaged will behave identically.

AES is just another name for the Rijndael encryption algorithm with blocksize 128.

Rasmus Faber
  • 48,631
  • 24
  • 141
  • 189
-1

I found a sample snippet for this one. Referencing from one of the questions related to it here

Community
  • 1
  • 1
xscape
  • 3,318
  • 9
  • 45
  • 86