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

Add Schnorr adaptor signatures module #299

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

siv2r
Copy link
Contributor

@siv2r siv2r commented Oct 23, 2024

Overview

This PR adds support for Schnorr Adaptor signatures. It is based on the PR #268 by @ZhePang, rebased and updated to address all pending review comments. Test coverage has been improved.

Schnorr Adaptor Signatures

This implementation follows the Python specification and includes test vectors from the specification. Additionally, it provides an example that demonstrates the Multi-Hop Locks protocol using this Schnorr adaptor module.

This commit adds the foundational configuration, building scripts, and
an initial structure for the project.
This commit adds a nonce function that will be used by default for
Schnorr adaptor signatures.

This nonce function is similar to secp256k1_nonce_function_hardened with
an extra argument for a compressed 33-byte adaptor point.
This commit adds the Schnorr adaptor signature APIs:

- adaptor_presign

    Creates a pre-signature for a given message and adaptor point.

- adaptor_extract

    Extracts the adaptor point from a pre-signature.

- adaptor_adapt

    Adapts the pre-signature to produce a BIP-340 Schnorr signature.

- adaptor_extract_sec

    Extracts the secret adaptor (discrete logarithm of adaptor point)
    from a pre-signature and the corresponding BIP-340 signature.
This commit adds test coverage, modifying the ci.yml file, Valgrind
constant time tests for secret data, API tests, nonce function tests,
and test vectors from the spec.
This commit adds an example that implements the Multi-hop Locks protocol
using the Schnorr adaptor signature APIs
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.

1 participant