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
From python 3.9 hashlib introduced the usedforsecurity argument:
Changed in version 3.9: All hashlib constructors take a keyword-only argument usedforsecurity with default value True. A false value allows the use of insecure and blocked hashing algorithms in restricted environments. False indicates that the hashing algorithm is not used in a security context, e.g. as a non-cryptographic one-way compression function.
evidently use hashing where the purpose is indeed not for security purposes. This should be specifed in the code. My guess is that pretty much all federal systems in the world would have this issue.
Federal Information Processing Standards (FIPS) 140-2 is a mandatory standard for the protection of sensitive or valuable data within Federal systems. - https://www.wolfssl.com/license/fips/
Without this fix organisations following certain security standard (FIPS compliance could be an example) are not able to use this package.
The same fix has been applied to a range of key repositories:
From python 3.9
hashlib
introduced theusedforsecurity
argument:evidently
use hashing where the purpose is indeed not for security purposes. This should be specifed in the code. My guess is that pretty much all federal systems in the world would have this issue.Without this fix organisations following certain security standard (FIPS compliance could be an example) are not able to use this package.
The same fix has been applied to a range of key repositories:
Proposed solution
usedforsecurity=False
when callinghashlib
constructors where the hashing is not security-related.usedforsecurity
is only available from Python 3.9 onwards andevidently
supports Python 3.8+, implement logic to handle this difference:hashlib
withoutusedforsecurity
.usedforsecurity=False
.I will submit a PR implementing this change. Let me know if there are other concerns or suggestions for handling this!
The text was updated successfully, but these errors were encountered: