Commit Graph

571 Commits

Author SHA1 Message Date
Sebastian Geisler 2046a40905 Randomize context on initialization
Signed-off-by: Sebastian Geisler <sebastian@blockstream.io>
2020-08-03 12:07:26 +02:00
Matt Corallo c9741d4846
Merge pull request #219 from TheBlueMatt/master
Expose the underlying array in addition to a ptr to the same
2020-07-21 20:13:57 -07:00
Sebastian Geisler a959de4174 Add an optional global, static context 2020-07-08 16:05:42 +02:00
Kohei Taniguchi 02ed0616e4 Add assert for the response of ffi negate interface
The interfaces for negate should always returns 1 as mentioned secp256k1.h L574, L563.
But in the future it might return 0 if the seckey or pubkey is invalid, but our type system doesn't allow that to ever happen.
2020-06-10 09:59:55 +09:00
Kohei Taniguchi 1742973a1f Add fuzztarget for negation 2020-06-09 11:06:11 +09:00
Kohei Taniguchi d45f709cd4 Add negation support 2020-06-09 10:05:07 +09:00
Matt Corallo 0052bc92fb Expose the underlying array in addition to a ptr to the same 2020-06-01 14:35:31 -04:00
Andrew Poelstra a5147bbf01
Merge pull request #206 from sgeisler/2020-04-hashes
Add optional bitcoin_hashes feature to implement ThirtyTwoByteHash
2020-05-24 12:17:33 +00: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
Andrew Poelstra a1842125a7
Merge pull request #212 from fanatid/verify-doctest
Add doctest to Secp256k1::verify
2020-05-13 19:00:50 +00:00
Andrew Poelstra e6a82fa089
Merge pull request #204 from ordian/master
secp256k1-sys: remove restriction on cc version
2020-05-13 18:56:23 +00:00
Tim Ruffing 489e3ff8d2
Define ECMULT_GEN_PREC_BITS
This is configurable in upstream now.

Fixes #214.

So far, this just sets it to `4`. It's tempting to set it to `2` when `lowmemory` is enabled
but `lowmemory` is about RAM and not about binary size. This is better addressed by
a resolution of #193.
2020-05-13 10:40: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
Elichai Turkel affc6b4027 Add sanity checks for wasm32 for size and alignment of types 2020-04-29 15:32:57 -04:00
Elichai Turkel 931253d41e Add a size_t type to types 2020-04-29 15:32:57 -04: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
Tim Ruffing c39a1ca0a2
Merge pull request #210 from fanatid/docs-verify
Fix Secp256k1::verify docs
2020-04-24 09:00:23 +02:00
Kirill Fomichev 99a43ced56
Fix Secp256k1::verify docs 2020-04-22 17:58:27 +03:00
Andronik Ordian b22b9e5709
Merge remote-tracking branch 'rust-bitcoin/master'
* rust-bitcoin/master:
  Fix no-std raw test, after removal of lang items
  Fix broken benchmarks
  Disable emscripten tests until they work again https://github.com/rust-lang/rust/issues/66916 https://github.com/rustwasm/team/issues/291
  Add constant of the prime of the curve field.
  Simplify callback logic to returning raw coordinates
  Removed no longer used dont_replace_c_symbols feature
  Fix wrong feature name external-symbols
  Fix missing return c_int in NonceFn
2020-04-09 15:13:43 +02:00
Wei Tang 9250ae49ce Allow all-zero messages 2020-04-09 14:26:31 +02:00
Andrew Poelstra 9aa768df10
Merge pull request #195 from elichai/patch-1
Missing return c_int in NonceFn
2020-04-06 14:49:58 +00: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
Andrew Poelstra 3fd089712c
Merge pull request #205 from elichai/2020-03-bench
Fix broken benchmarks
2020-04-05 21:38:33 +00:00
Elichai Turkel 18259fd67b
Fix no-std raw test, after removal of lang items 2020-04-05 11:08:32 +03:00
Elichai Turkel b2edf157cd
Fix broken benchmarks 2020-04-05 11:08:29 +03:00
Andrew Poelstra ab59498e04
Merge pull request #199 from elichai/2020-02-external-symbols
Fix typos in the external-symbols feature(bug)
2020-04-04 21:31:13 +00:00
Andrew Poelstra 12c248dc1b
Merge pull request #203 from elichai/2020-03-disable-emscripten
Disable emscripten tests until they work again
2020-04-04 21:21:54 +00:00
Andrew Poelstra 1aaeab1665
Merge pull request #200 from rantan/add_p
Add the prime of the secp256k1 field element.
2020-04-04 21:21:31 +00:00
Andronik Ordian ba013945d5
readme: add an example for travis 2020-03-17 22:33:29 +01:00
Andronik Ordian 37b9e2dfe9
move the note to the main readme 2020-03-16 11:46:53 +01:00
Andronik Ordian 420eb38034
ci: only downgrade cc for 1.22 2020-03-14 20:57:04 +01:00
Andronik Ordian fd8b3ff572
secp256k1-sys: remove restriction on cc version 2020-03-14 20:46:26 +01:00
Elichai Turkel 9bbd4a3df1
Disable emscripten tests until they work again
https://github.com/rust-lang/rust/issues/66916
https://github.com/rustwasm/team/issues/291
2020-03-11 12:22:32 +02:00
Kohei Taniguchi 4b410fc202 Add constant of the prime of the curve field. 2020-03-06 09:15:32 +09: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 889e9a8740
Fix wrong feature name external-symbols 2020-02-09 16:37:39 +02:00
Elichai Turkel f277530669
Fix missing return c_int in NonceFn 2020-01-26 14:20:26 +02:00
Andrew Poelstra 8c517e0afa
Merge pull request #192 from elichai/2020-01-sys
Bump -sys version to 0.1.2
2020-01-09 16:36:35 +00:00
Elichai Turkel 6bcb510d9a
Bump secp256k1-sys to 0.1.2 2020-01-09 18:10:12 +02:00
Andrew Poelstra 5c82bb4335
Merge pull request #191 from elichai/2020-01-fuzztarget
Fix fuzztarget symbols
2020-01-09 15:29:19 +00:00
Elichai Turkel 8f52bacb4a
Bump version to 0.17.2 2020-01-09 17:08:39 +02:00
Elichai Turkel 89271c9c3c
Fix fuzztarget symbols 2020-01-09 16:56:10 +02:00
Andrew Poelstra 80c856c091
Merge pull request #189 from stevenroose/fix-links
Fix the manifest links property for secp256k1-sys
2019-12-11 18:16:36 +00:00
Steven Roose ebc660bf94
Bump to v0.17.1 2019-12-11 18:57:21 +01:00
Steven Roose 987d556a67
Bump secp256k1-sys to v0.1.1 2019-12-11 15:55:00 +00:00
Steven Roose 65fe733ad0
Update Cargo.toml link in vendor script 2019-12-11 15:54:30 +00:00
Andrew Poelstra ff6e944875
Merge pull request #187 from rust-bitcoin/2019-12-keyword-reduce
remove some keywoards from secp-sys Cargo.toml
2019-12-10 20:45:07 +00:00