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

secp256k1/ecdsa: Expose r and s value of signature. #3188

Merged
merged 1 commit into from Sep 21, 2023

Conversation

minizilla
Copy link
Contributor

@minizilla minizilla commented Sep 21, 2023

Why

R and S value can be useful for some computation, currently it is impossible to get R and S value from this package since it is unexported.

Closes #3187.

@minizilla
Copy link
Contributor Author

close #3187

@minizilla
Copy link
Contributor Author

I don't think unit test for getter is necessary.

@davecgh
Copy link
Member

davecgh commented Sep 21, 2023

Thanks for the PR!

I don't think unit test for getter is necessary.

It's not strictly necessary, so I won't hold the PR up over it.

I'll probably add one in a separate PR though because I noticed a code branch that isn't being hit while I was checking and I prefer to keep the cover as close to 100% as is possible. There are a couple of cases that are simply impossible to hit because they would require breaking the underlying crypto to compute.

Before:

$ go test -cover
PASS
coverage: 99.2% of statements

After:

$ go test -cover
PASS
coverage: 98.3% of statements

@davecgh davecgh merged commit 2daf6c9 into decred:master Sep 21, 2023
2 checks passed
@davecgh
Copy link
Member

davecgh commented Sep 21, 2023

Do you have a preference for attribution in the overall dcrd release notes for the next release? I typically just use contributor's name displayed on their GitHub profile unless they request otherwise.

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.

Request to change r and s in secp256k1 ecdsa signature to exported variable R and S
2 participants