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

Support Bip32 HD for solana keypair files #17093

Closed
CriesofCarrots opened this issue May 6, 2021 · 5 comments
Closed

Support Bip32 HD for solana keypair files #17093

CriesofCarrots opened this issue May 6, 2021 · 5 comments
Milestone

Comments

@CriesofCarrots
Copy link
Contributor

Problem

Right now, a solana keypair file generated from a particular bip39 seedphrase is a "raw" ed25519 keypair; it does not use the same hashing mechanism from entropy as bip32 master-key derivation does, and does not produce/preserve the chain code that is needed bip32 and bip44 hierarchical derivation.

Proposed Solution

Extend solana key files to contain additional data, including the chain code or perhaps even the raw entropy. This would enable solana command-line tools to support bip32 HD from solana-keygen key files, following #5246

@CriesofCarrots
Copy link
Contributor Author

cc @t-nelson

@CriesofCarrots
Copy link
Contributor Author

Data to store in keyfile:

  • seedphrase/entropy
  • version
  • type, cleartext vs (down-the-road) encrypted
  • base key for verification (either bip32 master key, or solana bip44 base)
  • library of derived pubkeys

@mvines mvines added this to the The Future! milestone May 10, 2021
@dahifi
Copy link
Contributor

dahifi commented Sep 8, 2021

Is this why we can't import seed phrases derived from Sollet or similar into the solana-keygen recover?

@CriesofCarrots
Copy link
Contributor Author

@dahifi , no, you actually can use seed phrases with solana-keygen recover using prompt: or ASK as the keypair parameter:

$ solana-keygen recover -h
solana-keygen-recover
Recover keypair from seed phrase and optional BIP39 passphrase
...
ARGS:
    <KEYPAIR>    `prompt:` URI scheme or `ASK` keyword

See https://docs.solana.com/wallet-guide/paper-wallet#hierarchical-derivation

@CriesofCarrots
Copy link
Contributor Author

This still seems like a potentially useful idea, but is on no one's any-term radar. I'm going to close for now, but we know where to find this again if we want to pick it up in the future.

@CriesofCarrots CriesofCarrots closed this as not planned Won't fix, can't repro, duplicate, stale Feb 29, 2024
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

3 participants