Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EIP-2333: Key derivation #1104

Merged
merged 81 commits into from
May 11, 2020
Merged
Show file tree
Hide file tree
Changes from 80 commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
7a336c6
Add test to understand flow of key storage
pawanjay176 Oct 30, 2019
44e4e29
First commit
pawanjay176 Oct 31, 2019
4dd39e4
Committing to save trait stuff
pawanjay176 Nov 4, 2019
cc56ac8
Working naive design
pawanjay176 Nov 4, 2019
f668763
Add keystore struct
pawanjay176 Nov 4, 2019
dfbb40a
Move keystore files into their own module
pawanjay176 Nov 4, 2019
d6204a5
Add serde (de)serialize_with magic
pawanjay176 Nov 4, 2019
9716c41
Add keystore test
pawanjay176 Nov 5, 2019
d801316
Fix tests
pawanjay176 Nov 5, 2019
30027b1
Add comments and minor fixes
pawanjay176 Nov 5, 2019
5f4dddf
Pass optional params to `to_keystore` function
pawanjay176 Nov 5, 2019
3fe10a7
Add `path` field to keystore
pawanjay176 Nov 6, 2019
3238325
Add function to read Keystore from file
pawanjay176 Nov 6, 2019
b78c9fd
Add test vectors and fix Version serialization
pawanjay176 Nov 6, 2019
7ebe307
Checksum params is empty object
pawanjay176 Nov 7, 2019
9bb8647
Add public key to Keystore
pawanjay176 Nov 7, 2019
f8e7f57
Add function for saving keystore into file
pawanjay176 Nov 8, 2019
2777b49
Deleted account_manager main.rs
pawanjay176 Jan 7, 2020
ae631d4
Move keystore module to validator_client
pawanjay176 Nov 26, 2019
9c366eb
Add save_keystore method to validator_directory
pawanjay176 Nov 26, 2019
4e1a0d0
Add load_keystore function. Minor refactorings
pawanjay176 Nov 26, 2019
a56e5a3
Fixed dependencies
pawanjay176 Jan 7, 2020
3a93b98
Address some review comments
pawanjay176 Mar 5, 2020
1933b75
Add Password newtype; derive Zeroize
pawanjay176 Mar 6, 2020
7fbc971
Fix test
pawanjay176 Mar 6, 2020
d420845
Merge branch 'master' into keystore
paulhauner Apr 27, 2020
fbb4984
Move keystore into own crate
paulhauner Apr 28, 2020
5b67bfd
Merge branch 'master' into keystore
paulhauner Apr 28, 2020
c2ceb80
Merge branch 'master' into keystore
paulhauner Apr 29, 2020
e8b5046
Remove padding
paulhauner Apr 29, 2020
e8348d9
Add error enum, zeroize more things
paulhauner Apr 29, 2020
80024f6
Fix comment
paulhauner Apr 29, 2020
1edbaa8
Merge branch 'master' into keystore
paulhauner May 4, 2020
9671f4a
Add keystore builder
paulhauner May 4, 2020
1f30901
Remove keystore stuff from val client
paulhauner May 4, 2020
7bdeef0
Add more tests, comments
paulhauner May 4, 2020
e911e53
Add more comments, test vectors
paulhauner May 4, 2020
5ec3805
Progress on improving JSON validation
paulhauner May 5, 2020
53a774c
More JSON verification
paulhauner May 5, 2020
4dd9931
Start moving JSON into own mod
paulhauner May 5, 2020
0358ce3
Remove old code
paulhauner May 5, 2020
016068a
Add more tests, reader/writers
paulhauner May 5, 2020
deea9d5
Tidy
paulhauner May 5, 2020
b2ebb7c
Move keystore into own file
paulhauner May 5, 2020
5b48f44
Move more logic into keystore file
paulhauner May 5, 2020
646b8f9
Tidy
paulhauner May 5, 2020
4b28c01
Tidy
paulhauner May 5, 2020
d1f3135
Allow for odd-character hex
paulhauner May 6, 2020
f1c3d8b
Merge branch 'master' into keystore
paulhauner May 7, 2020
03b5e69
Add more json missing field checks
paulhauner May 7, 2020
d2c43a6
Use scrypt by default
paulhauner May 7, 2020
b137e82
Tidy, address comments
paulhauner May 7, 2020
6a14a51
Test path and uuid in vectors
paulhauner May 7, 2020
3330b2b
Fix comment
paulhauner May 7, 2020
75566c7
Add checks for kdf params
paulhauner May 7, 2020
5d7bd3f
Enforce empty kdf message
paulhauner May 7, 2020
b02951e
Expose json_keystore mod
paulhauner May 7, 2020
702d009
Split out encrypt/decrypt
paulhauner May 7, 2020
908be4a
Replace some password usage with slice
paulhauner May 7, 2020
f1698e3
Expose PlainText struct
paulhauner May 7, 2020
9a7fbcc
First commits on path derivation
paulhauner May 5, 2020
ed3ef29
Progress with implementation
paulhauner May 6, 2020
7629b00
More progress
paulhauner May 6, 2020
3b905e3
Passing intermediate test vectors
paulhauner May 6, 2020
43a34d6
Tidy, add comments
paulhauner May 6, 2020
bd8bb2b
Add DerivedKey structs
paulhauner May 6, 2020
73ef2b3
Move key derivation into own crate
paulhauner May 6, 2020
4736f8c
Add zeroize structs
paulhauner May 7, 2020
1129418
Return error for empty seed
paulhauner May 7, 2020
7e68e5d
Add tests
paulhauner May 7, 2020
cf2972e
Tidy
paulhauner May 7, 2020
e43eb83
Expose consts, remove Password
paulhauner May 7, 2020
86e4753
Merge branch 'keystore' into key-derivation
paulhauner May 7, 2020
443e26f
Expose SALT_SIZE
paulhauner May 7, 2020
0ab9806
Merge branch 'keystore' into key-derivation
paulhauner May 7, 2020
b7f722b
Move dbg assert statement
paulhauner May 7, 2020
f6e9d10
Merge branch 'keystore' into key-derivation
paulhauner May 7, 2020
15350b8
Ensure bigints are zeroized
paulhauner May 11, 2020
7edb113
Merge branch 'master' into key-derivation
paulhauner May 11, 2020
fad36ae
Try fix Cargo.toml
paulhauner May 11, 2020
5c6fa2e
Merge branch 'master' into key-derivation
paulhauner May 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 116 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ members = [
"eth2/utils/eth2_config",
"eth2/utils/eth2_interop_keypairs",
"eth2/utils/eth2_testnet_config",
"eth2/utils/eth2_keystore",
"eth2/utils/eth2_key_derivation",
"eth2/utils/logging",
"eth2/utils/eth2_hashing",
"eth2/utils/hashmap_delay",
Expand Down
15 changes: 15 additions & 0 deletions eth2/utils/eth2_key_derivation/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "eth2_key_derivation"
version = "0.1.0"
authors = ["Paul Hauner <paul@paulhauner.com>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rust-crypto = "0.2.36"
zeroize = { version = "1.0.0", features = ["zeroize_derive"] }
num-bigint-dig = { version = "0.6.0", features = ["zeroize"] }

[dev-dependencies]
hex = "0.3"
Loading