Releases: taiyi-research-institute/rust-bls-derivation
Releases · taiyi-research-institute/rust-bls-derivation
v0.2.0
This library is a forked version of bls_key_derivation, containing a straightforward interface to BLS12-381 key derivation in complete compliance with EIP2333.
Since EIP2333 only proposes the hardened key derivation, this library has also implemented a method of non-hardened key derivation inspired by BIP32 to support the current application scenarios.
Changes
Differences with the original library (https://github.com/ChainSafe/rust-bls-derivation) lie in the following:
- removing the dependency on the unmaintained-for-over-6-years crate rust-crypto;
- adding the active crate curv-kzen to support non-hardened BLS key derivation beyond EIP233;
- changing the lower limit of the seed entropy from 16 bytes to 32 bytes to be consistent with the current EIP2333 and draft-irtf-cfrg-bls-signature-05;
- particularly modifying the function
hkdf_mod_r
in the following 5 parts to be in complete compliance with both EIP2333 and KeyGen in Section 2.3 of draft-irtf-cfrg-bls-signature-05:- IKM -> IMK || I20SP(0, 1);
- keyinfo -> keyinfo || I20SP(L, 2);
- salt -> H(salt);
- add a loop with the zero private key check;
- add an input parameter
key_info
to support user-customized key info strings instead of fixing as a default empty string "".