Commit Graph

40 Commits

Author SHA1 Message Date
Andrew Poelstra 3373cc930e
secp256k1-sys: update all symbols from 0.9.1 to 0.9.2 2024-01-02 16:22:20 +00:00
Andrew Poelstra 484e5d8d5b
fix incorrect FFI binding for pubkey_combine 2023-12-18 21:28:27 +00:00
Tobin C. Harding c1ccda18b6
secp256k1-sys: Bump version to 0.9.1
In preparation for doing a point release add a changelog entry, bump the
version, and update all the `0_9_0` identifiers in the vendored code.

Done so we can release the wasm-build bug fix.
2023-12-07 10:21:38 +11:00
Davidson Souza 80b2a8d4aa
Update vendored libsecp to v0.4.0 2023-09-30 12:04:45 -03:00
Tobin C. Harding b6d0c3bfcd
Use doc_auto_cfg
We can build docs using feature markers by using `doc_auto_cfg` now, no
need to manually call the `doc` attribute.
2023-05-03 12:06:25 +10:00
Tobin C. Harding 5ae136d7bd
Bump secp256k1-sys version to 0.8.1
We are ready to release a new minor version of `secp256k1-sys`, in order
to do so we must make change the symbol names to reflect the new version
as well as the usual changelog and version bump.

In preparation for releasing `secp256k1-sys` v0.8.1 do:

- Rename symbols to from `0_8_0` -> `0_8_1`, done mechanically (search
  and replace)
- Add changes log notes (includes changelog entry for 0.8.0)
- Bump `secp256k1-sys` crate version 0.8.0 -> 0.8.1, justified because
  we have added a new public function.
2023-03-17 16:22:01 +11:00
kwantam 8fffbeab13
implement "non_secure_erase" methods
This PR implements a `non_secure_erase()` method on SecretKey,
KeyPair, SharedSecret, Scalar, and DisplaySecret. The purpose
of this method is to (attempt to) overwrite secret data with
valid default values. This method can be used by libraries
to implement Zeroize on structs containing secret values.

`non_secure_erase()` attempts to avoid being optimized away or
reordered using the same mechanism as the zeroize crate: first,
using `std::ptr::write_volatile` (which will not be optimized
away) to overwrite the memory, then using a memory fence to
prevent subtle issues due to load or store reordering.

Note, however, that this method is *very unlikely* to do anything
useful on its own. Effective use involves carefully placing these
values inside non-Copy structs and pinning those structs in place.
See the [`zeroize`](https://docs.rs/zeroize) documentation for tips
and tricks, and for further discussion.

[this commit includes a squashed-in commit from tcharding to fix docs
and helpful suggestions from apoelstra and Kixunil]
2023-02-21 08:56:03 -05:00
Tobin C. Harding 2dad589394 Upgrade the vendored libsecp256k1 code
`libsecp256k1` v0.2.0 was just released.

Update the vendored code using

 `./vendor-libsecp.sh depend 0_8_0 21ffe4b`

```
git show 21ffe4b
commit 21ffe4b22a9683cf24ae0763359e401d1284cc7a (tag: v0.2.0)
Merge: 8c949f5 e025ccd
Author: Pieter Wuille <pieter@wuille.net>
Date:   Mon Dec 12 17:00:52 2022 -0500

    Merge bitcoin-core/secp256k1#1055: Prepare initial release

    e025ccdf7473702a76bb13d763dc096548ffefba release: prepare for initial release 0.2.0 (Jonas Nick)
    6d1784a2e2c1c5a8d89ffb08a7f76fa15e84fff5 build: add missing files to EXTRA_DIST (Jonas Nick)
    13bf1b6b324f2ed1c1fb4c8d17a4febd3556839e changelog: make order of change types match keepachangelog.com (Jonas Nick)
    b1f992a552785395d2e60b10862626fd11f66f84 doc: improve release process (Jonas Nick)
    ad39e2dc417f85c1577a6a6a9c519f5c60453def build: change package version to 0.1.0-dev (Jonas Nick)
    90618e9263ebc2a0d73d487d6d94fd3af96b973c doc: move CHANGELOG from doc/ to root directory (Jonas Nick)

    Pull request description:

      Based on #964

    ACKs for top commit:
      sipa:
        ACK e025ccdf7473702a76bb13d763dc096548ffefba

    Tree-SHA512: b9ab71d7362537d383a32b5e321ef44069f00e3e92340375bcd662267bc5a60c2bad60222998e6602cfac24ad65efb23d772eac37c86065036b90ef090b54c49
    ```

Requires a new version of `secp256k1-sys`, use v0.8.0

- Update the `secp256k1-sys` manifest (including links field)
- Update symbols to use 0_8_0
- Add a changelog entry
- depend on the new version in `secp256k1`

Which in turn requires a new version of `secp256k1`, use v0.26.0
2022-12-21 08:11:14 +11:00
Tobin C. Harding 3fa2436272 Bump secp256k1-sys version to 0.7.0
We are ready to release a new minor version of `secp256k1-sys`, in order
to do so we must make change the symbol names to reflect the new version
as well as the usual changelog and version bump.

In preparation for releasing `secp256k1-sys` v0.7.0 do:

- Rename symbols to from `0_6_1` -> `0_7_0`, done mechanically (search
  and replace)
- Add changes log notes
- Bump `secp256k1-sys` crate version 0.6.1 -> 0.7.0, justified because
  we have added new public methods to various types (e.g.,
  `PublicKey::cmp_fast_unstable`)
2022-12-12 09:13:00 +11:00
Andrew Poelstra 91f10965b3
secp-sys: change symbol names to `0_6_1` from `0_5_0`
Needed to build secp-sys 0.5 and secp-sys 0.6 in the same tree. Fixes #489.

This PR can be reproduced by running

    ./vendor-libsecp.sh depend/ 0_6_1 a1102b12196ea27f44d6201de4d25926a2ae9640

in the secp256k1-sys directory.
2022-10-08 15:43:43 +00:00
Andrew Poelstra 79a4ee333b secp256k1-sys: bump version to 0.6.0
Needed for release of secp256k1 0.23.0
2022-06-21 20:37:45 +00:00
Andrew Poelstra 4f7f138797
Merge rust-bitcoin/rust-secp256k1#331: Update the code to edition 2018, and update dependencies
5d2f1ceb64 Fix WASM build (Elichai Turkel)
39aaac6834 Use new trait TryFrom and do small refactoring (Elichai Turkel)
7d3a149ca5 Move more things from the std feature to the alloc feature (Elichai Turkel)
bc8c713631 Replace c_void with core::ffi::c_void (Elichai Turkel)
26a52bc8c8 Update secp256k1-sys to edition 2018 and fix imports (Elichai Turkel)
ebe46a4d4e Update rand to 0.8 and replace CounterRng with mock::StepRng (Elichai Turkel)
626835f540 Update secp256k1 to edition 2018 and fix imports (Elichai Turkel)
67c0922a46 Update MSRV in CI and Readme from 1.29 to 1.41 (Elichai Turkel)

Pull request description:

  As proposed in https://github.com/rust-bitcoin/rust-bitcoin/issues/510#issuecomment-881686342 this PR raises the MSRV to 1.41.1 it also changes the code to be Edition 2018.

  The PR contains a few things:
  * Moving to edition 2018 and fixing the imports
  * Sorting and combining imports to make them more concise
  * Replacing our c_void with `core::ffi::c_void`
  * Bumping the `rand` version to latest and modifying our `RngCore` implementations accordingly
  * Doing some small refactoring and using the new `TryInto` trait where it makes the code nicer

  If people prefer I can split this PR into multiple and/or drop some commits

ACKs for top commit:
  tcharding:
    ACK 5d2f1ceb64
  apoelstra:
    ACK 5d2f1ceb64

Tree-SHA512: 5bf84e7ebb6286d59f8cada0bb712c46336f0dd6c35b67e6f4ba323b5484ad925b99b73e778ae4608f123938e7ee8705a0aec576cd9c065072c4ecf1248e3470
2022-06-08 20:53:41 +00:00
Elichai Turkel 7d3a149ca5
Move more things from the std feature to the alloc feature 2022-06-07 23:59:42 +03:00
Elichai Turkel 26a52bc8c8
Update secp256k1-sys to edition 2018 and fix imports 2022-06-07 23:59:40 +03:00
Tibo-lg 0b27bde60b Bump secp256k1-sys minor version 2022-05-07 20:32:08 +09:00
Andrew Poelstra 3ed7fb044c release minor version of secp-sys with WASM fix 2022-04-30 16:14:52 +00:00
Andrew Poelstra 8294ea3f50 secp256k1-sys: update upstream library
Two API changes needed to be reflected: schnorrsig_sign and schnorrsig_verify.

Also bump both Cargo.toml files
2022-03-08 19:45:41 +00:00
Andrew Poelstra 88f6baee73
Merge rust-bitcoin/rust-secp256k1#353: Documented features
18f74d5242 Clarify what does "less security" mean (Martin Habovstiak)
94c55b4d09 Fixed typos/grammar mistakes (Martin Habovštiak)
1bf05523f0 Documented features (Martin Habovstiak)

Pull request description:

  This documents the Cargo features making sure docs.rs shows warning for
  feature-gated items. They are also explicitly spelled out in the crate
  documentation.

  The PR is similar in spirit to https://github.com/rust-bitcoin/rust-bitcoin/pull/633

ACKs for top commit:
  apoelstra:
    ACK 18f74d5242

Tree-SHA512: 8aac3fc5fd8ee887d6b13606d66b3d11ce44662afb92228c4f8da6169e3f70ac6a005b328f427a91d307f8d36d091dcf24bfe4d17dfc034d02b578258719a90a
2022-01-06 15:42:32 +00:00
Andrew Poelstra c50411f798 release secp256k1-sys 0.4.2; make new `ZERO` type publically accessible 2022-01-05 15:56:49 +00:00
Martin Habovstiak 1bf05523f0 Documented features
This documents the Cargo features making sure docs.rs shows warning for
feature-gated items. They are also explicitly spelled out in the crate
documentation.
2022-01-04 16:55:01 +01:00
Dr Maxim Orlovsky 455ee57ba4
Bump sys version to 0.4.1 2021-06-18 23:47:24 +02:00
Dr. Maxim Orlovsky 4652ab6116 Updating secp256k1 version to 1758a92ffd896af533b142707e9892ea6e15e5db 2021-06-14 17:55:38 +03:00
Andrew Poelstra e687622a81 bump secp-sys version; drop endomorphism flag 2020-12-29 17:15:56 +00:00
Andrew Poelstra a93d671d05 update libsecp to 98dac87839838b86094f1bccc71cc20e67b146cc 2020-12-29 17:15:51 +00:00
Andrew Poelstra 85075a654c replace `fuzztarget` Cargo feature with a rustc --cfg flag
It's super dangerous to use Cargo features for this, since they can be set
accidentally (or maliciously by any crate in a user's entire dep tree). Instead
we can just require users set `RUSTFLAGS` appropriately, which we can easily
do in our fuzzing scripts.
2020-12-22 15:42:02 +00:00
Andrew Poelstra d77483f00e replace cargo `external-symbols` feature with a rustc --cfg flag
This feature was not useful for Cargo users, since Cargo does not give you
the kind of fine-grained control over C library linkage that you need. So
it was just unnecessarily confusing and would cause the build to break if
you enabled it accidentally, say, with --all-features.
2020-12-22 15:35:16 +00:00
Elichai Turkel 7b99784837
Add AligneType and redo secp256k1_context_create with alloc 2020-12-18 12:48:16 +02:00
Tibo-lg 45a4459baf Update secp256k1-sys to add schnorr/extra-keys 2020-11-09 16:00:28 +09:00
Tibo-lg cfb565126a Update depend folder to latest master 2020-10-12 21:35:28 +09:00
Elichai Turkel 6511fad231
Sort Cargo.toml files 2020-08-27 22:58:00 +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 f19c6bbece bump secp-sys version to 0.2.0 2020-08-26 18:07:44 +00:00
Andrew Poelstra 1a9aece312 secp256k1-sys: update upstream to 670cdd3f8be25f81472b2d16dcd228b0d24a5c45 2020-08-26 18:07:41 +00:00
Andronik Ordian fd8b3ff572
secp256k1-sys: remove restriction on cc version 2020-03-14 20:46:26 +01:00
Elichai Turkel 6bcb510d9a
Bump secp256k1-sys to 0.1.2 2020-01-09 18:10:12 +02: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
Andrew Poelstra 72b9ec17fa remove some keywoards from secp-sys Cargo.toml 2019-12-10 19:48:29 +00:00
Steven Roose bf3fba71cb
Add external-symbols feature to support external libsecp
This feature disables using the bundles sources and will link into
existing libsecp256k1 symbols.
2019-11-27 21:04:32 +00:00
Steven Roose 724c49fff9
Add secp256k1-sys 2019-11-27 21:02:42 +00:00