Skip to content
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

Alternative for blake2b on systems that do not support that hash function? #12809

Closed
VlkrS opened this issue Jul 18, 2023 · 2 comments
Closed

Comments

@VlkrS
Copy link

VlkrS commented Jul 18, 2023

blake2b is not supported on all platforms that can run Erlang, i.e. those building with LibreSSL rather than OpenSSL.

Would it be possible to fall back to a different hash or even a checksum for that purpose? As far as I understand this is only needed to detect changes for recompilation and actually requires none of the security properties of a cryptographic hash?

8 -> :crypto.hash(:blake2b, contents)

@josevalim
Copy link
Member

What error do you get in those cases?

@VlkrS
Copy link
Author

VlkrS commented Jul 18, 2023

** (ErlangError) Erlang error: {:notsup, {~c"hash.c", 112}, ~c"Digest type not supported in this cryptolib"}

in Mix.Tasks.DepsTest - patching those lines to use :sha256 works.

josevalim added a commit that referenced this issue Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants