Overview
Features
Download
Documentation
Community
Add-Ons & Services

.NET 2.0 Rijndael class and Poco::Crypto compatibility

Please post support and help requests here.

.NET 2.0 Rijndael class and Poco::Crypto compatibility

Postby changire » 03 Jan 2013, 14:19

Hi,
I'm using the .NET 2.0 based implementation of the Rijndael class for encrypting data with a 256 bit key and attempting to decrypt the encrypted data with the same KEY and IV using Poco::Crypto APIs (poco-1.4.3p1) both running on the Windows XP platform.

However, the decryption fails. Any specific things that I could be missing or ought to keep and eye on?
Any configuration parameters to get the .NET 2.0 and Poco::Crypto modules in sync?

Regards,
Milind
changire
 
Posts: 7
Joined: 07 Dec 2012, 09:40

Re: .NET 2.0 Rijndael class and Poco::Crypto compatibility

Postby changire » 03 Jan 2013, 15:59

Here's the IO Exception that get's thrown while decrypting:

I/O error: error:0606506D:digital envelope routines:EVP_DecryptFinal_ex:wrong final block length
changire
 
Posts: 7
Joined: 07 Dec 2012, 09:40

Re: .NET 2.0 Rijndael class and Poco::Crypto compatibility

Postby alex » 03 Jan 2013, 20:38

I'm no expert in this but even if i was one, there's not enough information to form a meaningful advice. I'd try to decrypt same data with another tool. That will cut your problem in half and you'll know on which side it is and whether this is the appropriate place to seek help.
alex
 
Posts: 1086
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: .NET 2.0 Rijndael class and Poco::Crypto compatibility

Postby changire » 04 Jan 2013, 15:21

Thanks for the response alex.

In my case the problem was that I hadn't opened the input stream to the Cipher object in std::ios::binary mode.

Opening the stream in std::ios::binary mode did the trick.
changire
 
Posts: 7
Joined: 07 Dec 2012, 09:40


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron