Andrew Poelstra
65ff814a39
rename `rust_secp_fuzz` to `fuzzing`
2021-01-11 19:14:42 +00:00
Matt Corallo
1f043216a0
Add ability to randomize context without the `rand` feature.
...
There is little reason to pull in the `rand` dep just for the `Rng`
trait for users who want to randomize contexts. We should expose a
randomize function that just takes 32 bytes.
2020-12-29 16:45:07 -05:00
Andrew Poelstra
d1714ce0ac
fuzz: disable sig-grinding tests, prevent spin-looping
2020-12-28 18:55:33 +00:00
Andrew Poelstra
96862b6a74
fuzz: implement recoverable signatures, get all tests passing, run them in CI
2020-12-28 18:42:46 +00:00
Andrew Poelstra
b811ec133a
fuzz: only replace signing and verification, leave everything else alone
...
We can now run unit tests with the fuzz feature on, and they'll pass,
which is some assurance that fuzzing with the feature on won't lead to
spurious failures due to the fuzz harness inadequately simulating message
signing.
2020-12-23 17:59:52 +00:00
Andrew Poelstra
a2c25f2e83
Merge pull request #259 from p2pderivatives/implement-low-r-signing
...
Implement low r signing
2020-12-22 23:28:34 +00:00
Andrew Poelstra
b31bf2f611
Merge pull request #258 from thomaseizinger/better-wasm-tests
...
Run more tests in wasm
2020-12-22 06:12:01 +00:00
Tibo-lg
1d166d061b
Implement low r signing
2020-12-22 14:50:37 +09:00
Tobin Harding
a584643486
Use ManuallyDrop
...
Suggested by clippy, we need to use ManuallyDrop for these types in
order to correctly free up the memory.
2020-12-22 14:56:17 +11:00
Thomas Eizinger
8b8e482f79
Run more tests in wasm
...
Instead of repeating ourselves in defining one big test for the wasm
target, we can override the `test` attribute with the `wasm-bindgen-test`
one and therefore automatically run all (supported) tests in wasm.
Unfortunately, wasm doesn't support catching panics yet which means we
have to disable the `test_panic_raw_ctx` test.
2020-12-22 10:30:56 +11:00
Elichai Turkel
767246a282
Make preallocated use AlignedType
2020-12-18 12:48:19 +02:00
Elichai Turkel
fd206ab57c
Replace use of boxes with global allocator
2020-12-18 12:48:19 +02:00
Andrew Poelstra
0ec8fab82c
stop explicitly casting references to rawptrs
2020-11-30 02:47:34 +00:00
Andrew Poelstra
37049d743e
schnorrsig: expose tweak_check_add API
2020-11-27 18:42:14 +00:00
Andrew Poelstra
12b0abbcf8
make `ffi::Type::new` functions all unsafe, expand documentation
2020-11-27 18:42:12 +00:00
Tibo-lg
09b04560bc
Add schnorrsig module
2020-11-10 13:43:34 +09:00
Elichai Turkel
9e5a351ea7
remove redundant code after MSRV bump
2020-08-27 22:51:36 +03:00
Andrew Poelstra
19f5138925
Update MSRV to 1.29; increase version to 0.19 and -sys version to 0.3
2020-08-27 14:18:06 +00:00
Andrew Poelstra
5c451f78c6
Merge pull request #207 from sorpaas/sp-message-zero
...
Allow all-zero messages
2020-08-26 18:02:51 +00:00
Sebastian Geisler
a959de4174
Add an optional global, static context
2020-07-08 16:05:42 +02:00
Sebastian Geisler
8979a932ab
Document proper usage of `from_slice`
2020-05-14 18:24:40 +02:00
Sebastian Geisler
0d857533fa
Add optional bitcoin_hashes feature to implement ThirtyTwoByteHash
2020-05-14 18:24:39 +02:00
Kirill Fomichev
0dcc59c2b9
Add doctest to Secp256k1::verify
2020-05-05 17:30:07 +03:00
Andrew Poelstra
0782872fb0
Merge pull request #208 from TheBlueMatt/202-04-wasm
...
Re-support WASM via simple stub headers
2020-04-29 19:48:03 +00:00
Matt Corallo
d9d398ccc9
Re-support WASM via simple stub headers
...
libsecp256k1 really only barely uses libc at all, and in practice,
things like memcpy/memcmp get optimized into something other than a
libc call. Thus, if we provide simple stub headers, things seem to
work with wasm-pack just fine.
2020-04-29 15:32:54 -04:00
Kirill Fomichev
99a43ced56
Fix Secp256k1::verify docs
2020-04-22 17:58:27 +03:00
Wei Tang
9250ae49ce
Allow all-zero messages
2020-04-09 14:26:31 +02:00
Andrew Poelstra
86751b2d74
Merge pull request #201 from elichai/2020-03-ecdh
...
Simplify callback logic to returning raw coordinates
2020-04-06 14:48:57 +00:00
Elichai Turkel
2eff118d03
Simplify callback logic to returning raw coordinates
2020-03-01 13:46:25 +02:00
Elichai Turkel
2f897d8a93
Removed no longer used dont_replace_c_symbols feature
2020-02-09 16:37:59 +02:00
Elichai Turkel
124c1f3c7c
feature gate new_with_hash with std only, added catch_unwind
2019-12-05 18:05:40 +02:00
Steven Roose
724c49fff9
Add secp256k1-sys
2019-11-27 21:02:42 +00:00
Andrew Poelstra
02f66177f0
Merge pull request #179 from elichai/2019-11-raw-context
...
Creating context from raw pointer
2019-11-27 20:34:43 +00:00
Elichai Turkel
9523e093c1
Add tests for raw context
2019-11-27 22:05:27 +02:00
Andrew Poelstra
1e711f194c
Merge pull request #184 from elichai/2019-11-context
...
Fix a safety problem and make the Context trait unimplementable
2019-11-27 19:58:44 +00:00
Elichai Turkel
9522f7e4a4
Make Context::deallocate unsafe fn
2019-11-27 17:42:01 +02:00
Rodolfo Araujo
825493bea9
Small code improvements.
2019-11-17 22:10:40 -03:00
Andrew Poelstra
d900dcd1c9
Merge pull request #177 from elichai/2019-10-csymbols
...
Add a feature to disable replacing C symbols with rust
2019-10-29 01:39:08 +00:00
Elichai Turkel
349b2eac06
Add a 'dont_replace_c_symbols' feature for not replacing C's symbols with rust. isn't compatible with no-std
2019-10-28 23:05:38 +02:00
Matt Corallo
f09ff2a9de
Disable some useless lints
2019-10-28 15:20:04 -04:00
Elichai Turkel
ddb8e4fdf2
Explicit checks for empty slices
2019-08-21 13:09:36 -04:00
Elichai Turkel
b7e20c5b12
Changed all as_*ptr() to the safer CPtr trait
2019-08-21 13:09:36 -04:00
Elichai Turkel
66ab70f991
Added a C Ptr trait that returns a null pointer for ZSTs
2019-08-21 13:09:20 -04:00
Elichai Turkel
8e701b75b2
Replacing usage of the unsafe `blank` function to the `new` function
...
Signed-off-by: Elichai Turkel <elichai.turkel@gmail.com>
2019-08-16 14:15:31 -04:00
Elichai Turkel
16fc4ee3fc
Fixed the counter Rng
2019-08-13 10:41:39 -04:00
Elichai Turkel
7356705b61
Added a test for create/destroy functions
2019-07-14 16:35:51 -04:00
Elichai Turkel
96ca40faed
Exposed generic functions to create the Context
2019-07-04 21:36:32 -04:00
Elichai Turkel
811e8d24e9
Removed context_create/destroy/clone and scratch_create/destroy/clone functions.
2019-07-04 19:09:04 -04:00
Elichai Turkel
9186f0223a
Added preallocation size functions and added a test for the preallocation
2019-07-04 18:40:08 -04:00
Elichai Turkel
b4b52a9858
Moved the context specific traits/enums into a separate file with `std` gate
2019-07-04 18:40:07 -04:00