Bundled md5 in OCaml

Tomas Mraz tmraz at redhat.com
Thu Nov 21 14:08:30 UTC 2013


On Čt, 2013-11-21 at 11:26 +0000, Richard W.M. Jones wrote:
> On Thu, Nov 21, 2013 at 10:29:39AM +0100, Tomas Mraz wrote:
> > On St, 2013-11-20 at 20:33 +0000, Richard W.M. Jones wrote:
> > > See:
> > > https://github.com/ocaml/ocaml/blob/trunk/byterun/md5.c#L78
> > > 
> > > (1) In terms of the bundled(md5-$IMPLEMENTATION), which
> > > $IMPLEMENTATION is this?
> > 
> > It is bundled(md5-plumb)
> > 
> > > (2) Ideally I would like to replace this with a call to a library (in
> > > Fedora, I don't think this would be accepted upstream).  But which
> > > library should I use?
> > 
> > I'd probably use libgcrypt. However if the MD5 is not used for security
> > related purpose, which it should not be used for due to its brokenness
> > anyway, I am not sure it is worth it to replace the bundled copy with a
> > library call.
> 
> FWIW it is used to implement an OCaml library module (Digest) which is
> used by the compiler for making a unique hash over module interfaces
> so we can tell if they are compatible / have changed.  It's not used
> for any security-related purpose.

I probably would not bother replacing it with library call then. At
least not until OCaml would like to have library module for other
cryptographic hashes.

-- 
Tomas Mraz
No matter how far down the wrong road you've gone, turn back.
                                              Turkish proverb
(You'll never know whether the road is wrong though.)



More information about the devel mailing list