Skip to content
This repository was archived by the owner on Feb 26, 2020. It is now read-only.

Update to upstream #32

Draft
wants to merge 317 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
317 commits
Select commit Hold shift + click to select a range
49ea989
Merge pull request #31 from romanz/master
apoelstra Jul 24, 2018
a9f479c
build.rs: change build flags to eliminate compiler warnings
apoelstra Jul 24, 2018
9b51ed3
Merge pull request #35 from rust-bitcoin/2018-07-secp-build-flags
apoelstra Jul 24, 2018
2aeff4c
fix typos
apoelstra Jul 24, 2018
bc773fb
add comments for Sync/Send impl
apoelstra Jul 24, 2018
c3ec027
remove `PublicKey::new()` and `PublicKey::is_valid()`
apoelstra Jul 24, 2018
1ad4afc
Merge pull request #36 from rust-bitcoin/2018-07-minor-fixes
apoelstra Jul 25, 2018
54ddbc7
Merge pull request #37 from rust-bitcoin/2018-07-public-key
apoelstra Jul 25, 2018
2478930
add feature-gated serde 1.0 support for Signature, SecretKey, PublicKey
apoelstra Jul 25, 2018
ad080da
Merge pull request #38 from rust-bitcoin/2018-08-serde
apoelstra Jul 25, 2018
9fe5150
bump version to 0.10.0; introduce CHANGELOG.md
apoelstra Jul 25, 2018
f6526c5
Merge pull request #39 from rust-bitcoin/2018-07-0.10.0
apoelstra Jul 26, 2018
6f27422
update gcc 0.3 to cc 1.0
apoelstra Jul 30, 2018
d4149be
update `rand` to 0.4
apoelstra Jul 30, 2018
fa670a0
Merge pull request #41 from rust-bitcoin/2018-07-updated-deps
apoelstra Jul 31, 2018
83c7b6d
add Debug impl to context object
apoelstra Aug 12, 2018
5c6dcf6
Fix typo
rex4539 Aug 15, 2018
0fe17f5
Merge pull request #48 from rex4539/typos
apoelstra Aug 15, 2018
17450e9
remove PublicKey::combine
apoelstra Aug 15, 2018
7d2474b
add Display impl for the key types which outputs their hex representa…
apoelstra Aug 15, 2018
93d8249
improve documentation
apoelstra Jul 31, 2018
7a5617d
Merge pull request #44 from rust-bitcoin/2018-07-docs
apoelstra Aug 20, 2018
1f73a78
Merge pull request #52 from rust-bitcoin/2018-08-display-keys
apoelstra Aug 20, 2018
3563c5f
Merge pull request #46 from rust-bitcoin/2018-08-context-debug
apoelstra Aug 20, 2018
2c18a16
Merge pull request #50 from rust-bitcoin/2018-08-no-combine
apoelstra Aug 21, 2018
5a27aba
switch to 64-bit compilation; add flag for 32-bit
apoelstra Jul 30, 2018
5cd4533
add warning if uint128_t detection fails
apoelstra Aug 21, 2018
aa05032
Merge pull request #42 from rust-bitcoin/2018-07-64bit
apoelstra Aug 22, 2018
c773dfb
remove unused import that was causing warning
apoelstra Aug 22, 2018
ce91fa0
bump version to 0.11
apoelstra Aug 22, 2018
15655e5
Merge pull request #55 from rust-bitcoin/2018-08-0.11
apoelstra Aug 22, 2018
0d41c23
Revert "remove PublicKey::combine"
apoelstra Aug 22, 2018
a810880
restore missing `mem` import in key.rs
apoelstra Aug 22, 2018
6f025a3
bump version to 0.11.1
apoelstra Aug 22, 2018
2f8855f
Merge pull request #56 from rust-bitcoin/2018-08-return-pubkey-combine
apoelstra Aug 22, 2018
3b86de9
Use correct flag on big endian machines.
mpapierski Aug 31, 2018
0fe06e9
Merge pull request #64 from mpapierski/63-big-endian
apoelstra Aug 31, 2018
d1e449a
attempt to fix docs.rs docs
apoelstra Sep 4, 2018
4298438
bump version to 0.11.2
apoelstra Sep 11, 2018
6354f08
Merge pull request #69 from rust-bitcoin/2018-09-0.11.2
apoelstra Sep 11, 2018
d41fc90
Merge pull request #66 from rust-bitcoin/2018-09-docs-fix
apoelstra Sep 14, 2018
f5e3e17
bump version to 0.11.3
apoelstra Sep 21, 2018
dc2cd97
Merge pull request #72 from rust-bitcoin/2018-09-0.11.3
apoelstra Oct 28, 2018
f528135
fix build.rs on Windows
apoelstra Aug 26, 2018
572adb2
add `FromStr` implementation for key types
apoelstra Aug 26, 2018
30aa3a0
add `fmt::Display` and `str::FromStr` impls for `Signature`
apoelstra Aug 26, 2018
68c838f
change `Debug` impl for `Signature` to use `Display`
apoelstra Oct 28, 2018
0b1640f
Merge pull request #61 from rust-bitcoin/2018-08-windows-fix
apoelstra Nov 4, 2018
724192e
Merge pull request #60 from rust-bitcoin/2018-08-fromstr
apoelstra Nov 4, 2018
4819c5a
bump version to 0.11.4
apoelstra Nov 4, 2018
ca08c4f
Merge pull request #77 from rust-bitcoin/2018-11-0.11.4
apoelstra Nov 6, 2018
4653100
update upstream libsecp256k1 to 314a61d72474aa29ff4afba8472553ad91d88e9d
apoelstra Nov 6, 2018
93abca5
remove `without_caps` and every function that used a cap-less context
apoelstra Nov 6, 2018
223eb41
remove context object from ECDH
apoelstra Nov 6, 2018
8986aa3
export `serde`, `rand` and `libc`; update version to 0.11.5
apoelstra Nov 7, 2018
ef9bd56
Merge pull request #80 from rust-bitcoin/2018-11-0.11.5
apoelstra Nov 9, 2018
4b88cfc
Merge pull request #78 from rust-bitcoin/2018-11-remove-without-caps
apoelstra Nov 10, 2018
7fbaf2f
remove unsafe ZERO_KEY and deprecated ONE
apoelstra Nov 6, 2018
8d23476
remove `ops::Index` impls for `Signature`
apoelstra Aug 24, 2018
f93b959
disallow Messages that are not valid secret keys to prevent mistakes …
apoelstra Aug 15, 2018
1f4a4c1
change add_*_assign and mul_*_assign to use a byteslice as a tweak, r…
apoelstra Aug 15, 2018
e5a02bd
add `ThirtyTwoByteHash` hash trait which can be implemented for easie…
apoelstra Aug 15, 2018
cc6d379
Merge pull request #51 from rust-bitcoin/2018-08-message
real-or-random Dec 3, 2018
b470f70
Merge pull request #57 from rust-bitcoin/2018-08-no-index
real-or-random Dec 3, 2018
0588597
bump version to 0.12
apoelstra Dec 3, 2018
56b5380
Merge pull request #83 from rust-bitcoin/2018-12-0.12
real-or-random Dec 3, 2018
bbbc637
Add window target to travis
real-or-random Dec 7, 2018
28c7881
Build C with debug information also on MSVC
real-or-random Dec 7, 2018
9a4961c
Disable travis build on rust 1.14 on windows
real-or-random Dec 7, 2018
a7b2302
Merge pull request #84 from rust-bitcoin/travis-multi-os
real-or-random Dec 7, 2018
34aadb7
Fix cc dep as the rust ecosystem is terrible
TheBlueMatt Dec 19, 2018
7d7085c
Merge pull request #85 from TheBlueMatt/2018-12-fuck-rust-ecosystem
TheBlueMatt Dec 19, 2018
9c45944
Remove dependency on libc
tomaka Dec 27, 2018
4f44a0f
Merge pull request #87 from tomaka/rm-libc
TheBlueMatt Dec 27, 2018
a74cbb6
Sync fuzztarget combine with tweak_add since real functions do that
TheBlueMatt Jan 8, 2019
fba7dfb
Fix cargo warning output and wrong pointer width (#88)
tomaka Jan 9, 2019
dee10b9
Merge pull request #89 from TheBlueMatt/master
TheBlueMatt Jan 9, 2019
dd8866c
bump version to 0.12.1
apoelstra Jan 15, 2019
0466b5e
Merge pull request #93 from rust-bitcoin/2019-0.12.1
apoelstra Jan 15, 2019
f90e9f3
Stop checking context flags for secp256k1_ecdh as its not required
TheBlueMatt Jan 16, 2019
a54f9b7
Merge pull request #94 from TheBlueMatt/master
TheBlueMatt Jan 17, 2019
432face
bump version to 0.12.2
apoelstra Jan 18, 2019
77619e8
Merge pull request #95 from rust-bitcoin/2019-01-0.12.2
apoelstra Jan 18, 2019
e9588d9
Test builds using cargo-web on Travis to ensure they dont break
TheBlueMatt Jan 24, 2019
75bc49b
Merge pull request #96 from TheBlueMatt/master
apoelstra Feb 25, 2019
bafef68
Bumps rand to 0.6.3 & associated updates
huitseeker Jan 11, 2019
e69eabb
Bumping minimum Rust version 1.14.0 -> 1.22.0, as per https://git.io/…
huitseeker Jan 30, 2019
a8a3afe
Fix clippy errors
huitseeker Feb 11, 2019
7234606
Merge pull request #92 from huitseeker/rand-update
apoelstra Feb 26, 2019
6eaacb1
Add raw context getter to Secp256k1 struct
jonasnick Mar 1, 2019
8b49635
Merge pull request #101 from jonasnick/export_raw_ctx
apoelstra Mar 4, 2019
11ce866
Replaced std with core, and made std::error::Error optional through f…
elichai Feb 18, 2019
ab8066e
Replaced the std::os::raw c types with types.rs
elichai Feb 18, 2019
6871567
Updated travis.yml to test no-std too
elichai Feb 18, 2019
e98975a
Added backwards support without the crate keyword
elichai Feb 18, 2019
2536c5a
Fix rand trait bounds.
Apr 16, 2019
91c43e7
Add as_mut_ptr to PublicKey
jonasnick Apr 16, 2019
733755d
Relax cc dependency requirements.
Mar 28, 2019
bf9b972
Merge pull request #103 from alekseysidorov/master
real-or-random Apr 27, 2019
312b9a5
Added Error::description copied c_void impl from core::ffi::c_void
elichai Feb 18, 2019
82565cb
Merge pull request #105 from jonasnick/pk_as_mut_ptr
apoelstra May 1, 2019
90faf43
Merge pull request #104 from alekseysidorov/fix_rand
apoelstra May 1, 2019
dfcf74f
Added a new struct for the DER serialized signature
elichai Apr 11, 2019
ab4320f
Merge pull request #100 from elichai/master
real-or-random May 10, 2019
3825ed3
Add human readable serialization and deserialization to Secret Key
jonasnick May 13, 2019
b843f72
Merge pull request #107 from jonasnick/human-readable-sk
apoelstra May 17, 2019
264b368
Move recovery to its own module
jonasnick May 20, 2019
c7eecd1
Feature gate recovery module
jonasnick May 20, 2019
16da1a8
Move recovery ffi into recovery module and feature gate C-secp recove…
jonasnick May 21, 2019
28934ab
Only display existing signature bytes
jonasnick May 21, 2019
ebf50df
Add human readable serialization to Signatures
jonasnick May 21, 2019
5a128df
Merge pull request #108 from jonasnick/recovery-feature
apoelstra May 21, 2019
0bf88fe
Merge pull request #109 from jonasnick/human-sigs
apoelstra May 21, 2019
ce7b039
Bump version to 0.13.0
jonasnick May 21, 2019
be457af
Removed ffi call from Display implementation
elichai May 21, 2019
5d9faf2
Merge pull request #111 from elichai/display
apoelstra May 21, 2019
2d41612
Merge pull request #110 from jonasnick/0.13
apoelstra May 21, 2019
0e6ff34
Fix imports when using recovery with fuzztarget feature
jonasnick May 21, 2019
3d60a18
Merge pull request #113 from jonasnick/fix-recovery-fuzz
apoelstra May 29, 2019
179f35e
Move libsecp USE_ENDOMORPHISM option behind non-default feature flag
jonasnick Jun 11, 2019
0fbc0f9
Merge pull request #120 from jonasnick/endomorphism-feature
real-or-random Jun 13, 2019
ce9efb0
Update libsecp256k1 upstream to 143dc6e9ee31852a60321b23eea407d2006171da
elichai May 28, 2019
0b770cf
Added ECMULT window size
elichai May 28, 2019
f7a4a7e
Added manual external callbacks that panics
elichai May 28, 2019
8022757
Added a c_char implementation
elichai Jun 12, 2019
68c5c5e
implemented strlen to deref the callback message
elichai Jun 13, 2019
d710e58
Merge pull request #115 from elichai/external-callbacks
apoelstra Jul 4, 2019
5f93474
Added the preallocated FFI
elichai May 28, 2019
b4b52a9
Moved the context specific traits/enums into a separate file with `st…
elichai Jul 4, 2019
1c0ae7d
Added structs and functions for manual allocation
elichai Jul 4, 2019
9186f02
Added preallocation size functions and added a test for the prealloca…
elichai Jul 4, 2019
811e8d2
Removed context_create/destroy/clone and scratch_create/destroy/clone…
elichai Jul 4, 2019
49f0cc1
Updated the fuzzing dummy functions
elichai Jul 4, 2019
96ca40f
Exposed generic functions to create the Context
elichai Jul 5, 2019
e1aac5e
Merge pull request #125 from elichai/manual-memory
apoelstra Jul 5, 2019
a92a630
bump version to 0.14.0
apoelstra Jul 8, 2019
2a32f8c
Merge pull request #127 from rust-bitcoin/2019-07-0.14
apoelstra Jul 8, 2019
d62c137
Add links manifest key to prevent cross-version linkage
jonasnick Jul 12, 2019
75784ec
Implemented context create/destroy in rust
elichai Jul 13, 2019
7356705
Added a test for create/destroy functions
elichai Jul 14, 2019
a4f6b27
Bump version to 0.14.1
elichai Jul 14, 2019
b732f24
Merge pull request #130 from elichai/symbols
apoelstra Jul 14, 2019
c13183b
Relax cc requirements more
elichai Jul 16, 2019
84345f2
Merge pull request #129 from jonasnick/add-links
real-or-random Jul 18, 2019
ccac3ea
Implement fmt::LowerHex for SecretKey and PublicKey
stevenroose Jul 23, 2019
0f25474
Implement hex human-readable serde for PublicKey
stevenroose Jul 23, 2019
789730e
Merge pull request #133 from stevenroose/hex-serde-pubkey
apoelstra Jul 24, 2019
cf6f95d
Merge pull request #131 from elichai/cc
jonasnick Jul 25, 2019
58e8200
bump version to 0.15.0
jonasnick Jul 25, 2019
de21642
Merge pull request #135 from jonasnick/bump-0.15
apoelstra Jul 26, 2019
e081a98
Propagating std to rand dependency
elichai Aug 1, 2019
9fd088c
Removed the fuzztarget feature from the docs
elichai Aug 1, 2019
d820988
Bump version to 0.15.1
elichai Aug 1, 2019
6f2cc95
Merge pull request #136 from elichai/2019-08-rand-std
jonasnick Aug 2, 2019
db244a1
Fix typos
practicalswift Aug 5, 2019
b005089
Merge pull request #137 from practicalswift/typos
apoelstra Aug 5, 2019
62b9f06
build.rs: Add feature 'lowmemory' to reduce memory usage
laanwj Aug 7, 2019
62e5178
Bump version to 0.15.2
laanwj Aug 8, 2019
288cc1e
Merge pull request #140 from laanwj/2019_08_lowmemory
apoelstra Aug 12, 2019
6e58c8b
Trying to optimize travis speeds
elichai Aug 12, 2019
16fc4ee
Fixed the counter Rng
elichai Jul 23, 2019
dfe7ee5
Merge pull request #148 from elichai/2019-08-travis
real-or-random Aug 13, 2019
389e1e2
Removing usage of `mem::uninitialized()` and deprecating the `blank()…
elichai Aug 8, 2019
8e701b7
Replacing usage of the unsafe `blank` function to the `new` function
elichai Aug 8, 2019
f75772b
Bump version to 0.15.3
elichai Aug 16, 2019
a055c3f
Merge pull request #146 from elichai/2018-08-unintialized
apoelstra Aug 19, 2019
255d1dd
Remove TODOs for ffi functions for setting secp256k1 callbacks
real-or-random Aug 8, 2019
5ea300a
Merge pull request #143 from rust-bitcoin/remove-callback-todos
real-or-random Aug 21, 2019
66ab70f
Added a C Ptr trait that returns a null pointer for ZSTs
elichai Aug 16, 2019
b7e20c5
Changed all as_*ptr() to the safer CPtr trait
elichai Aug 16, 2019
ddb8e4f
Explicit checks for empty slices
elichai Aug 8, 2019
d7461e4
Add zst tests and some other parsing tests
elichai Aug 21, 2019
eddfe03
Merge pull request #151 from elichai/2019-08-Cptr-null
apoelstra Aug 21, 2019
b59f4ff
Add a rand-std feature
elichai Aug 22, 2019
4e69dcc
Merge pull request #153 from elichai/2019-08-rand-std-feature
apoelstra Aug 22, 2019
07ef3a1
Pin version of build dependency cc to <1.0.42
stevenroose Sep 6, 2019
845bff2
Bump version to 0.15.4
stevenroose Sep 6, 2019
4bcb404
Merge #156: Pin version of build dependency cc to <1.0.42
jonasnick Sep 6, 2019
bbab1c2
Revert "Add a rand-std feature"
apoelstra Sep 9, 2019
0e5e314
Merge pull request #158 from rust-bitcoin/revert-153-2019-08-rand-std…
apoelstra Sep 9, 2019
0c901db
bump version to 0.15.5
apoelstra Sep 9, 2019
f5c8a00
Merge pull request #159 from rust-bitcoin/2019-09-0155
apoelstra Sep 9, 2019
5b10d1b
Fix bad ffi declarations
elichai Sep 14, 2019
06b2beb
Add a test for the types
elichai Sep 14, 2019
79a1847
Remove always debug mode
elichai Oct 1, 2019
8dfdb90
Merge pull request #166 from elichai/patch-1
apoelstra Oct 11, 2019
c3f5cce
Add a simple crate without std to test no_std feature
elichai Oct 24, 2019
c117114
Added no_std_tests to travis
elichai Oct 24, 2019
d0afb87
Test rand support in no std crate
elichai Oct 24, 2019
e5e22ee
Test serde support in no-std crate
elichai Oct 24, 2019
f09ff2a
Disable some useless lints
TheBlueMatt Oct 28, 2019
0db1646
Merge pull request #175 from TheBlueMatt/2019-10-useless-lints
apoelstra Oct 28, 2019
5ee0afb
Added an example for generating keys using OsRng
elichai Oct 28, 2019
e28f756
Added an example for signing and verification
elichai Oct 28, 2019
7e5916b
Aded an example for recoverable signatures and recovering the pubkey
elichai Oct 28, 2019
349b2ea
Add a 'dont_replace_c_symbols' feature for not replacing C's symbols …
elichai Oct 28, 2019
fe8ac1e
Add warnings to Cargo.toml features
elichai Oct 28, 2019
d900dcd
Merge pull request #177 from elichai/2019-10-csymbols
apoelstra Oct 29, 2019
2b50e02
Add a rand-std feature
elichai Aug 22, 2019
56753b1
Bump version to 0.16
elichai Oct 28, 2019
49391d6
DOC: Added documentation to no-std test
elichai Nov 3, 2019
405a2ad
Merge pull request #176 from elichai/2019-08-rand-std-feature
apoelstra Nov 5, 2019
c883a98
Merge pull request #173 from elichai/2019-10-no-std-tests
apoelstra Nov 5, 2019
5de62f8
Merge pull request #174 from elichai/2019-10-examples
apoelstra Nov 5, 2019
a4ccab7
Libraries.
rodoufu Nov 18, 2019
825493b
Small code improvements.
rodoufu Nov 18, 2019
97f74c2
Libraries versions
rodoufu Nov 20, 2019
1b0c573
Remove trailing whitespace
nijynot Nov 20, 2019
30ea7f8
Merge #183: Remove trailing whitespace
jonasnick Nov 21, 2019
47b2555
Merge pull request #182 from rodoufu/code_imp
apoelstra Nov 22, 2019
fe688ad
Make the Context trait unimplementable
elichai Nov 27, 2019
9522f7e
Make Context::deallocate unsafe fn
elichai Nov 27, 2019
1e711f1
Merge pull request #184 from elichai/2019-11-context
apoelstra Nov 27, 2019
cf22f60
Merge pull request #162 from elichai/2019-09-ffi
apoelstra Nov 27, 2019
5f8096e
Add functions to create from raw context
elichai Nov 6, 2019
9523e09
Add tests for raw context
elichai Nov 6, 2019
02f6617
Merge pull request #179 from elichai/2019-11-raw-context
apoelstra Nov 27, 2019
9bd0882
Add forgotten mention of upstream update
stevenroose Oct 21, 2019
724c49f
Add secp256k1-sys
stevenroose Oct 21, 2019
80e1935
Add secp256k1-sys README and LICENSE files
stevenroose Oct 29, 2019
55fab77
Add vendor script to prefix secp256k1 sources
stevenroose Oct 21, 2019
bf3fba7
Add external-symbols feature to support external libsecp
stevenroose Oct 29, 2019
18c511f
Bump version to v0.17.0
stevenroose Nov 13, 2019
e3aaf00
Merge pull request #169 from stevenroose/sys
apoelstra Dec 5, 2019
9759cb0
Replace SharedSecret with a more generic alternative
elichai Nov 9, 2019
af8fa21
Add 'new_with_hash' function to SharedSecret
elichai Nov 9, 2019
f804282
Add tests for the new SharedSecret::new_with_hash() function
elichai Nov 9, 2019
d2c4e5a
Wrap Secp256k1 from raw context in a ManuallyDrop
elichai Dec 5, 2019
ca8ea92
Fixed secp256k1_ecdh fuzztarget
elichai Nov 10, 2019
124c1f3
feature gate new_with_hash with std only, added catch_unwind
elichai Nov 10, 2019
e7f0974
Merge pull request #186 from elichai/2019-12-manualdrop
apoelstra Dec 6, 2019
5619f2a
Add an unsafe variant of new_with_has called new_with_hash_no_panic
elichai Nov 27, 2019
92c42ca
Add ECDH to the no-std tests
elichai Nov 27, 2019
4b74091
Merge pull request #180 from elichai/2019-11-SharedSecret
apoelstra Dec 9, 2019
9170dec
Update changelog for v0.17.0
stevenroose Dec 5, 2019
f92261b
Merge pull request #185 from stevenroose/v0.17.0-changelog
apoelstra Dec 10, 2019
72b9ec1
remove some keywoards from secp-sys Cargo.toml
apoelstra Dec 10, 2019
ff6e944
Merge pull request #187 from rust-bitcoin/2019-12-keyword-reduce
apoelstra Dec 10, 2019
b5b5069
Add SecretKey.inv_assign and the backing C-code (WIP)
dvdplm Dec 10, 2019
52bbd17
Cleanup and resolve todos
dvdplm Dec 11, 2019
65fe733
Update Cargo.toml link in vendor script
stevenroose Dec 11, 2019
987d556
Bump secp256k1-sys to v0.1.1
stevenroose Dec 11, 2019
ebc660b
Bump to v0.17.1
stevenroose Dec 11, 2019
80c856c
Merge pull request #189 from stevenroose/fix-links
apoelstra Dec 11, 2019
89271c9
Fix fuzztarget symbols
elichai Jan 9, 2020
8f52bac
Bump version to 0.17.2
elichai Jan 9, 2020
5c82bb4
Merge pull request #191 from elichai/2020-01-fuzztarget
apoelstra Jan 9, 2020
0f486dc
Merge tag '0.17.2' into dp/chore/update-to-upstream
dvdplm Jan 14, 2020
3e771be
Update to 0.17.2
dvdplm Jan 14, 2020
f140fad
relax version constraint on `cc`
dvdplm Jan 17, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
target/
Cargo.lock

#IntelliJ project files
.idea
*.iml

CMakeLists.txt
cmake-build-debug
66 changes: 48 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,53 @@
language: rust
sudo: false
cache:
directories:
- cargo_web

matrix:
include:
- rust: stable
- rust: beta
- rust: nightly
rust:
- stable
- beta
- nightly
- 1.22.0
os:
- linux
- windows

install:
- |
pip install 'travis-cargo<0.2' --user &&
export PATH=$HOME/.local/bin:$PATH
addons:
chrome: stable

script:
- |
travis-cargo build &&
travis-cargo build -- --release &&
travis-cargo test &&
travis-cargo test -- --release &&
travis-cargo bench &&
travis-cargo --only stable doc
matrix:
exclude:
- rust: 1.22.0
os: windows

script:
- cargo build --verbose --no-default-features
- cargo build --verbose --no-default-features --features="serde"
- cargo build --verbose --no-default-features --features="lowmemory"
- cargo build --verbose --no-default-features --features="rand"
- cargo build --verbose --no-default-features --features="rand serde recovery endomorphism"
- cargo build --verbose --no-default-features --features="fuzztarget recovery"
- cargo build --verbose --features=rand
- cargo test --no-run --features=fuzztarget
- cargo test --verbose --features=rand
- cargo test --verbose --features="rand rand-std"
- cargo test --verbose --features="rand serde"
- cargo test --verbose --features="rand serde recovery endomorphism"
- cargo build --verbose
- cargo test --verbose
- cargo build --verbose --release
- cargo test --verbose --release
- cargo run --example sign_verify
- cargo run --example sign_verify_recovery --features=recovery
- cargo run --example generate_keys --features=rand
- if [ ${TRAVIS_RUST_VERSION} == "stable" ]; then cargo doc --verbose --features="rand,serde,recovery,endomorphism"; fi
- if [ ${TRAVIS_RUST_VERSION} == "nightly" ]; then cargo test --verbose --benches --features=unstable; fi
- if [ ${TRAVIS_RUST_VERSION} == "nightly" -a "$TRAVIS_OS_NAME" = "linux" ]; then
cd no_std_test &&
cargo run --release | grep -q "Verified Successfully";
fi
- if [ ${TRAVIS_RUST_VERSION} == "stable" -a "$TRAVIS_OS_NAME" = "linux" ]; then
CARGO_TARGET_DIR=cargo_web cargo install --verbose --force cargo-web &&
cargo web build --verbose --target=asmjs-unknown-emscripten &&
cargo web test --verbose --target=asmjs-unknown-emscripten;
fi
118 changes: 118 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@

# 0.17.2
- Fix linking in the `fuzztarget` feature.

# 0.17.1

- Correctly prefix the secp256k1-sys links field in Cargo.toml.

# 0.17.0

- Move FFI into secp256k1-sys crate.
- Add `external-symbols` feature for not building upstream.
- Add functions to create a context from a raw pointer.
- Support passing custom hash functions to ECDH.
- Wrap Secp256k1 from raw context in a ManuallyDrop.

# 0.15.4 - 2019-09-06

- Add `rand-std` feature.
- Pin the cc build-dep version to `< 1.0.42` to remain
compatible with rustc 1.22.0.
- Changed all `as_*ptr()` to a new safer `CPtr` trait

# 0.15.2 - 2019-08-08

- Add feature `lowmemory` that reduces the EC mult window size to require
significantly less memory for the validation context (~680B instead of
~520kB), at the cost of slower validation. It does not affect the speed of
signing, nor the size of the signing context.

# 0.15.0 - 2019-07-25

* Implement hex human-readable serde for PublicKey
* Implement fmt::LowerHex for SecretKey and PublicKey
* Relax `cc` dependency requirements
* Add links manifest key to prevent cross-version linkage

# 0.14.1 - 2019-07-14

* Implemented FFI functions: `secp256k1_context_create` and `secp256k1_context_destroy` in rust.

# 0.14.0 - 2019-07-08

* [Feature-gate endormorphism optimization](https://github.com/rust-bitcoin/rust-secp256k1/pull/120)
because of a lack of clarity with respect to patents
* Got full no-std support including eliminating all use of libc in C bindings.
[PR 1](https://github.com/rust-bitcoin/rust-secp256k1/pull/115)
[PR 2](https://github.com/rust-bitcoin/rust-secp256k1/pull/125).
This library should be usable in bare-metal environments and with rust-wasm.
Thanks to Elichai Turkel for driving this forward!
* Update upstream libsecp256k1 version to 143dc6e9ee31852a60321b23eea407d2006171da

# 0.13.0 - 2019-05-21

* Update minimum supported rust compiler 1.22.
* Replace `serialize_der` function with `SerializedSignature` struct.
* Allow building without a standard library (`no_std`). `std` feature is on by default.
* Add human readable serialization to `Signatures` and `SecretKeys`.
* Stop displaying 0 bytes if a `Signature` is less than 72 bytes.
* Only compile recovery module if feature `recovery` is set (non-default).
* Update `rand` dependency from 0.4 to 0.6 and add `rand_core` 0.4 dependency.
* Relax `cc` dependency requirements.

# 0.12.2 - 2019-01-18

* Fuzzer bug fix

# 0.12.1 - 2019-01-15

* Minor bug fixes
* Fixed `cc` crate version to maintain minimum compiler version without breakage
* Removed `libc` dependency as it our uses have been subsumed into stdlib

# 0.12.0 - 2018-12-03

* **Overhaul API to remove context object when no precomputation is needed**
* Add `ThirtyTwoByteHash` trait which allows infallible conversions to `Message`s
* Disallow 0-valued `Message` objects since signatures on them are forgeable for all keys
* Remove `ops::Index` implementations for `Signature`
* Remove depecated constants and unsafe `ZERO_KEY` constant

# 0.11.5 - 2018-11-09

* Use `pub extern crate` to export dependencies whose types are exported

# 0.11.4 - 2018-11-04

* Add `FromStr` and `Display` for `Signature` and both key types
* Fix `build.rs` for Windows and rustfmt configuration for docs.rs
* Correct endianness issue for `Signature` `Debug` output

# 0.11.3 - 2018-10-28

* No changes, just fixed docs.rs configuration

# 0.11.2 - 2018-09-11

* Correct endianness issue in RFC6979 nonce generation

# 0.11.1 - 2018-08-22

* Put `PublicKey::combine` back because it is currently needed to implement Lightning BOLT 3

# 0.11.0 - 2018-08-22

* Update `rand` to 0.4 and `gcc` 0.3 to `cc` 1.0. (`rand` 0.5 exists but has a lot of breaking changes and no longer compiles with 1.14.0.)
* Remove `PublicKey::combine` from API since it cannot be used with anything else in the API
* Detect whether 64-bit compilation is possible, and do it if we can (big performance improvement)

# 0.10.0 - 2018-07-25

* A [complete API overhaul](https://github.com/rust-bitcoin/rust-secp256k1/pull/27) to move many runtime errors into compiletime errors
* Update [libsecp256k1 to `1e6f1f5ad5e7f1e3ef79313ec02023902bf8`](https://github.com/rust-bitcoin/rust-secp256k1/pull/32). Should be no visible changes.
* [Remove `PublicKey::new()` and `PublicKey::is_valid()`](https://github.com/rust-bitcoin/rust-secp256k1/pull/37) since `new` was unsafe and it should now be impossible to create invalid `PublicKey` objects through the API
* [Reintroduce serde support](https://github.com/rust-bitcoin/rust-secp256k1/pull/38) behind a feature gate using serde 1.0
* Clean up build process and various typos


64 changes: 48 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,36 +1,68 @@
[package]

name = "secp256k1"
version = "0.5.4"
version = "0.17.2"
authors = [ "Dawid Ciężarkiewicz <[email protected]>",
"Andrew Poelstra <[email protected]>" ]
license = "CC0-1.0"
homepage = "https://github.com/apoelstra/rust-secp256k1/"
repository = "https://github.com/apoelstra/rust-secp256k1/"
documentation = "https://www.wpsoftware.net/rustdoc/secp256k1/"
homepage = "https://github.com/rust-bitcoin/rust-secp256k1/"
repository = "https://github.com/rust-bitcoin/rust-secp256k1/"
documentation = "https://docs.rs/secp256k1/"
description = "Rust bindings for Pieter Wuille's `libsecp256k1` library. Implements ECDSA for the SECG elliptic curve group secp256k1 and related utilities."
keywords = [ "crypto", "ECDSA", "secp256k1", "libsecp256k1", "bitcoin" ]
readme = "README.md"
autoexamples = false # Remove when edition 2018 https://github.com/rust-lang/cargo/issues/5330

build = "build.rs"
[build-dependencies]
gcc = "0.3"
# Should make docs.rs show all functions, even those behind non-default features
[package.metadata.docs.rs]
features = [ "rand", "rand-std", "serde", "recovery", "endomorphism" ]

[lib]
name = "secp256k1"
path = "src/lib.rs"

[features]
unstable = []
default = []
dev = ["clippy"]
default = ["std"]
std = ["secp256k1-sys/std"]
rand-std = ["rand/std"]
recovery = ["secp256k1-sys/recovery"]
endomorphism = ["secp256k1-sys/endomorphism"]
lowmemory = ["secp256k1-sys/lowmemory"]

# Use this feature to not compile the bundled libsecp256k1 C symbols,
# but use external ones. Use this only if you know what you are doing!
external-symbols = ["secp256k1-sys/external-symbols"]

# Do not use this feature! HAZMAT. (meant for Fuzzing only. this is *BROKEN CRYPTOGRAPHY*)
fuzztarget = ["secp256k1-sys/fuzztarget"]

[dependencies]
arrayvec = "0.3"
clippy = {version = "0.0", optional = true}
rand = "0.3"
libc = "0.1"
rustc-serialize = "0.3"
serde = "0.6"
serde_json = "0.6"
secp256k1-sys = { version = "0.1.1", default-features = false, path = "./secp256k1-sys" }

[dev-dependencies]
rand = "0.6"
rand_core = "0.4"
serde_test = "1.0"
bitcoin_hashes = "0.7"

[dependencies.rand]
version = "0.6"
optional = true
default-features = false

[dependencies.serde]
version = "1.0"
optional = true
default-features = false

[[example]]
name = "sign_verify_recovery"
required-features = ["recovery"]

[[example]]
name = "sign_verify"

[[example]]
name = "generate_keys"
required-features = ["rand"]
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
[![Build Status](https://travis-ci.org/apoelstra/rust-secp256k1.png?branch=master)](https://travis-ci.org/apoelstra/rust-secp256k1)
[![Build Status](https://travis-ci.org/rust-bitcoin/rust-secp256k1.png?branch=master)](https://travis-ci.org/rust-bitcoin/rust-secp256k1)

[Full documentation](https://docs.rs/secp256k1/)

### rust-secp256k1

`rust-secp256k1` is a wrapper around ![libsecp256k1](https://github.com/bitcoin/secp256k1),
a C library by Peter Wuille for producing ECDSA signatures using the SECG curve
`rust-secp256k1` is a wrapper around ![libsecp256k1](https://github.com/bitcoin-core/secp256k1),
a C library by Pieter Wuille for producing ECDSA signatures using the SECG curve
`secp256k1`. This library
* exposes type-safe Rust bindings for all `libsecp256k1` functions
* implements key generation
* implements deterministic nonce generation via RFC6979
* implements many unit tests, adding to those already present in `libsecp256k1`
* makes no allocations (except in unit tests) for efficiency and use in freestanding implementations

[Full documentation](https://www.wpsoftware.net/rustdoc/secp256k1/)
### Contributing

Contributions to this library are welcome. A few guidelines:

* Any breaking changes must have an accompanied entry in CHANGELOG.md
* No new dependencies, please.
* No crypto should be implemented in Rust, with the possible exception of hash functions. Cryptographic contributions should be directed upstream to libsecp256k1.
* This library should always compile with any combination of features on **Rust 1.22**.
50 changes: 0 additions & 50 deletions build.rs

This file was deleted.

Loading