I am confused with the AES Algorithm specifically regarding the shared secret key and the key length.

For example, AES 128 needs a key length of 128 bits but in most of the scenarios, we use general keys like 123456 or P@ssw0rd etc. are these something other than key that is needed for encryption?

  • 1
    I've corrected your grammar, spelling and punctuation in your post (Edit is under review) but even with those corrections, I am having a hard time understanding what you're asking. Specifically with this line are these something other than key that is needed for encryption? please could you edit to better explain the final line? Thanks. – J.J May 31 '18 at 6:34
  • I ask my question in the other word. I use IPSEC for Encryption and the mechanism for Authentication is pre-shared key. My question is, does this pre-shared key used as a encryption key? if no, what is the key for encryption? – ali tavakoli May 31 '18 at 7:01
  • 2
    Ali, I would highly advise you to read up about IPSEC and how it works. I feel you'd benefit from reading about IPSEC based on your comment and then you might be able to ask a more specific and detailed question. A good start would be here en.wikipedia.org/wiki/IPsec – J.J May 31 '18 at 7:53

Use a password based key derivation function to fetch better keys out of your poor passwords and retrieve the exact byte length for your key that is required. AES additionally needs an IV to ensure freshness of the encrypted data.

  • 2
    May I suggest that you add a little more to this answer? A quick explanation of the difference between a key and a password might be helpful for the OP. – S.L. Barth May 31 '18 at 6:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.