Skip Navigation

My password is not accepted because it is too long

In password security, the longer the better. With a password manager, using more than 24 characters is simple. Unless, of course, the secure password is not accepted due to its length. (In this case, through STOVE.)

Possibly indicating cleartext storage of a limited field (which is an absolute no-go), or suboptimal or lacking security practices.

260 comments
  • Then again, there's not much point to super long passwords. They'll be turned into hashes, commonly of 128, 196, or 256 bits length. When brute forcing, by a certain length, it's pretty much guaranteed there's a shorter combination computing to the same hash. And an attacker doesn't need your password, just some password that computes to the same hash. With 256 bit hashes a password with 1000 characters isn't more secure than one with 15 in any meaningful way.

  • I had this problem with a fucking bank once. Even better are the sites that silently chop off characters after the internal limit, on the backend, but don't tell you or limit the characters on the frontend. I had a really fun time with that last scenario once, resetting my password over and over and having it never work until I decided to just try a shorter password.

  • At one point years ago my work finally caught up with the 21st century and allowed creation of passwords longer than the fixed 8 characters it had always been. So I said great, made up something that was around 12 or so that I could remember. Until I logged into some terminal legacy programs we were still using and wouldn't take that length. So yeah, I went back to 8 characters that wouldn't break things. They eventually migrated away from such old programs and longer passwords became mandatory since they'd work everywhere, but I thought it was funny that briefly I tried to do the right thing but IT hadn't thought out the whole picture yet.

  • YES, it pisses me off so much. Though I do kind see for some things having some upper limit of 256 for certain services. But I may be wrong in thinking that.

    For example I want a secure bank password but I only need it so long. Mainly because unlike my E2EE service if they are servered a warrant or hacked through another service all my data is there. Basically I can only do so much.

  • There was a game launcher for a popular game that required a minimum of 8 characters but only used the first 8 characters and it wasn't case sensitive. So something like PassWord12345!? could be entered when changing the password, but you could sign in with any of the following:

    • password1234
    • PassWord123499(#$%
    • Password12345!?
    • passWord12345!
    • pASSword12345?!
    • PassWord123499(#$%
    • password

    I haven't logged in for years so I'm not sure if it is still working that way.

  • Sounds like they're using bcrypt. Feeding more than 24 utf8 characters into bcrypt won't do anything useful. You can permit longer passwords (many sites do) but they'd be providing a false sense of security.

    Bcrypt is still secure enough and 24 characters are fine as long as they're randomly generated by your password manager.

    • Do you have a source for the 24?

      I can find a 72 byte limit. (Wikipedia, article) That's three times as many [ascii] utf8 characters I could use.

      • The specification of the algorithm specifies up to 56 bytes, including a null terminator. If you're using UCS-2 (2+ bytes per character, like Windows, Java, Javascript, and more languages and platforms do), that's 27 characters (can't use the last half byte character pair). Add some margins for extended characters (emoji and such) and you'll end up just above or below 24. With UTF-8 you can end up doing much better (exclusively Latin-1) or much worse (exclusively non-Latin character sets). Verifying that on the frontend is a massive pain (string length in JS is unreliable) and dynamically switching codecs is a recipe for bugs and security leaks.

        The 72 byte limit is the result of the internal workings of most bcrypt algorithms, but if you ever switch implementations you need to make sure that implementation doesn't change the internal workings if you rely on details like that. If the stars align you can use 71 characters (72 if you use Pascal strings), but that's far from a given.

      • Utf8 isn't ASCII. It takes up more space.

  • Hey at least it told you there maximum length, i signed up paramount+ last night and it only said 42 characters was too long.

260 comments