You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
deprecated-crypt-alternative fails with undecipherable errors if libxcrypt doesn't have the right hash algorithms enabled #51
@quantenzitrone Thank you for the report! I'd like to understand better how to reproduce this problem.
I used 3.13.5 on aarch64-apple-darwin. I used deprecated-crypt-alternative-0.1.2 from PyPI to provide _crypt. Any idea what's different?
i used a self compiled version from this repo
if i use the pip version, it works indeed, sorry that i didn't think to try that
pip seems to vendor libcrypt-eb21b399.so.2
do you know where that comes from?
changed the title [-]crypt module seems to be broken[/-][+]deprecated-crypt-alternative is broken with libcrypt.so.2 from libxcrypt 4.4.38[/+]on Nov 22, 2025
changed the title [-]deprecated-crypt-alternative is broken with libcrypt.so.2 from libxcrypt 4.4.38[/-][+]deprecated-crypt-alternative fails with undecipherable errors if libxcrypt doesn't have the right hash algorithms enabled[/+]on Nov 22, 2025
"only build the strong hashes" sounds like your crypt build doesn't include MD5 and CRYPT, right?
I am not sure about test_crypt and test_sha2_rounds yet, but failing test_methods is expected result because it can't add METHOD_CRYPT in that case.
md5 and sha256 are missing, crypt, as yescrypt is there
the original problem is resolved, if you want to close this
however deprecated-crypt-module could use some tests that catches this
This project doesn't intend either to add any feature or to fix any bug.
If CPython 3.10 behave differently, it will be fixed to behave the same. Otherwise the broken state is the correct state if it is broken as how CPython does.
To close or proceed this issue: Check the test result of old CPython with _crypt module
Activity
youknowone commentedon Nov 22, 2025
@quantenzitrone Thank you for the report! I'd like to understand better how to reproduce this problem.
I used 3.13.5 on aarch64-apple-darwin. I used deprecated-crypt-alternative-0.1.2 from PyPI to provide
_crypt. Any idea what's different?quantenzitrone commentedon Nov 22, 2025
i used a self compiled version from this repo
if i use the pip version, it works indeed, sorry that i didn't think to try that
pip seems to vendor
libcrypt-eb21b399.so.2do you know where that comes from?
quantenzitrone commentedon Nov 22, 2025
yep, replacing
libcrypt-eb21b399.so.2withlibcrypt.so.2from libxcrypt v4.4.38 recreates the error[-]crypt module seems to be broken[/-][+]deprecated-crypt-alternative is broken with libcrypt.so.2 from libxcrypt 4.4.38[/+]quantenzitrone commentedon Nov 22, 2025
oh it runs fine with libxcrypt 4.4.28
quantenzitrone commentedon Nov 22, 2025
ok i got the problem
my libxcrypt version only has the "strong" hashes enabled, but crypt expects md5 and sha256
[-]deprecated-crypt-alternative is broken with libcrypt.so.2 from libxcrypt 4.4.38[/-][+]deprecated-crypt-alternative fails with undecipherable errors if libxcrypt doesn't have the right hash algorithms enabled[/+]youknowone commentedon Nov 22, 2025
Thank you!
The build came from github CI. (e.g. https://github.com/youknowone/python-deadlib/actions/runs/12156036264)
What is the expected test result with Python 3.10 + your libxcrypt?
If it is different to deprecated-crypt-alternative's behavior, what will be the best way to replicate the environment to me?
quantenzitrone commentedon Nov 23, 2025
to produce the original error message, you will have to use the libcrypt.so from nixpkgs, e.g. by replacing the pip provided library:
For
nix-buildyou will need to install the nix package-manager (https://nixos.org/download or https://lix.systems/install/#on-any-other-linuxmacos-system)python3 -m venv .venv .venv/bin/pip install deprecated-crypt-alternative nix-build '<nixpkgs>' -A libxcrypt cp result/lib/libcrypt.so .venv/lib/python3.13/site-packages/_crypt.libs/libcrypt-eb21b399.so.2alternatively you could build libxcrypt yourself and use
to only build the strong hashes
this will however result in a different weird error:
youknowone commentedon Nov 23, 2025
"only build the strong hashes" sounds like your crypt build doesn't include MD5 and CRYPT, right?
I am not sure about test_crypt and test_sha2_rounds yet, but failing test_methods is expected result because it can't add METHOD_CRYPT in that case.
quantenzitrone commentedon Nov 23, 2025
md5 and sha256 are missing, crypt, as yescrypt is there
the original problem is resolved, if you want to close this
however deprecated-crypt-module could use some tests that catches this
youknowone commentedon Nov 23, 2025
This project doesn't intend either to add any feature or to fix any bug.
If CPython 3.10 behave differently, it will be fixed to behave the same. Otherwise the broken state is the correct state if it is broken as how CPython does.
To close or proceed this issue: Check the test result of old CPython with _crypt module