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

Stop relying on SHA internals #13

Open
jakobnissen opened this issue Oct 13, 2023 · 2 comments
Open

Stop relying on SHA internals #13

jakobnissen opened this issue Oct 13, 2023 · 2 comments

Comments

@jakobnissen
Copy link
Contributor

MD5 currently relies on SHA internals, including:

  • Unexported, undocumented functions transform!, pad_remainder!, lrot, buffer_pointer, blocklen, short_blocklen, state_type and digestlen
  • Unexported, undocumented type SHA_CTX

Since Julia stdlibs are about to be set free, this could get very bad if SHA ever begins to cut more releases.

@jw3126
Copy link
Collaborator

jw3126 commented Oct 13, 2023

or maybe this package could move into SHA.jl?

@oxinabox
Copy link
Member

oxinabox commented Oct 16, 2023

Coping what i said over in JuliaLang/julia#51687 (comment):

For historical note: MD5.jl was written using those internals when both it and SHA.jl were external libraries with few users.
Including changes to SHA.jl specifically for supporting MD5.jl: JuliaCrypto/SHA.jl#49
Probably what should have happened then is we should have documented those internal abstractions as part of the public API.
Or we should have stuck MD5 into SHA.jl

TBH we didn't worry about anything like that then because it seemed unlikely that the internals of SHA.jl would ever change. And we were pretty close to correct given they didn't change for over 5 years.
I think its not terrible to assume they won't start changing rapidly once it is out of the stdlib.
So I am not to worried about addressing this.

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

No branches or pull requests

3 participants