Just take the string as bytes and hash it ffs

      • CaptPretentious@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        24 days ago

        Yep. Having to have requirements that doesn’t flow with people very well and requiring constant updates, people WILL find shortcuts. In the office, I’ve seen sheets of paper with the password written down, I’ve seen sticky notes, I’ve seen people put them in notepad/word so they could just copy paste.

        This is made worse, because you have to go out of your way for a password manager, which means you need to know what that is. And you need a good one because there has been (and I’m going to generalize here) problems with some password managers in the past. And for work, they have to allow a password manager for that to even be an option. Which you then end up with this security theater.

        • rekabis@lemmy.ca
          link
          fedilink
          English
          arrow-up
          2
          ·
          23 days ago

          And you need a good one because there has been problems with some password managers in the past.

          coughLastPasscough

          “Problems”. What an delightfully understated term to use.

      • Discover5164@lemm.ee
        link
        fedilink
        English
        arrow-up
        1
        ·
        24 days ago

        the password cannot contains the same sequences of characters as the old password.

        and i have seen this requirement in a service that requires changing it every month for some reasons.

        and this is to manage a government digital identity that allows to log it in all governments websites.

        • PM_me_your_doggo@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          1
          ·
          edit-2
          23 days ago

          the password cannot contains the same sequences of characters as the old password.

          That’s a weird way to say “we store your password in plaintext”

          • blackstrat@lemmy.fwgx.uk
            link
            fedilink
            English
            arrow-up
            2
            arrow-down
            1
            ·
            23 days ago

            Not necessarily. Presumably the change password form requires entering the old and new password at the same time. Then they can compare the two as plain text and hash the old password to make sure it matches, then if so, hash the new password and overwrite it. Passwords stored hashed, comparison only during the change process. A theme on this is checking password complexity rules during the login process and advising to update to something more secure. It’s possible because you’re sending the password as plain text (hopefully over a secure connection), so it can be analysed before computing the hash. This even works if the hash is salt and peppered.

    • Showroom7561@lemmy.ca
      link
      fedilink
      English
      arrow-up
      16
      ·
      24 days ago

      Reasonable upper limits are OK. But FFS, the limit should be enough to have a passphrase with 4 or 5 words in it.

      • aname@lemmy.one
        link
        fedilink
        English
        arrow-up
        5
        ·
        24 days ago

        Usually 256 bit hash is used. 256 bits is 32 bytes or 32 characters. Of course you are losing some entropy because character set is limited, but 32 characters is beyond reasonable anyway.

        • Lojcs@lemm.ee
          link
          fedilink
          English
          arrow-up
          3
          ·
          edit-2
          24 days ago

          The eff passphrase generator has about 2.5 bits of entropy per character (without word separators). Eff recommends 6 word passphrases, and with an avg word length of 7, that’s (only) 79.45 bits of entropy that won’t even fit in the 32 characters. If there wasn’t a password length limit it would be possible to saturate the hash entropy with a 20+ word & 102+ char passphrase.

          • aname@lemmy.one
            link
            fedilink
            English
            arrow-up
            1
            ·
            23 days ago

            Of course, but that’s because you are using a passphrases. Passwords have a much hogher entropy.

        • Showroom7561@lemmy.ca
          link
          fedilink
          English
          arrow-up
          2
          ·
          24 days ago

          I’d be totally fine woth 32 characters! But I’ve come across too many websites with unreasonably short (20 characters or less) limits.

    • needanke@feddit.org
      link
      fedilink
      English
      arrow-up
      10
      arrow-down
      3
      ·
      23 days ago

      Just opened a PayPal account and their limit is 20. Plus the only 2fa option is sms 🙃.

    • rekabis@lemmy.ca
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      23 days ago

      Especially since it takes more effort to limit it than leave it wide open for whatever length of password a user wants to use.

      nvarchar(max) is perfect to store the hashed copy.