Skip to content

bip340: Change license of code and test vectors #1807

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

Merged
merged 1 commit into from
Apr 2, 2025

Conversation

real-or-random
Copy link
Contributor

@real-or-random real-or-random commented Apr 1, 2025

See https://github.com/bitcoin/bips/commits/master/bip-0340 for a list of contributors. I have obtained permission to do this change from all contributors in private. Nevertheless, it would be good to get an ACK from every contributor in order to have publicly available evidence.

I haven't contacted @Sajjon and @satsie, whose contributions constitute of fixing not more than two typos and are thus below the threshold of originality required for copyright to be applicable.

@Sajjon
Copy link
Contributor

Sajjon commented Apr 1, 2025

@real-or-random ACK

Copy link
Contributor

@jonasnick jonasnick left a comment

Choose a reason for hiding this comment

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

ACK

Copy link
Contributor

@theStack theStack left a comment

Choose a reason for hiding this comment

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

ACK e77399e

@ysangkok
Copy link
Contributor

ysangkok commented Apr 1, 2025

ACK e77399e57ceb2696e66734c1352cdfb65dd2fe5d

@@ -9,6 +9,7 @@
Status: Final
Type: Standards Track
License: BSD-2-Clause
License-Code: BSD-2-Clause OR MIT OR CC0-1.0
Copy link
Member

@jonatack jonatack Apr 1, 2025

Choose a reason for hiding this comment

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

Nit, per BIP3 (proposed, so this could be done later, unless it also would fix the CI):

If there are multiple acceptable licenses, each should be on a separate line...the license list is an "OR choice", not an "AND also" requirement.

License-Code: BSD-2-Clause
              MIT
              CC0-1.0

Copy link
Contributor

Choose a reason for hiding this comment

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

The rules for licenses are the same per BIP2 or BIP3: if multiple licenses are provided fulfilling the terms of any license is sufficient, and the formatting is required to be as @jonatack suggests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, but then I suggest that the BIP3 draft is changed to use SPDX License Expressions instead. These can involve OR and this is much clearer than just listing them: It's a widely used standard, and anyone reading it will understand it without the need to read BIP3. It should be easy enough to change the existing BIPs.

Copy link
Contributor

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

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

This seems like something that might be mentioned in the changelog?

@@ -9,6 +9,7 @@
Status: Final
Type: Standards Track
License: BSD-2-Clause
License-Code: BSD-2-Clause OR MIT OR CC0-1.0
Copy link
Contributor

Choose a reason for hiding this comment

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

The rules for licenses are the same per BIP2 or BIP3: if multiple licenses are provided fulfilling the terms of any license is sufficient, and the formatting is required to be as @jonatack suggests.

@@ -284,7 +285,8 @@ Blind Schnorr signatures could for example be used in [https://github.com/Elemen

== Test Vectors and Reference Code ==

For development and testing purposes, we provide a [[bip-0340/test-vectors.csv|collection of test vectors in CSV format]] and a naive, highly inefficient, and non-constant time [[bip-0340/reference.py|pure Python 3.7 reference implementation of the signing and verification algorithm]].
For development and testing purposes, we provide a [[bip-0340/test-vectors.csv|collection of test vectors in CSV format]] and a naive, highly inefficient, and non-constant time [[bip-0340/reference.py|pure Python 3.7 reference implementation of the signing and verification algorithm]],
both licensed under either the BSD-2-Clause License, the MIT License, or CC0 1.0, at your choice.
Copy link
Contributor

Choose a reason for hiding this comment

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

"either … or" is only ever used with two options. May I suggest:

Suggested change
both licensed under either the BSD-2-Clause License, the MIT License, or CC0 1.0, at your choice.
both licensed under one of the BSD-2-Clause License, the MIT License, or CC0 1.0, at your choice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"either … or" is only ever used with two options.

That's obviously wrong. My usage is a counterexample.

On a more serious note, even experts disagree on this matter, see https://en.wiktionary.org/wiki/either#cite_note-Pullum-2024-2 and https://english.stackexchange.com/questions/170409/whats-the-best-way-to-use-either-on-more-than-two-options?noredirect=1&lq=1#comment354637_170409 ... But yeah, let me make that change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just dropped the "either" because "at your choice" should be clear enough.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough, it sounded wrong to me and my native speaker colleagues collectively confirmed my stance, but of course only a Sith deals in absolutes.

image

bip-0340/LICENSE Outdated
@@ -0,0 +1,11 @@
BSD-2-Clause OR MIT OR CC0-1.0

The contents of this directory are provided under either of the following terms,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The contents of this directory are provided under either of the following terms,
The contents of this directory are provided under any of the following terms,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

rephrased

@real-or-random real-or-random force-pushed the 340-code-license-change branch 2 times, most recently from c5135a9 to b8d11eb Compare April 2, 2025 07:25
@ysangkok
Copy link
Contributor

ysangkok commented Apr 2, 2025

ACK b8d11eb

See https://github.com/bitcoin/bips/commits/master/bip-0340 for a list
of contributors. I have obtained permission to do this change from all
contributors in private. Nevertheless, it would be good to get an ACK
from every contributor in order to have publicly available evidence.

 - [ ] @sipa
 - [ ] @jonasnick
 - [ ] @theStack
 - [ ] @ysangkok

I haven't contacted @Sajjon and @satsie, whose contributions constitute
of fixing not more than two typos and are thus below the threshold of
originality required for copyright to be applicable.
@real-or-random real-or-random force-pushed the 340-code-license-change branch from b8d11eb to 84a64ec Compare April 2, 2025 13:39
@real-or-random
Copy link
Contributor Author

Force-pushed to fix another typo, sorry

@ysangkok
Copy link
Contributor

ysangkok commented Apr 2, 2025

ACK 84a64ec

@sipa
Copy link
Member

sipa commented Apr 2, 2025

ACK 84a64ec

Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

ACK

@jonatack jonatack merged commit 74eee4c into bitcoin:master Apr 2, 2025
4 checks passed
Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

One URL to fix up.

real-or-random added a commit to real-or-random/bip340-shirt that referenced this pull request Jun 20, 2025
This is possible because the test vectors have been made available under
CC0: bitcoin/bips#1807.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants