Skip to content

BCrypt::Errors::InvalidSalt: invalid salt when moving data generated by 2.1.4 to 3.0.1 #38

Open

Description

@leskiger

Hello,
I ran head-first into this issue this morning when migrating user data from an app that used bcrypt 2.1.4 to an app that uses bcrypt 3.0.1. It appears the old salts are 20 characters long while the salts generated by 3.0.1 are 29 characters. I'm not sure if there are other differences in format as well. I saw in the changelog that version 3.0.0 moved to a different underlying implementation and I wonder if that's the source issue?

At any rate, I can't seem to find any documentation for migrating salts to the current version. Any assistance would be greatly appreciated.

Thanks
Les

Activity

  1. emiltin commented on Mar 30, 2012

    @emiltin

    same problem here, but i suspect there will no way to migrate salts to the new format? if this is true it means all users have to reset their passwords?

  2. emiltin commented on Mar 30, 2012

    @emiltin

    is there a way to just keep using the old salts?

  3. tmm1 commented on Mar 31, 2013

    @tmm1
    Collaborator

    Did you find a solution to this?

  4. micwoj92 commented on May 26, 2024

    @micwoj92

    Hello, is this issue still relevant? 3.0.0 released 12 years ago. I doubt solution for this migration problem with come if It wasn't solved in 10+ years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions