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

reconstruct priv_validator_key.json #249

Open
danbryan opened this issue Feb 5, 2024 · 2 comments
Open

reconstruct priv_validator_key.json #249

danbryan opened this issue Feb 5, 2024 · 2 comments

Comments

@danbryan
Copy link
Contributor

danbryan commented Feb 5, 2024

It would be nice if horcrux would allow you to reconstruct priv_validator_key.json from shards.

horcrux create-priv_validator_key --chain-id blah  --threshold 2 --shards 3
@akc2267
Copy link
Contributor

akc2267 commented Feb 12, 2024

this would be a great first story to ramp up on horcrux

@nitronit
Copy link
Contributor

@akc2267 and @danbryan.

AFAIK it its impossible to recreate the priv_validator_key.json (the 'seed') as it was before creating shards.

If you look at

func CreateCosignerEd25519Shards(pv privval.FilePVKey, threshold, shards uint8) []CosignerEd25519Key {

What actually is splited is not the seed, its the expanded key.
Since the expanded key involves hashing (sha512 in this case) its impossible to convert the splitted keys to the seed.

However it should be fairly trivial to recover the expanded key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants