For example, if we grab 50 bytes from a high quality source and run them through a key stretching function like Argon2 and have it generate a 32 byte secret for AES.

Is there any downside to this? Do we lose any entropy during this process since it comes from a high quality source already?


1 Answer 1


Even with perfectly random input, if your final key size is 32 bytes, you cannot have more than 32 bytes of entropy in it.

But it seems pretty useless to use key stretching if you already have more random bytes than your key length, you could just use 32 bytes of your 'perfect' source as an AES key. You just expose yourself to possible weakness in the key stretching algorithm without any benefit.

  • $\begingroup$ These were my initial thoughts, as well. Unless you're accepting low quality input (ie: passwords), then it feels pretty useless to do any key stretching. $\endgroup$
    – Tuxxy
    Commented Mar 1, 2017 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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