lighthouse/crypto/eth2_keystore/src/json_keystore
Kirk Baird c5e97b9bf7 Add validation to kdf parameters (#1930)
## Issue Addressed

Closes #1906 
Closes #1907 

## Proposed Changes

- Emits warnings when the KDF parameters are two low.
- Returns errors when the KDF parameters are high enough to pose a potential DoS threat.
- Validates AES IV length is 128 bits, errors if empty, warnings otherwise.

## Additional Info

NIST advice used for PBKDF2 ranges https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf. 
Scrypt ranges are based on the maximum value of the `u32` (i.e 4GB of memory)

The minimum range has been set to anything below the default fields.
2020-11-19 08:52:51 +00:00
..
checksum_module.rs Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
cipher_module.rs Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
hex_bytes.rs Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
kdf_module.rs Add validation to kdf parameters (#1930) 2020-11-19 08:52:51 +00:00
mod.rs Allow import of Prysm keystores (#1535) 2020-08-18 06:28:20 +00:00