Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypt(3) support broken #5

Open
MartinNowak opened this issue Jun 28, 2017 · 0 comments
Open

crypt(3) support broken #5

MartinNowak opened this issue Jun 28, 2017 · 0 comments

Comments

@MartinNowak
Copy link

  1. crypt does not use Base64, hence providing a crypt hash to parseHash fails with a Base64 exception
    Crypt uses it's own keymap (see e.g. here).

  2. crypt transposes the hash bytes before encoding them (see sha512-crypt.c, sha256-crypt.c, and md5-crypt.c).

  3. parseHash does not handle $round=10000$ parameters as 2nd component

You might want to add the following test case

$6$rounds=10000$tGiXIng0KHBPBHhk$84T63BF34OMoG4TeoGV7ReJ/U/OAtfa9iFOXQ/Wsd4s3N2wBcdUCPllpkzgYbFfagBcIZxyjqcfvL.KjdiBFJ1

which encrypts the password mypass.
Also passlib might be a useful inspiration for a correct implementation.

@Abscissa Abscissa added this to the InstaUser Inital Release milestone Aug 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants