Elichai Turkel
c69d43d84e
Update key.rs to use the new seckey functions
2020-08-26 21:16:19 +00: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
d45f709cd4
Add negation support
2020-06-09 10:05:07 +09:00
Rodolfo Araujo
a4ccab7431
Libraries.
2019-11-17 22:04:11 -03:00
Elichai Turkel
d7461e4cdc
Add zst tests and some other parsing tests
2019-08-21 18:06:02 -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
389e1e2449
Removing usage of `mem::uninitialized()` and deprecating the `blank()` functions
...
Signed-off-by: Elichai Turkel <elichai.turkel@gmail.com>
2019-08-16 14:15:27 -04:00
Steven Roose
0f25474805
Implement hex human-readable serde for PublicKey
2019-07-23 17:50:56 +02:00
Steven Roose
ccac3ead25
Implement fmt::LowerHex for SecretKey and PublicKey
2019-07-23 17:50:54 +02:00
Jonas Nick
3825ed35a7
Add human readable serialization and deserialization to Secret Key
2019-05-14 11:15:18 +00:00
Tim Ruffing
ab4320f8cc
Merge pull request #100 from elichai/master
...
Add no-std support
2019-05-10 23:32:52 +02:00
Andrew Poelstra
90faf434c9
Merge pull request #104 from alekseysidorov/fix_rand
...
Fix `Rand` trait bounds.
2019-05-01 01:47:43 +00:00
Jonas Nick
91c43e7320
Add as_mut_ptr to PublicKey
2019-04-16 18:48:24 +00:00
Aleksei Sidorov
2536c5a3c4
Fix rand trait bounds.
2019-04-16 16:35:33 +03:00
Elichai Turkel
11ce86681f
Replaced std with core, and made std::error::Error optional through feature
2019-04-14 12:09:36 +03:00
François Garillot
bafef68c56
Bumps rand to 0.6.3 & associated updates
2019-02-25 20:09:43 -08:00
Pierre Krieger
9c45944a5f
Remove dependency on libc
2018-12-27 14:39:54 +01:00
Tim Ruffing
b470f70e90
Merge pull request #57 from rust-bitcoin/2018-08-no-index
...
remove `ops::Index` impls for `Signature`
2018-12-03 14:27:08 +01:00
Andrew Poelstra
1f4a4c11a3
change add_*_assign and mul_*_assign to use a byteslice as a tweak, rather than a `SecretKey`
...
This makes more conceptual sense and does not add any new error paths, since even
valid `SecretKey`s were able to be invalid tweaks.
2018-11-10 13:08:18 +00:00
Andrew Poelstra
7fbaf2f91b
remove unsafe ZERO_KEY and deprecated ONE
2018-11-10 12:56:19 +00:00
Andrew Poelstra
93abca5896
remove `without_caps` and every function that used a cap-less context
2018-11-06 22:16:24 +00:00
Andrew Poelstra
572adb2873
add `FromStr` implementation for key types
2018-11-03 15:52:03 +00:00
Andrew Poelstra
a810880c54
restore missing `mem` import in key.rs
2018-08-22 20:43:20 +00:00
Andrew Poelstra
0d41c23c21
Revert "remove PublicKey::combine"
...
This reverts commit 17450e91fd
.
2018-08-22 20:18:25 +00:00
Andrew Poelstra
c773dfbc8d
remove unused import that was causing warning
2018-08-22 16:40:05 +00:00
Andrew Poelstra
2c18a16858
Merge pull request #50 from rust-bitcoin/2018-08-no-combine
...
remove PublicKey::combine
2018-08-21 18:36:27 +00:00
Andrew Poelstra
1f73a784cb
Merge pull request #52 from rust-bitcoin/2018-08-display-keys
...
add Display impl for the key types which outputs their hex representation
2018-08-20 18:32:53 +00:00
Andrew Poelstra
93d8249028
improve documentation
2018-08-20 17:56:46 +00:00
Andrew Poelstra
7d2474b10a
add Display impl for the key types which outputs their hex representation
...
Since making PublicKey::serialize return a fixed-size array, this no longer
requires any allocation, so there's no reason not to have it.
2018-08-15 20:40:15 +00:00
Andrew Poelstra
17450e91fd
remove PublicKey::combine
2018-08-15 16:29:23 +00:00
Andrew Poelstra
2478930ec1
add feature-gated serde 1.0 support for Signature, SecretKey, PublicKey
2018-07-25 14:44:51 +00:00
Andrew Poelstra
c3ec027925
remove `PublicKey::new()` and `PublicKey::is_valid()`
2018-07-24 21:24:19 +00:00
Thomas Eizinger
f13cdfa8a4
Replace Result return type with actual value
...
This introduces the actual breaking API change.
2018-06-08 08:48:02 +08:00
Thomas Eizinger
be7134c7f4
Cleanup obsolete code
...
Remove ContextFlag enum
Remove InvalidContext error-enum variant
Remove unused imports
2018-06-08 08:41:30 +08:00
Thomas Eizinger
bb77741e47
Fix unit tests and benchmarks
...
The new API allows us to remove a bunch of tests which are now checked
by the compiler.
2018-06-08 08:38:06 +08:00
Thomas Eizinger
f1a88259fb
Introduce generic-based capability handling
...
Add type parameter to Secp256k1
Add PhantomData for C
Separate into structs and traits
Move constructors to own impl blocks
2018-06-06 12:58:29 +08:00
Aleksey Sidorov
113fe420b9
Add tests to detect regressions.
2018-05-31 13:05:43 +03:00
Aleksey Sidorov
b192157ab4
Implement Ord for arrays
2018-05-22 12:33:11 +03:00
Matt Corallo
e1878c4522
Remove all serde/rustc-serialize stuff
2018-03-21 18:01:33 -04:00
Andrew Poelstra
2c5f45e165
expose 2-key version of PublicKey::combine
2017-12-21 01:04:07 +00:00
Andrew Poelstra
5c54698bf9
make `serde` optional
2017-12-19 22:40:06 +00:00
Andrew Poelstra
12e9f4b90b
make `rustc-serialize` crate optional
2017-12-19 22:36:30 +00:00
Andrew Poelstra
298929600b
make `rand` crate optional
2017-12-19 22:36:27 +00:00
Andrew Poelstra
dba0d67912
remove arrayvec dependency; rename PublicKey::serialize_vec
2017-12-19 20:36:46 +00:00
Tim Ruffing
e71ed3b6d2
Implement serde traits for Signature
2017-07-21 23:58:19 +02:00
Tim Ruffing
b1d8b09f25
Add tests for trailing bytes during deserilization
2017-07-21 22:21:37 +02:00
Tim Ruffing
76d160344b
Update serde to 1.0
2017-07-21 22:15:00 +02:00