locked
Identify AES Algorithm . Is it AES 128 or AES 256 ? RRS feed

  • Question

  • I am using AES Algorithm for Encryption & Decryption in c# .I am using AesCryptoServiceProvider class for Encryption & decryption.

    Here is my settings in the code
    AesCryptoServiceProvider result = new AesCryptoServiceProvider();
    result.BlockSize = 128;
    result.KeySize = 256;
    result.Mode = CipherMode.CBC;
    result.Padding = PaddingMode.PKCS7;

    I am little confused whether the code i am using here is implementation of AES 128 Algorithm or AES 256 Algorithm .

    Simple question is How to identify you are using AES 256 Algorithm / AES 128 Algorithm  ?

    Is it solely based on KeySize Property in the above code ?

    I tried this link : http://social.msdn.microsoft.com/Forums/vstudio/en-US/ac5f4d30-343e-484e-b795-b214820a9327/aes-net-encryption-is-it-always-256-bit-aes

    But i didn't got my answer.


    • Edited by ManjunathVS Wednesday, August 21, 2013 10:43 AM Added Hyperlink
    Wednesday, August 21, 2013 10:43 AM

Answers

  • You can only tell by having a known AES device decode the message.  The AES is a world-wide standard (not microsoft) that was developed in accordance with NSA guidelines.

    jdweng

    • Marked as answer by Jason Dot Wang Thursday, August 29, 2013 11:17 AM
    Wednesday, August 21, 2013 4:25 PM

All replies

  • 128 and 256 refer to key size

    See webpage below

    http://en.wikipedia.org/wiki/Advanced_Encryption_Standard


    jdweng

    Wednesday, August 21, 2013 12:48 PM
  • Then what is the way to  identify you are using AES 256 Algorithm / AES 128 Algorithm  ?
    Wednesday, August 21, 2013 1:02 PM
  • You know what you are sending.  The only way of determining if you are receiving the correct data is if you get good decrypted data.  There is test data on the web that you can compare your results to.

    jdweng

    Wednesday, August 21, 2013 2:41 PM
  • Base your algorithm on the key size... It is the key size that determines the complexity/security of the encryption.  You would then set an array/block of bytes as your key.
    • Edited by PaulDAndrea Wednesday, August 21, 2013 3:29 PM
    Wednesday, August 21, 2013 3:25 PM
  • Can you redirect me to any MSDN documentation which says the same ?
    Wednesday, August 21, 2013 4:06 PM
  • But i still didn't understand how will i identify the algorithm i m using is ASE 256/ AES 128
    Wednesday, August 21, 2013 4:09 PM
  • You can only tell by having a known AES device decode the message.  The AES is a world-wide standard (not microsoft) that was developed in accordance with NSA guidelines.

    jdweng

    • Marked as answer by Jason Dot Wang Thursday, August 29, 2013 11:17 AM
    Wednesday, August 21, 2013 4:25 PM