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

MuSig2 support #294

Draft
wants to merge 56 commits into
base: develop
Choose a base branch
from
Draft

MuSig2 support #294

wants to merge 56 commits into from

Commits on Nov 4, 2024

  1. Added parsing for musig(); generalized key placeholders in wallet pol…

    …icies to more general key expressions
    bigspider committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    f962150 View commit details
    Browse the repository at this point in the history
  2. Rename "key placeholder" with "key expression" where appropriate; add…

    …ed some comments.
    
    Generalizing to key expressions containing musig() makes it necessary to distinguish
    the key expressions in the wallet policy from the actual key placeholders that are
    just indexes to the list of key informations (@num in the descriptor template),
    whereas the two concepts were often not clearly separated in the code base.
    
    Renaming to "key expressions" makes the distinction more clear.
    bigspider committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    5efbc36 View commit details
    Browse the repository at this point in the history
  3. Refactored policy_node_keyexpr_t to explicitly label which of the uni…

    …on type is used; generalized some parts of the code that are not generalized to musig key expressions, and annotated some others.
    bigspider committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    8e24994 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3dbf464 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    92f1b54 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4e6bae5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    654e1e2 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    bbde126 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7b7af76 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2024

  1. Configuration menu
    Copy the full SHA
    4ebfc25 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9f48eb8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7f28011 View commit details
    Browse the repository at this point in the history
  4. Add parsing of Musig2 pubnonces and partial signatures as yielded val…

    …ues in sign_psbt in the python client
    bigspider committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    acc0530 View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2024

  1. Configuration menu
    Copy the full SHA
    3327a8e View commit details
    Browse the repository at this point in the history
  2. Update musig() specs, and fix psbt processing

     - musig() now sorts the keys, as per the BIP draft
     - correctly compute fingerprint for musig() aggregate key
     - added both the aggregate and the internal key in keyexpr_info_t struct
     - fixed psbt parsing logic to detect change/addr_index for musig
     - updated musig tests
    bigspider committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    41be6f1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c15335c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b0e02d0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1b3061b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    27c95dc View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    16261f5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    5b51ab8 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3418b60 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    8e13101 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    ad377fb View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    38a9e80 View commit details
    Browse the repository at this point in the history
  13. Fix read_change_and_index_from_psbt_bip32_derivation incorrectly abor…

    …ting prematurely for some PSBTs. Added explanatory comment
    bigspider committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    aea89fd View commit details
    Browse the repository at this point in the history
  14. Removed unused argument; deleted commented out check

    The check doesn't serve a security purpose, since direct derivation of each input/change script
    is used to check if they are internal.
    bigspider committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    13abab8 View commit details
    Browse the repository at this point in the history
  15. Generalized count_internal_keys in the test suite to count_internal_k…

    …ey_placeholders, with musig placeholder support
    bigspider committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    5fcdcdf View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    1192d10 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    6c8fb7e View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    4189823 View commit details
    Browse the repository at this point in the history
  19. [WIP] Musig2 e2e tests

    bigspider committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    712bfa7 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    34f2746 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    ce066d7 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    ac4a48c View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    9645d25 View commit details
    Browse the repository at this point in the history
  24. Refactor input_keys_callback output_keys_callback to match against al…

    …l the internal key expressions, instead of only the first
    bigspider committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    6184d44 View commit details
    Browse the repository at this point in the history
  25. Added test for incomplete matching of BIP32 derivation paths in polic…

    …ies with multiple internal keys
    bigspider committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    c5a3b92 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    1d25a27 View commit details
    Browse the repository at this point in the history
  27. Fixup: musig e2e tests

    bigspider committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    6d858b4 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2024

  1. Detect if the PSBT has at least a PSBT_IN_MUSIG2_PUB_NONCE field

    It will be needed in order to enable silently participating to Round 1
    of the MuSig2 protocol, which should only happen if no such fields are
    found (which would indicate that Round 1 was already executed).
    bigspider committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    3f556d8 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2024

  1. Moved MuSig2 Round 1 out of the signing flow. Allow it without user c…

    …onfirmation.
    
    The first round of MuSig does not involve access to the private keys and does not
    complete authorizing a transaction. Therefore, it is safe to do it without user
    confirmation, which allows software wallets to possibly do it in background.
    
    In cases when the other cosigners are online, this allows to get a single-sig
    user experience, as the user would only have to plug the device once, and confirm
    a single action.
    bigspider committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    b6ce98c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    392b942 View commit details
    Browse the repository at this point in the history
  3. Fix wrong documentation for get_extended_pubkey; renamed to get_exten…

    …ded_pubkey_from_client
    bigspider committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    752aaa8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e6b07ce View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2024

  1. Use qsort for sorting

    In the past, while the app was deployed on Nano S, we preferred
    avoiding the use of Nano S in order to reduce the binary size.
    Now, using qsort makes the code more readable and succinct.
    bigspider committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    568153f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    715b2be View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bd286b3 View commit details
    Browse the repository at this point in the history
  4. Add an explicit initializer for the musigsession signing state.

    This is redundant with the current implementation. However, the
    musigsession module is written in such a way that the calling code
    has no knowledge about its internal working. Therefore, it should
    not assume that zeroing out is the correct way of initializing it.
    bigspider committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    b551ed4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4a2a3c5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    08a2ac0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    42cceb4 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c49167c View commit details
    Browse the repository at this point in the history
  9. Fixes for JS tests in CI

    bigspider committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    0456d6d View commit details
    Browse the repository at this point in the history
  10. [WIP] test JS CI

    bigspider committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    1112d8a View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    daa79a3 View commit details
    Browse the repository at this point in the history