I’m happy to announce a new release of digestif 0.7.1, available for installation via OPAM.
Digestif is a library which contains some hashes function like:
And the recently added
Particularities of digestif:
Some applications require that secret values are compared in constant time. This Functions like String.equal do not have this property, so we provide a small package — eqaf — providing a constant-time equal function. Digestif uses it to check equality of hashes — it also exposes unsafe_compare if you don’t care about timing attacks in your application.
When calling C code from the OCaml environment, the garbage collector states needs to be saved as C code may need allocated values, which the GC could move or change. This is why we implemented the hash algorithms with bigarrays, which are contained in a specific area of the GC, and never will be moved. This way, we were able to remove the run-time lock when calling the others C functions, improving the speed of the computations. A behavior even more useful as the GC is global in a multi-threaded environment, locking it pauses every threads: With digestif you can compute the hash in parallel of others operations without affecting your performances.