Update key derivation to latest EIP-2333 (#1633)

## Issue Addressed

#1624

## Proposed Changes

Updates to match [EIP-2333](`https://eips.ethereum.org/EIPS/eip-2333`)

## Additional Info

In order to have compatibility with the eth2.0-deposit-cli, [this PR](https://github.com/ethereum/eth2.0-deposit-cli/pull/108) must also be merged
This commit is contained in:
realbigsean 2020-09-23 22:59:43 +00:00 committed by Paul Hauner
parent fcf8419c90
commit 996887376d
No known key found for this signature in database
GPG Key ID: 5E2CFF9B75FA63DF
2 changed files with 559 additions and 537 deletions

File diff suppressed because it is too large Load Diff

View File

@ -65,9 +65,9 @@ fn assert_vector_passes(raw: RawTestVector) {
fn eip2333_test_case_0() {
assert_vector_passes(RawTestVector {
seed: "0xc55257c360c07c72029aebc1b53c05ed0362ada38ead3e3e9efa3708e53495531f09a6987599d18264c1e1c92f2cf141630c7a3c4ab7c81b2f001698e7463b04",
master_sk: "12513733877922233913083619867448865075222526338446857121953625441395088009793",
master_sk: "6083874454709270928345386274498605044986640685124978867557563392430687146096",
child_index: 0,
child_sk: "7419543105316279183937430842449358701327973165530407166294956473095303972104"
child_sk: "20397789859736650942317412262472558107875392172444076792671091975210932703118",
})
}
@ -75,9 +75,9 @@ fn eip2333_test_case_0() {
fn eip2333_test_case_1() {
assert_vector_passes(RawTestVector {
seed: "0x3141592653589793238462643383279502884197169399375105820974944592",
master_sk: "46029459550803682895343812821003080589696405386150182061394330539196052371668",
master_sk: "29757020647961307431480504535336562678282505419141012933316116377660817309383",
child_index: 3141592653,
child_sk: "43469287647733616183478983885105537266268532274998688773496918571876759327260",
child_sk: "25457201688850691947727629385191704516744796114925897962676248250929345014287",
})
}
@ -85,9 +85,9 @@ fn eip2333_test_case_1() {
fn eip2333_test_case_2() {
assert_vector_passes(RawTestVector {
seed: "0x0099FF991111002299DD7744EE3355BBDD8844115566CC55663355668888CC00",
master_sk: "45379166311535261329029945990467475187325618028073620882733843918126031931161",
master_sk: "27580842291869792442942448775674722299803720648445448686099262467207037398656",
child_index: 4294967295,
child_sk: "46475244006136701976831062271444482037125148379128114617927607151318277762946",
child_sk: "29358610794459428860402234341874281240803786294062035874021252734817515685787",
})
}
@ -95,8 +95,8 @@ fn eip2333_test_case_2() {
fn eip2333_test_case_3() {
assert_vector_passes(RawTestVector {
seed: "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3",
master_sk: "31740500954810567003972734830331791822878290325762596213711963944729383643688",
master_sk: "19022158461524446591288038168518313374041767046816487870552872741050760015818",
child_index: 42,
child_sk: "51041472511529980987749393477251359993058329222191894694692317000136653813011",
child_sk: "31372231650479070279774297061823572166496564838472787488249775572789064611981",
})
}