Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do scrypt implementations have a maximum length for input(password)?

Tags:

scrypt

Specifically this. I know most bcrypt implementations are around 50 characters for, but I'm pretty certain that's not the case with scrypt.

like image 480
No_name Avatar asked Nov 01 '22 19:11

No_name


1 Answers

From a developer of the successor of scrypt:

...question that is related to both scrypt and yescrypt. Is there a maximum input length for passwords?

For the likely purposes of your question, no, there's no such length limit. (Of course, in practice computers have limited memory and integer variables in C have limited range, so there is some sort of large limit.)

I recommend that you do have some sane limit on the length of username and password inputs in your web app anyway. Something that would never get in the way of reasonable usage, but would prevent obviously erroneous (maybe malicious) inputs from getting to deeper layers.

I know bcrypt has a limit of 71 characters.

It's 72 for bcrypt.

Alexander

like image 125
No_name Avatar answered Dec 27 '22 21:12

No_name