-
Notifications
You must be signed in to change notification settings - Fork 790
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #10657: Utils: Improvements to ECDSA key-handling code
Summary: PR10657 backport https://github.com/bitcoin/bitcoin/pull/10657/files 63179d0 Scope the ECDSA constant sizes to CPubKey / CKey classes (Jack Grigg) 1ce9f0a Ensure that ECDSA constant sizes are correctly-sized (Jack Grigg) 48abe78 Remove redundant `= 0` initialisations (Jack Grigg) 17fa391 Specify ECDSA constant sizes as constants (Jack Grigg) e4a1086 Update Debian copyright list (Jack Grigg) e181dbe Add comments (Jack Grigg) a3603ac Fix potential overflows in ECDSA DER parsers (Jack Grigg) Pull request description: Mostly trivial, but includes fixes to potential overflows in the ECDSA DER parsers. Cherry-picked from Zcash PR zcash/zcash#2335 Also backported fixup to use ptrdiff_t instead of size_t, so we don't generate a signed-unsigned-comparison warning: PR12351 https://github.com/bitcoin/bitcoin/pull/12351/files Note: the "potential overflows" here isn't anything substantial, rather just conversion to the good-practice way to compare pointers. The conversion from `lenbyte >= sizeof(size_t)` to `lenbyte >= 4` does remove platform-dependent behaviour, but only for signatures that violate DERSIG and are >16 MiB in size, see discussion on PR. Test Plan: `make check` Reviewers: deadalnix, Fabien, jasonbcox, #bitcoin_abc Reviewed By: deadalnix, Fabien, #bitcoin_abc Differential Revision: https://reviews.bitcoinabc.org/D3581
- Loading branch information
1 parent
bb8fad2
commit 7309653
Showing
6 changed files
with
133 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.