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
SystemError in OpenSSL's SHAKE when passing negative digest sizes #135759
The reason is that OpenSSL implementation accepts a ssize_t but HACL* accepts a uint32_t. I suggest raising a ValueError in OpenSSL's implementation as well. I'll rewrite #135744 for this issue at the same time.
Now, to prevent users passing incorrect data length, I also suggest to restrict has lengths to 2 ** 29 as it was done in HACL* and in #79103 but I'll do it in a follow-up. In the first time, let's only focus on raising a ValueError for all implementations on negative inputs.
Activity
picnixz commentedon Jun 20, 2025
I'm not going to backport this as this changes error messages and exception types. AFAIK, there is no crash, just weird exception types.
gh-135759: consistently reject negative sizes in SHAKE digests (#135767)
pythongh-135759: consistently reject negative sizes in SHAKE digests (p…
pythongh-135759: consistently reject negative sizes in SHAKE digests (p…
pythongh-135759: consistently reject negative sizes in SHAKE digests (p…