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

Add MD5 #46

Closed
oxinabox opened this issue Nov 24, 2017 · 8 comments
Closed

Add MD5 #46

oxinabox opened this issue Nov 24, 2017 · 8 comments

Comments

@oxinabox
Copy link
Member

oxinabox commented Nov 24, 2017

@staticfloat

What do you think of the notion of adding a pure julia MD5 to this package?
Conceptually it seems pretty similar to SHA1, so there is maybe some code overlap?
(But I am not crypto guy. I know they are both from the same linage of hash functions.)

We have access to MD5 in Nettle.jl, MbedTLS.jl and Crypto.jl but all three wrap binaries.
Which doesn't seem worth it for such a simple short algorithm.

I want it for DataDeps.jl, because most public data sources provide MD5 sums (if they provide a checksum at all).
For example: http://datadryad.org/resource/doi:10.5061/dryad.ds68r/4

I've started to implement it, but I'm not sure how much of the code for SHA I can reuse.

@staticfloat
Copy link
Member

I think it's probably not worth it to try and integrate it into SHA.jl; perhaps eventually we will have a Crypto.jl that has a nice family of Julia-native hash functions, but I would say you should instead just write it in your own MD5.jl, get it working nice and fast, and then we can look at merging the two together sometime in the future if it makes sense. It's possible the update!() and digest!() common functions from SHA.jl are the same conceptual operations you would perform on MD5 hashes, but I'm honestly not sure.

@oxinabox
Copy link
Member Author

Ok, I'll make a MD5.jl, and i'll import SHA: update!, digest! if required.

@staticfloat
Copy link
Member

Also feel free to just copy-paste so that you're not adding more dependencies (Although SHA.jl is probably second only to Compat.jl in terms of number of installs in the Julia ecosystem..... which is kind of crazy)

@oxinabox
Copy link
Member Author

oxinabox commented Nov 24, 2017

I think if I don't I'll have namespace related issues.
Any time they are both used in the same package

@Evizero
Copy link

Evizero commented Dec 26, 2017

Any updates on this? As it so happens I have a usecase for DataDeps where the website only provides md5 checksums. Its not a real problem to compute my own sha hashes, but using something the main authors provide would be nice

@oxinabox
Copy link
Member Author

No, I got busy.
I am pretty sure with a little fiddling one can wrap Nettle.jl, or MedTls.jl's MD5 functions to use with DataDeps.
But I would rather have a pure julia (and pure MIT licensed) solution

@Evizero
Copy link

Evizero commented Dec 27, 2017

Right, I don't think a heavy dependency is worth it. For now I just checked manually that the md5 checksums matched the website, and then computed sha hashes myself

@oxinabox
Copy link
Member Author

https://github.com/oxinabox/MD5.jl

It needs #49 to be merged before it will work

@oxinabox oxinabox mentioned this issue Jan 11, 2018
Closed
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