Skip to content

Issue 6186 - Change default salt sizes generated in crypt_pwd #6185

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

Merged
merged 1 commit into from
May 31, 2024

Conversation

jasonborden
Copy link
Contributor

@jasonborden jasonborden commented May 30, 2024

Issue - #6186 - Increase the amount of salt crypt_pwd generates

Bug Description:
Salt currently generated by crypt_pwd is only 12 bits which is rather weak.

Fix Description:
Makes the salt generated the same length as linux shadow:
12bits (2 b64 chars) for CRYPT
48bits (8 b64 chars) for CRYPT-MD5
96bits (16 b64 chars) for CRYPT-SHA256 and CRYPT-SHA512

relates: https://lists.fedorahosted.org/archives/list/freeipa-users@lists.fedorahosted.org/thread/ZJXVFQ6XC2IEROA2LZNBXKQ6YWAJHAIU/

Author: Jason Borden

Reviewed by: @progier389, @merlinthp (Thanks!)

@jasonborden jasonborden changed the title Change default salt sizes generated in crypt_pwd Issue 6186 - Change default salt sizes generated in crypt_pwd May 30, 2024
This commit changes the salt length generated in crypt_pwd from 12 bits
to instead match the salt length used by linux shadow:

12bits (2 b64 chars) for CRYPT
48bits (8 b64 chars) for CRYPT-MD5
96bits (16 b64 chars) for CRYPT-SHA256 and CRYPT-SHA512
Copy link
Contributor

@progier389 progier389 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@progier389 progier389 merged commit ffa9c8b into 389ds:main May 31, 2024
49 of 195 checks passed
@jasonborden jasonborden deleted the crypt_pwd-salt branch June 1, 2024 07:47
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

Successfully merging this pull request may close these issues.

3 participants