-
Notifications
You must be signed in to change notification settings - Fork 264
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
Re-arrange functionality to make ECDSA and Schnorr equal-ish citizens #327
Commits on Nov 11, 2021
-
We re-export all structs residing in that module. There is no reason to expose the internal module structure of the library publicly.
Configuration menu - View commit details
-
Copy full SHA for 8e96aba - Browse repository at this point
Copy the full SHA 8e96abaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 52d0554 - Browse repository at this point
Copy the full SHA 52d0554View commit details -
Prefer
use super::*
import over manually picking itemsTests are usually placed next to the code they are testing. As such, importing `super::*` is a good starting point.
Configuration menu - View commit details
-
Copy full SHA for 49c7e21 - Browse repository at this point
Copy the full SHA 49c7e21View commit details -
Move
Signature
andSerializedSignature
to newecdsa
moduleWith the introduction of Schnorr signatures, exporting a `Signature` type without any further qualification is ambiguous. To minimize the ambiguity, the `ecdsa` module is public which should encourage users to refer to its types as `ecdsa::Signature` and `ecdsa::SerializedSignature`. To reduce ambiguity in the APIs on `Secp256k1`, we deprecate several fucntions and introduce new variants that explicitly mention the use of the ECDSA signature algorithm. Due to the move of `Signature` and `SerializedSignature` to a new module, this patch is a breaking change. The impact is minimal though and fixing the compile errors encourages a qualified naming of the type.
Configuration menu - View commit details
-
Copy full SHA for c47ead9 - Browse repository at this point
Copy the full SHA c47ead9View commit details -
The `KeyPair` type is semantically unrelated to the schnorr signature algorithm.
Configuration menu - View commit details
-
Copy full SHA for 2e0e731 - Browse repository at this point
Copy the full SHA 2e0e731View commit details -
Rename
schnorr::PublicKey
toschnorr::XOnlyPublicKey
The public key is unrelated to the signature algorithm. It will be moved out of the module in another commit. For ease of review, the renamed is kept separate.
Configuration menu - View commit details
-
Copy full SHA for 87d936a - Browse repository at this point
Copy the full SHA 87d936aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d4fb819 - Browse repository at this point
Copy the full SHA d4fb819View commit details -
Rename
schnorrsig
module toschnorr
Schnorr is commenly known as a signature algorithm, we don't need to restate that in the name of the module.
Configuration menu - View commit details
-
Copy full SHA for 760559c - Browse repository at this point
Copy the full SHA 760559cView commit details -
Rename schnorr functions on
Secp256k1
to match naming of ecdsaThe naming scheme we employ is `{sign,verify, ...}_{ecdsa,schnorr}`.
Configuration menu - View commit details
-
Copy full SHA for e0c3bb2 - Browse repository at this point
Copy the full SHA e0c3bb2View commit details -
Configuration menu - View commit details
-
Copy full SHA for ce44277 - Browse repository at this point
Copy the full SHA ce44277View commit details -
Move helper function below usage
This is not C89. We can declare the more important things first.
Configuration menu - View commit details
-
Copy full SHA for c5c9551 - Browse repository at this point
Copy the full SHA c5c9551View commit details -
Configuration menu - View commit details
-
Copy full SHA for d244b4d - Browse repository at this point
Copy the full SHA d244b4dView commit details