13个版本

0.0.14 2021年7月13日
0.0.13 2021年7月13日
0.0.10 2019年11月3日
0.0.9 2019年10月28日
0.0.1 2018年10月6日

#1592算法


用于 libp3p

Apache-2.0

12KB
156

气球哈希

这是一个气球哈希实现。它针对组织的需求进行了优化。关于内存硬度属性的信息可以阅读这篇论文

气球是可证明的顺序一致性,是pbkdf2的更好替代品。它用作密钥派生函数,并在希望以性能为代价获得内存硬度属性作为防御机制的场合使用。

The algorithm consists of three main parts, as explained in the paper.
The first step is the expansion, in which the system fills up a buffer
with pseudorandom bytes derived from the password and salt by computing
repeatedly the hash function on a combination of the password and the previous hash.
The second step is mixing, in which the system mixes time_cost number of times the
pseudorandom bytes in the buffer. At each step in the for loop, it updates the nth block
to be the hash of the n-1th block, the nth block, and delta other blocks chosen at random
from the buffer. In the last step, the extraction, the system outputs as the hash the last element in the buffer.


High-security key derivation 128 MB space from ref implementation.

The larger the time parameter, the longer the hash computation will take.
The choice of time has an effect on the memory-hardness properties of the scheme: the larger time is,
the longer it takes to compute the function in small space.

依赖项

~2–2.7MB
~67K SLoC