none
CTS and OFB mode in AES RRS feed

  • Question

  • Can someone help me? I need use CTS and OFB mode for encryption in AES / Rijndael, but all classes (AesManaged; RijndaelManaged; AesCryptoServiceProvider) shows me error, that says: this mode isn't supported for this alghorritm. How can i use these encryption modes for AES / Rijndael? And i need use CTR mode too, when someone knows, you can help me with this too.

    Thanks

    Tuesday, January 12, 2016 7:26 AM

Answers

  • Hi Vojtech,

    As @Kristin Xie said, AesManaged does not allow you to change the block size. You need to look for third party libraries or write one by yourself. WinZipAes.cs is a good study case for implement your own AES class.

    https://dotnetzip.codeplex.com/SourceControl/latest#Zip/WinZipAes.cs

    Best Regards,
    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, January 14, 2016 9:30 AM
    Moderator

All replies

  • Hi Vojtech,

    I found a MSDN blog that describes HERE.

    >>I need use CTS and OFB mode for encryption in AES / Rijndael, but all classes (AesManaged; RijndaelManaged; AesCryptoServiceProvider) shows me error, that says: this mode isn't supported for this alghorritm.

    AesManaged is actually just a wrapper around RinjdaelManaged with some code added to make sure that you do not setup the algorithm to operate in a non-AES compatible way.  For instance, AesManaged does not allow you to change the block size.  (It will also disallow the use of CFB and OFB mode because of the way that RijndaelManaged works with those modes).

    Here is also a thread How to choose an AES encryption mode (CBC ECB CTR OCB CFB)?

    Hope this helps!

    Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, January 13, 2016 2:17 AM
  • Hi Kristin,

    Thanks for helping and I know, that AES is only wrapper (Rijndael alghoritm, won NIST competition for new Encryption standard), but I'm writing application for testing Encryption modes and I need to have all basic modes some way written (I mean: CBC, CTS, OFB, CFB, CTR and ECB), because all other modes have them as origins and they are only modifications.

    The number of all modes usable for encrypting is about 80 maybe 90 and I writing them for AES, because it's good unbroken standard.

    Vojtech


    Wednesday, January 13, 2016 7:52 PM
  • Hi Vojtech,

    As @Kristin Xie said, AesManaged does not allow you to change the block size. You need to look for third party libraries or write one by yourself. WinZipAes.cs is a good study case for implement your own AES class.

    https://dotnetzip.codeplex.com/SourceControl/latest#Zip/WinZipAes.cs

    Best Regards,
    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, January 14, 2016 9:30 AM
    Moderator