Skip to content

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
@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