Skip to content

Instantly share code, notes, and snippets.

@benjaminion
Created November 6, 2020 11:40
Show Gist options
  • Save benjaminion/ae80b87b09f7fbc09d7b949266061101 to your computer and use it in GitHub Desktop.
Save benjaminion/ae80b87b09f7fbc09d7b949266061101 to your computer and use it in GitHub Desktop.
Key derivation from mnemonic
Mnemonic:
wave manual book soup hotel deposit chapter coast deliver start enable mechanic topple suggest sail spider finish vanish increase fit sauce range among betray
Keystore generated by the deposit CLI tool (eth2deposit-cli-9310de0-windows-amd64 - latest, mainnet version):
{"crypto": {"kdf": {"function": "scrypt", "params": {"dklen": 32, "n": 262144, "r": 8, "p": 1, "salt": "d13b388adb2a60431a029c86e3466213e3baad483654dc129d9d9619b5d6d0e5"}, "message": ""}, "checksum": {"function": "sha256", "params": {}, "message": "1b64e1c73dc409c00a2a47463bac487df08f98230f5e52f3b25930d5778c7a54"}, "cipher": {"function": "aes-128-ctr", "params": {"iv": "09cecc36de0e72ca345b16d1391e38c5"}, "message": "52371a8d867463e4382ef8cb95756ed3d5d77f99944358b825022f9f104fcfca"}}, "description": "", "pubkey": "a53dc41745a335a76a8a90bdc7290dc12497f2353fab0ad76b245e796b4738142746a097fd4cc5382eda5a1aec48e609", "path": "m/12381/3600/0/0/0", "uuid": "b234102b-0d00-4892-b013-57334312cca8", "version": 4}
Keystore generated by https://bls-keygen.com/
{
"version": 4,
"uuid": "a9a96e2a-fe87-4685-8847-b92385f092c9",
"path": "m/12381/3600/0/0/0",
"pubkey": "a98dae492a0b5b9d9a0472d028a3993590f2d990d2c940a5bf42092cbc39b17d6f64fc1c610d801a63e1b7ec5c6a5641",
"crypto": {
"kdf": {
"function": "pbkdf2",
"params": {
"dklen": 32,
"c": 262144,
"prf": "hmac-sha256",
"salt": "bd2b8f2c512d4962d66ee18da77a80c85e46d581d353363204d6e255d8f0ce61"
},
"message": ""
},
"checksum": {
"function": "sha256",
"params": {},
"message": "2d9d453013ec63662d4fce8db502a42300b5d7989d3f5ef0839fba577e7fffa1"
},
"cipher": {
"function": "aes-128-ctr",
"params": {
"iv": "9f1e1a0961e4f0396081a1ba448ea0d9"
},
"message": "998507625dac4590554196022c6166743ce70fa177c25011deef8635d510cacd"
}
}
}
In both cases the keystore password is "password" (no quotes).
Summary:
Deposit-cli public key: a53dc41745a335a76a8a90bdc7290dc12497f2353fab0ad76b245e796b4738142746a097fd4cc5382eda5a1aec48e609
bls-keygen.com public key: a98dae492a0b5b9d9a0472d028a3993590f2d990d2c940a5bf42092cbc39b17d6f64fc1c610d801a63e1b7ec5c6a5641
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment