Skip to content

Bring your own key material#2742

Merged
KPrasch merged 5 commits intonucypher:mainfrom
KPrasch:byok
Aug 23, 2021
Merged

Bring your own key material#2742
KPrasch merged 5 commits intonucypher:mainfrom
KPrasch:byok

Conversation

@KPrasch
Copy link
Copy Markdown
Member

@KPrasch KPrasch commented Jul 9, 2021

Type of PR:
Feature

Required reviews:
2

What this does:

  • Introduces Keystore.import_secure method for user-supplied entropy blobs for usage as keystore secrets.
  • Introduces nucypher ursula|alice|bob init --key-material xxx to accept a user-supplied hex entropy blob to import.

Issues fixed/closed:

Why it's needed:

  • Allow additional flexibility and portability of keystores.

Notes for reviewers

  • Is supporting the import of the secret key material enough portability for browser wallet interoperability or do we also need to support importing keys for individual powers?

@KPrasch KPrasch changed the title [WIP] Bring your own keys [WIP] Bring your own key material Jul 13, 2021
KPrasch added a commit to KPrasch/nucypher that referenced this pull request Jul 13, 2021
@KPrasch KPrasch changed the title [WIP] Bring your own key material Bring your own key material Jul 13, 2021
@KPrasch KPrasch marked this pull request as ready for review July 13, 2021 23:37
Copy link
Copy Markdown
Member

@derekpierre derekpierre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎸

KPrasch added a commit to KPrasch/nucypher that referenced this pull request Jul 15, 2021
KPrasch added a commit to KPrasch/nucypher that referenced this pull request Jul 15, 2021
option_force = click.option('--force', help="Don't ask for confirmation", is_flag=True)
option_gas_price = click.option('--gas-price', help="Set a static gas price (in GWEI)", type=GWEI)
option_gas_strategy = click.option('--gas-strategy', help="Operate with a specified gas price strategy", type=click.STRING) # TODO: GAS_STRATEGY_CHOICES
option_key_material = click.option('--key-material', help="A pre-secured hex-encoded secret to use for private key derivations", type=click.STRING)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of directly inputting the key material here, an alternative is to pass a file path that contains the key material. The advantage here is not disclosing the key material from the shell history. Geth does something similar for passwords (see https://geth.ethereum.org/docs/interface/managing-your-accounts)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great suggestion. I'll make the changes.

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

Successfully merging this pull request may close these issues.

Bring Your Own Keys

6 participants