Skip to content

Key Management #81

Closed
Closed

Description

@TheBlueMatt

...is almost entirely unhandled.

Generally, we need the final claim keys (ie channel_monitor_claim_key and channel_close_key) to be provided by the user (probably derived in some reliable way) and the rest are really our internal keys but should be generated from a secret the client gives us.

Activity

  1. added this to the 0.1 milestone on Aug 30, 2018
  2. ariard commented on Oct 15, 2018

    @ariard

    Hey, started to dig into it with a review of lnd stuff on it. So something similar like having a LightningWalletManager in charge of LN pure services and lay under it a WalletController trait (giving us UTXOs, protocol exit points, master seed). Maybe LightningWalletManager should suck up some actual keyring material like ChannelKeys and why not preimages and revocation points ?
    Hopefully will show some code layout soon to ease the discussion.

  3. TheBlueMatt commented on Oct 15, 2018

    @TheBlueMatt
    CollaboratorAuthor

    I don't think we need anything that fancy - I think we explicitly should not be tracking UTXOs outside of ChannelMonitors. Ideally all we'd have is a single HD master key and some well-defined way of deriving keys from it such that the client can easily scan the chain for outputs that are theirs, but I think we'll need something more flexible where we can inform the user that a given UTXO (as discovered by a ChannelMonitor) is theirs and can be spent with HD path X (eg for unrevoked HTLC-Timeout/Success outputs, we probably want to just tell the user about them and let them figure out when to spend them, though for shutdown_scriptpubkeys things can be much simpler).

  4. ariard commented on Oct 16, 2018

    @ariard

    About the UTXO it isn't the ones in on-chain channel txs but the ones spent by funding_tx, lnd have some kind of ChannelReservation to avoid double-spend of input while waiting for channel opening workflow completion. But yes surely too fancy, at least for 0.1.

    Okay so basically, 3 services to manage : derivation from master key, association of HD path X to spendable output from commitment tx and HTLC tx and provision upstream of channel_monitor_claim_key/shutdown_key given us by user.

    For the 256-bit master seed, derivation scheme is this one for me ?
    master seed --> per-connection seed --> per-chain seed --> per-channel seed --> per-commitment secret

  5. ariard commented on Oct 16, 2018

    @ariard

    And maybe we want tracking of remote per-commitment secrets and so latest preimages to ease backup in only one place? But I think we can do it latter

  6. TheBlueMatt commented on Oct 16, 2018

    @TheBlueMatt
    CollaboratorAuthor
  7. ariard commented on Oct 16, 2018

    @ariard

    Okay, noted, will stick to the bare minimum

  8. TheBlueMatt commented on Oct 16, 2018

    @TheBlueMatt
    CollaboratorAuthor

    How far did you get here? I'd like to make some quick progress on this by next weekend for LN-hackday NY.

  9. modified the milestones: 0.1, 0.0.6 on Oct 16, 2018
  10. TheBlueMatt commented on Oct 16, 2018

    @TheBlueMatt
    CollaboratorAuthor
  11. yuntai commented on Oct 24, 2018

    @yuntai
    Contributor

    I'm gonna try to hack together a solution for #55 in the coming day or three, but want to move forward on this quickly as well, so no rush, but if you aren't active on it I'll take it over.
    …
    On October 16, 2018 7:50:17 PM UTC, Matt Corallo @.***> wrote: How far did you get here? I'd like to make some quick progress on this by next weekend for LN-hackday NY. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: #81 (comment)

    oh, have you started #55? I started poking around it today and think it can get it done by the weekend.

  12. TheBlueMatt commented on Oct 24, 2018

    @TheBlueMatt
    CollaboratorAuthor
  13. yuntai commented on Oct 24, 2018

    @yuntai
    Contributor

    cool! I will be back onto onion stuff.

  14. TheBlueMatt commented on Oct 28, 2018

    @TheBlueMatt
    CollaboratorAuthor

    Fixed in #225.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions