Jonas Nick
edcacc2b2e
Merge commits '26de4dfe 6e898534 c083cc6e 1e5d50fa cc2c09e3 efad3506 7012a188 34388af6 98e0358d d0bd2693 185a6af2 6c52ae87 69394879 1e78c18d 202a030f bf0ac460 399722a6 3dc8c072 50f33677 7973576f 1758a92f ' into temp-merge-950
2021-06-14 18:16:46 +00:00
William Bright
3c90bdda95
change local lib headers to be relative for those pointing at "include/" dir
...
added relative paths to header files imported from src directory
added include guards for contrib/ files when referring to secp256k1.h
2021-05-05 09:24:05 -04:00
Jonas Nick
d4ca81f48e
Merge commits 'dc6e5c3a 2d9e7175 b61f9da5 98dac878 8c727b90 328aaef2 f2d9aeae b732701f db726782 5671e5f3 a4abaab7 659d0d47 f8c0b57e 24d1656c 3a8b47bc ebdba03c 4c3ba88c ' into temp-merge-901
...
Also add -zkp modules to .cirrus.yml.
2021-03-08 13:35:16 +00:00
Andrew Poelstra
290dee566e
ecdsa-s2c: add actual sign-to-contract functionality
...
Co-authored-by: Marko Bencun <mbencun+pgp@gmail.com>
Co-authored-by: Jonas Nick <jonasd.nick@gmail.com>
2020-12-21 20:50:17 +00:00
Dimitris Apostolou
07aa4c70ff
Fix insecure links
2020-12-18 00:24:22 +02:00
Jonas Nick
f587f04e35
Rename msg32 to msghash32 in ecdsa_sign/verify and add explanation
2020-12-04 14:12:38 +00:00
Tim Ruffing
6173839c90
Switch to our own memcmp function
...
Fixes #823 .
2020-10-11 10:39:20 -07:00
Pieter Wuille
a45c1fa63c
Rename testrand functions to have test in name
2020-09-25 20:50:43 -07:00
Pieter Wuille
39f67dd072
Support splitting exhaustive tests across cores
2020-09-18 14:11:02 -07:00
Pieter Wuille
b110c106fa
Change exhaustive test groups so they have a point with X=1
...
This enables testing overflow is correctly encoded in the recid, and
likely triggers more edge cases.
Also introduce a Sage script to generate the parameters.
2020-09-18 14:01:15 -07:00
Pieter Wuille
8bcd78cd79
Make secp256k1_scalar_b32 detect overflow in scalar_low
2020-09-18 14:01:15 -07:00
Pieter Wuille
c498366e5b
Move exhaustive tests for recovery to module
2020-09-18 14:01:15 -07:00
Elichai Turkel
2876af4f8d
Split ecdsa_sign logic into a new function and use it from ecdsa_sign and recovery
2020-06-03 13:19:09 +03:00
Elichai Turkel
ffef45c98a
Make recovery/main_impl.h non-executable
2020-04-15 23:14:06 +03:00
Elichai Turkel
b64a2e2597
Fix a nit in the recovery tests
2019-08-21 10:07:22 -04:00
Gregory Maxwell
cd473e02c3
Avoid calling secp256k1_*_is_zero when secp256k1_*_set_b32 fails.
...
Most of the codebase correctly used short-cutting to avoid calling
_is_zero on possibly incompletely initialized elements, but a few
places were missed.
2019-05-26 10:28:49 +00:00
Dan Raviv
abe2d3e84b
Fix header guards using reserved identifiers
...
Identifiers starting with an underscore and followed immediately by a capital letter are reserved by the C++ standard.
The only header guards not fixed are those in the headers auto-generated from java.
2017-08-26 18:44:21 +03:00
Andrew Poelstra
b595163992
recovery: add tests to cover API misusage
2016-11-28 03:28:58 +00:00
bgorlick
37697832d6
Restructure nonce clearing
...
Make sure we clear the nonce data even if the nonce function fails (it may have written partial data), and call memset only once in the case we iterate to produce a valid signature.
2016-10-21 04:59:32 -07:00
Wladimir J. van der Laan
001f1763c7
ARM assembly implementation of field_10x26 inner
...
Rebased-by: Pieter Wuille <pieter.wuille@gmail.com>
2016-05-25 18:27:47 +02:00
Gregory Maxwell
1b3efc1147
Move secp256k1_ecdsa_sig_recover into the recovery module.
2015-10-22 22:57:33 +00:00
Pieter Wuille
3bb9c44719
Rewrite ECDSA signature parsing code
...
There are now 2 encoding formats supported: 64-byte "compact" and DER.
The latter is strict: the data has to be exact DER, though the values
inside don't need to be valid.
2015-10-21 16:13:37 +02:00
Pieter Wuille
fa57f1bdf1
Use secp256k1_rand_int and secp256k1_rand_bits more
...
Update the unit tests to make use of the new RNG functions.
2015-10-21 16:13:37 +02:00
Pieter Wuille
f79aa88373
Bugfix: swap arguments to noncefp
2015-10-21 03:40:37 +02:00
Gregory Maxwell
213aa67397
Do not force benchmarks to be statically linked.
...
Libtool will do the right thing and use whatever is available
based on --enable-shared/--enable-static.
This also means that some of the things we build actually
test the dynamic library.
2015-09-29 19:03:51 +00:00
Gregory Maxwell
cfe0ed916a
Fix miscellaneous style nits that irritate overactive static analysis.
...
Also increase consistency with how overflow && zero is tested, and
avoid some mixed declarations and code that GCC wasn't detecting.
2015-09-24 08:42:37 +00:00
Pieter Wuille
dd891e0ed5
Get rid of _t as it is POSIX reserved
2015-09-21 21:03:37 +02:00
Luke Dashjr
05732c5a5f
Callback data: Accept pointers to either const or non-const data
2015-09-19 19:33:28 +00:00
Pieter Wuille
dc0ce9fc41
[API BREAK] Change argument order to out/outin/in
2015-09-04 17:45:57 +02:00
Cory Fields
b183b41122
bugfix: "ARG_CHECK(ctx != NULL)" makes no sense
...
Move all context checks to VERIFY_CHECK and be sure they come before all
ARG_CHECKs.
2015-09-02 23:42:51 -04:00
Pieter Wuille
9f443be086
Move pubkey recovery code to separate module
2015-08-28 01:51:52 +02:00