 |
Forums |
Admin Discussion Forums: help Start New Thread
By: Richard Kernahan
RE: Decrypting msg encr by NET Framework Rijn [ reply ] 2006-09-08 21:46
|
Alan,
You are right about the CBC implementation. It assumes that the IV is encrypted and prepended to the message.
Is there any chance you could encrypt the IV and prepend it before you url-encode the main part of the message?
To encrypt just the IV you would use #encrypt_block.
I've come across the .NET implementation before and perhaps I missed something - is the IV not transmitted with the message at all? If so, how does a recipient decrypt the message?
|
By: Alan Grenadir
Decrypting msg encr by NET Framework Rijndael [ reply ] 2006-09-07 19:41
|
We have a front-end application written in VB.NET that is authenticating a username and password. The screen has a button to launch an application written in Ruby. The URL has appended a string (encrypted via System.Security.Cryptography.Rijndael) that contains user info- ?params=Rijndael-encrypted-urlencoded-string. The symmetric key is a chosen 32 byte array, the IV is random.
In the Ruby app I use rijndael = Crypt::Rijndael.new(secret_key)
decrypted_data = rijndael.decrypt_string(passed_encoded_data)
The resulting decrypted text is defective - it is missing the beginning of the cleartext message (I assume this is because the Ruby implementation of Rijndael-CBC assumes that the encrypted IV is appended to the start of the message). However, the middle of the message is garbled in several of the test cases.
Does anyone have advice how to get reliable Ruby decryption in this dotNET scenario?
Thanks in advance.
|
|
 |