All Projects → mirage → Digestif

mirage / Digestif

Licence: mit
Simple hash algorithms in OCaml

Programming Languages

c
50402 projects - #5 most used programming language
ocaml
1615 projects

Projects that are alternatives of or similar to Digestif

hash-checker
Fast and simple application that allows you to generate and compare hashes from files and text
Stars: ✭ 72 (+4.35%)
Mutual labels:  hash, md5, sha1, sha256
fhash
fHash - an open source files hash calculator for Windows and macOS
Stars: ✭ 222 (+221.74%)
Mutual labels:  hash, md5, sha1, sha256
Merkle
Node.js module implementing Merkle tree algorithm
Stars: ✭ 123 (+78.26%)
Mutual labels:  hash, md5, sha1, sha256
Gtkhash
A cross-platform desktop utility for computing message digests or checksums
Stars: ✭ 167 (+142.03%)
Mutual labels:  hash, md5, sha1, sha256
Openhashtab
📝 File hashing and checking shell extension
Stars: ✭ 599 (+768.12%)
Mutual labels:  hash, md5, sha1, sha256
Hashcobra
HashCobra Hash Cracking tool.
Stars: ✭ 96 (+39.13%)
Mutual labels:  hash, md5, sha1, sha256
Hash Buster
Crack hashes in seconds.
Stars: ✭ 981 (+1321.74%)
Mutual labels:  hash, md5, sha1, sha256
BruteForce
A simple brute forcer written in GO for SHA1, SHA256, SHA512, MD5 and bcrypt
Stars: ✭ 49 (-28.99%)
Mutual labels:  hash, md5, sha1, sha256
hash-wasm
Lightning fast hash functions using hand-tuned WebAssembly binaries
Stars: ✭ 382 (+453.62%)
Mutual labels:  hash, md5, sha1, sha256
signet
Easily compare SHA/BLAKE2 sums.
Stars: ✭ 13 (-81.16%)
Mutual labels:  hash, sha1, sha256
Checksum
Checksum calculation extensions for Swift
Stars: ✭ 28 (-59.42%)
Mutual labels:  md5, sha1, sha256
Crypto Es
A cryptography algorithms library
Stars: ✭ 65 (-5.8%)
Mutual labels:  md5, sha1, sha256
Wjcryptlib
Public Domain C Library of Cryptographic functions. Including: MD5, SHA1, SHA256, SHA512, RC4, AES, AES-CTR, AES-OFB, AES-CBC
Stars: ✭ 250 (+262.32%)
Mutual labels:  md5, sha1, sha256
crypto.js
base on crypto module
Stars: ✭ 13 (-81.16%)
Mutual labels:  md5, sha1, sha256
WebCrypto.swift
A small collection of cryptographic functions based on the JavaScript WebCrypto API.
Stars: ✭ 16 (-76.81%)
Mutual labels:  hash, sha1, sha256
Digestpp
C++11 header-only message digest library
Stars: ✭ 116 (+68.12%)
Mutual labels:  hash, sha1, sha256
Rufus
The Reliable USB Formatting Utility
Stars: ✭ 16,917 (+24417.39%)
Mutual labels:  md5, sha1, sha256
Hashrat
Hashing tool supporting md5,sha1,sha256,sha512,whirlpool,jh and hmac versions of these. Includes recursive file hashing and other features.
Stars: ✭ 46 (-33.33%)
Mutual labels:  md5, sha1, sha256
Forge
A native implementation of TLS in Javascript and tools to write crypto-based and network-heavy webapps
Stars: ✭ 4,204 (+5992.75%)
Mutual labels:  md5, sha1, sha256
Gensum
Powerful checksum generator!
Stars: ✭ 12 (-82.61%)
Mutual labels:  md5, sha1, sha256

Digestif - Hash algorithms in C and OCaml

Build Status

Digestif is a toolbox which implements hashes:

  • MD5
  • SHA1
  • SHA2
  • SHA3
  • WHIRLPOOL
  • BLAKE2B
  • BLAKE2S
  • RIPEMD160

Digestif uses a trick about linking and let the end-user to choose which implementation he wants to use. We provide 2 implementations:

  • C implementation with digestif.c
  • OCaml implementation with digestif.ocaml

Both are well-tested. However, OCaml implementation is slower than the C implementation.

Note: The linking trick requires digestif.c or digestif.ocaml to be the first of your dependencies.

Home page: http://blog.x25519.net/

Contact: Romain Calascibetta <romain.calascibet [email protected]>

API

For each hash, we implement the same API which is referentially transparent. Then, on the top of these, we reflect functions (like digesti or hmaci) with GADT - however, conversion from GADT to hash type is not possible (but you can destruct GADT with to_raw_string).

Equal/Compare function

We deciced to protect users to timing-attack. In this case, Digestif.equal (by eqaf package) compares hashes in constant-time.

However, we provide unsafe_compare function too which is not a constant time function. In some contexts, like ocaml-git, we don't care about timing attack and we use unsafe_compare - then, we need to make a wrap where we rename unsafe_compare to compare to be able to use it in some functors like Map.Make or Set.Make.

It's little annoying to do that but it forces the user to get the right question about security issues. So, please, don't ask to rename this function.

MirageOS

Of course, this package is available to be used on MirageOS (both implementations). User is able to compile digestif.ocaml with js_of_ocaml and this package is platform agnostic.

Build Requirements

  • OCaml >= 4.03.0 (may be less but need test)
  • base-bytes meta-package
  • base-bigarray meta-package
  • dune to build the project

If you want to compile the test program, you need:

  • alcotest

Credits

This work is from the nocrypto library and the Vincent hanquez's work in ocaml-sha.

All credits appear in the begin of files and this library is motivated by two reasons:

  • delete the dependancy with nocrypto if you don't use the encryption (and common) part
  • aggregate all hashes functions in one library
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].