AES256EncryptionFormatter unable to handle ECB CipherMode
mrvernon_at_gmail.com
Date: 03/12/05
- Next message: kiran & Dev: "RE: Encryption and signing using Security context tokens using WS"
- Previous message: Thomas S. Trias: "RE: Encryption and signing using Security context tokens using WS-Pol"
- Messages sorted by: [ date ] [ thread ]
Date: 12 Mar 2005 00:42:40 -0800
I'm experiencing this problem in WSE 2.0r2.
Code that reproduces the bug:
// create a Rijndael using the ECB cipher mode
Rijndael rijndael = new RijndaelManaged();
rijndael.Key = keybytes;
rijndael.IV = ivbytes;
rijndael.Mode = CipherMode.ECB;
// Create the encryption formatter off the Rijndael
AES256EncryptionFormatter aes = new AES256EncryptionFormatter(
rijndael );
aes.Encrypt( plaintext );
The problems:
- The plaintext is encrypted in CBC mode, rather than ECB.
- Encrypt() sets rijndael.Mode to CBC. Encrypt() also appears to reset
other fields in the rijndael object.
- There is no exception raised, nor any other notification that the
formatter class doesn't work with ECB. It also does not appear to be
documented.
This seems to be a bug. Why doesn't the formatter class work with
other cipher modes, and (if that is by design) why doesn't it at least
raise an exception instead of silently using another ciphering mode?
Thanks.
- Next message: kiran & Dev: "RE: Encryption and signing using Security context tokens using WS"
- Previous message: Thomas S. Trias: "RE: Encryption and signing using Security context tokens using WS-Pol"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|