Skip to content

[Proposal] Improve BCrypt hashing component. #16

Closed
@ziadoz

Description

@ziadoz

Seeing as other Laravel components are leveraging some of the best PHP libraries available, it seems like the BCrypt hashing component should do the same. I recommend making it leverage either Kherge/BCrypt or Password Compat.

They both have a better selection of salt generators (MCrypt, OpenSSL, DevRandom, Microsoft CryptoAPI) and select the best available in the environment, falling back to the next most secure salt generator (until eventually it'll use plain old MtRand). They also switch between BCrypt versions 2a and 2y depending on the version of PHP running because 2a has a security issue. Additionally they're well tested.

It's worth reading Anthony Ferrara's article about screwing up BCrypt as it highlights some of the common mistakes (a few of which exist in the current L4 implementation).

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