Commit Graph

27 Commits

Author SHA1 Message Date
Tobin C. Harding 33747bb16f
Rename KeyPair to Keypair
We use "keypair" in identifiers (local vars and function names) but
`KeyPair` - one of them is wrong.

Elect to follow upstream and define keypair as a single word i.e., use
`Keypair` for type name and `keypair` in identifiers.

This patch can be reproduced mechanically by doing two
search-and-replace operations on all files excluding the CHANGELOG

- Replace "KeyPair" with "Keypair"
- Replace "key_pair" with "keypair"
2023-08-19 08:35:47 +10:00
Tobin C. Harding 47aa740c74
Improve the README files
Improve the secp256k1 readme by:

- Use a top level markdown header (level 1)
- Add a link to the SECG's website (www.secg.org)
- Add a link for `secp256k1` to bitcoin.it explaining the curve

Improve the secp256k1-sys readme by:

- Mirror secp256k1 readme badges, heading, docs link
- Basic cleanup
 - Use 100 column width
 - Use backticks
 - Use capitals
2023-05-16 08:49:03 +10:00
Andrew Poelstra 9bdab89562
change --cfg=fuzzing to --cfg=secp256k1_fuzz 2023-05-01 16:11:44 +00:00
Tobin C. Harding ee83c3a4f9
Bump MSRV to 1.48
We are upgrading the MSRV across the whole Rust Bitcoin ecosystem.

Update the README, clippy config file, and CI to use the new MSRV.
Changes to use the new MSRV will be done later.

Add mention of MSRV to `secp256k1-sys`, add unreleased section to both
changelogs.
2023-03-31 09:43:50 +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 a431edb86a Create configuration conditional bench
As we did in rust-bitcoin [0] create a configuration conditional `bench`
that we can use to guard bench mark code. This has the benefit of
making our features additive i.e., we can now test with `--all-features`
with a stable toolchain (currently this fails because of our use of the
`test` crate).

[0] - https://github.com/rust-bitcoin/rust-bitcoin/pull/1092
2022-07-14 09:35:23 +10:00
Tobin C. Harding ddc108c117 Increase heading size
Currently the main heading of the readme uses a level three markdown
heading, this is quite small. Use level two instead.
2022-07-13 14:34:16 +10:00
Tobin C. Harding 65186e732a Add githooks
Add `githooks` directory and:

- Copy the default pre-commit hook into new githooks directory
- Add a call to clippy to the pre-commit hook
- Add a section to the README instructing devs how to use the new
  githooks
2022-06-17 10:17:21 +10:00
Elichai Turkel 67c0922a46
Update MSRV in CI and Readme from 1.29 to 1.41 2022-05-06 12:19:17 +03:00
Andrew Poelstra 65ff814a39 rename `rust_secp_fuzz` to `fuzzing` 2021-01-11 19:14:42 +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
Justin Moon 6b41326f9f Fix link in README 2020-11-25 16:41:22 -06:00
Tim Ruffing 0a698b72ab
readme: Replace all mentions of Rust 1.22 by 1.29
Follow up on #231.
2020-09-21 16:09:33 +02: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
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
François Garillot e69eabb36f
Bumping minimum Rust version 1.14.0 -> 1.22.0, as per https://git.io/fhDLO 2019-02-25 20:09:44 -08:00
Andrew Poelstra 9fe5150480 bump version to 0.10.0; introduce CHANGELOG.md 2018-07-25 23:49:48 +00:00
Andrew Poelstra 2aeff4c62f fix typos 2018-07-24 21:16:52 +00:00
Matt Corallo 758380991a Bump major version 2018-03-21 18:05:04 -04:00
Matt Corallo 6a9f8ba375 Fix README links 2018-03-18 14:45:38 -04:00
Andrew Poelstra c03d5ab819 Change documentation link, increment version so I can republish 2018-02-25 22:51:16 +00:00
Andrew Poelstra 2b64b0a210 Fix documentation link in README; github interprets it as an image then breaks the URL 2015-04-16 14:09:25 -05:00
Andrew Poelstra ff29303da1 Add Travis build status to README 2015-04-05 12:37:49 -05:00
Andrew Poelstra c3786888d7 Make note about non-allocations 2015-04-05 11:45:40 -05:00
Andrew Poelstra 15e552b190 Add link to full docs to README 2015-04-04 15:51:06 -05:00
Andrew Poelstra ec5d5e4ca9 Add README 2015-04-04 12:30:07 -05:00