-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat(crypto): Add support for Schnorr auxiliary inputs #344
base: master
Are you sure you want to change the base?
Conversation
🤖 Here's your preview: https://qlapq-syaaa-aaaak-qcq2a-cai.icp0.io/docs |
@@ -2447,6 +2447,8 @@ The encoding of the signature depends on the key ID's `algorithm`: | |||
|
|||
This call requires that a Schnorr key with ID `key_id` was generated by the IC and the signing functionality for that key was enabled. Otherwise, the call is is rejected. | |||
|
|||
This call accepts an optional auxiliary parameter `aux`. The auxiliary parameter type `schnorr_aux` is a variant. The only currently supported variant is `bip341` which allows passing a Merkle tree root hash, which is required to implement Taproot signatures as defined in [BIP341](https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki). The `bip341` variant is anly allowed for `bip340secp256k1` signatures, and if provided the `merkle_root_hash` blob must be exactly 32 bytes long, and should be generated in accordance with BIP341's specification for `taproot_output_script`. If no auxiliary parameter is provided, then `bip340secp256k1` signatures are generated in accordance with BIP340. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call accepts an optional auxiliary parameter `aux`. The auxiliary parameter type `schnorr_aux` is a variant. The only currently supported variant is `bip341` which allows passing a Merkle tree root hash, which is required to implement Taproot signatures as defined in [BIP341](https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki). The `bip341` variant is anly allowed for `bip340secp256k1` signatures, and if provided the `merkle_root_hash` blob must be exactly 32 bytes long, and should be generated in accordance with BIP341's specification for `taproot_output_script`. If no auxiliary parameter is provided, then `bip340secp256k1` signatures are generated in accordance with BIP340. | |
This call accepts an optional auxiliary parameter `aux`. The auxiliary parameter type `schnorr_aux` is a variant. The only currently supported variant is `bip341` which allows passing a Merkle tree root hash, which is required to implement Taproot signatures as defined in [BIP341](https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki). The `bip341` variant is only allowed for `bip340secp256k1` signatures, and if provided the `merkle_root_hash` blob must be exactly 32 bytes long, and should be generated in accordance with BIP341's specification for `taproot_output_script`. If no auxiliary parameter is provided, then `bip340secp256k1` signatures are generated in accordance with BIP340. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also may be better to reference taproot_sign_key
instead of taproot_output_script
because we are tweaking the secret key, although the procedure is essentially the same. It may also be reasonable to say that merkle_root_hash
corresponds to h
in taproot_sign_key
of BIP341.
@@ -2447,6 +2447,8 @@ The encoding of the signature depends on the key ID's `algorithm`: | |||
|
|||
This call requires that a Schnorr key with ID `key_id` was generated by the IC and the signing functionality for that key was enabled. Otherwise, the call is is rejected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call requires that a Schnorr key with ID `key_id` was generated by the IC and the signing functionality for that key was enabled. Otherwise, the call is is rejected. | |
This call requires that a Schnorr key with ID `key_id` was generated by the IC and the signing functionality for that key was enabled. Otherwise, the call is rejected. |
LGTM! Left some small improvement suggestions. |
No description provided.