Raaz: New release

reddit this

I have just uploaded, on hackage, a new release candidate for raaz. I plan to release it on Feb 28, 2017 (coinciding with the National Science Day in India).

This release include the following primitives

Besides the portable C implementation, we have an implementation that uses 256bit vector instructions (using GCC/Clang intrinsics). The randomness source for this library uses the chachac20 cipher as a PRG. The stream cipher is really efficient with the following figures on my machine1

  • Encryption/decryption:
    • portable C: 4.98 Gbps
    • vector256+avx2: 9.55 Gbps
  • Pseudo-random bytes: 5.45 Gbps

Notice that the vector256+avx implementation can pretty much saturate a 10Gbps line. The PRG uses the most efficient chacha20 implementation available, which in this case is vector256+avx2. The reduction in performance for prg is due to some copying overhead that I have not bothered to optimise. For more details and comparisons with other primitives see the gist:


  1. Intel i7-4770 CPU @ 3.40GHz x 8 cores.