/lyra2-compare

Compare original Lyra2 in C with its Java Lyra2 port

Primary LanguageJupyter NotebookMIT LicenseMIT

Comparison of Lyra2 and lyra2-java

This repository provides a performance comparison between the original C implementation of Lyra2 and its Java port. Lyra2 is a memory-hard password hashing scheme which allows its user to configure both memory and processing time required to compute the hash. The original repository for Lyra2 can be found here.

The gist of the comparison: the Java version is slower and requires more memory. This happens because the Java version has to perform extra steps to produce exactly the same results as the original C implementation. These include explicit endianness conversion and explicit modulo/remainder computations for unsigned 64 bits integers. Without these extra steps different hashes are produced for the same input parameters but significant speed-up is achieved.

alt text

alt text