Commit Graph

26 Commits

Author SHA1 Message Date
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 6d4f64f901 fix potential unsafety bug for non-u8 types in macros
We don't have any non-u8 newtypes but better safe than sorry. See
https://github.com/apoelstra/rust-bitcoin/pull/45/
2018-02-14 16:25:45 +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
Tim Ruffing e71ed3b6d2 Implement serde traits for Signature 2017-07-21 23:58:19 +02:00
Tim Ruffing 76d160344b Update serde to 1.0 2017-07-21 22:15:00 +02:00
Andrew Poelstra 2df3c0b37c Minor changes for problems `cargo clippy` found 2015-10-28 07:48:28 -05:00
Andrew Poelstra 2748dae7eb Remove `hex_slice` macro as it was never used 2015-09-21 08:30:06 -05:00
Andrew Poelstra cc68cf8b9e Update serde dep to 0.6 from 0.3 2015-09-20 13:29:09 -05:00
Andrew Poelstra 77f6b6bf21 [API BREAK] Update for new libsecp256k1 API 2015-07-28 11:05:13 -05:00
Andrew Poelstra 96e1844c25 Change inline assertions to debug_asserts
All of these were things that are (should be) guaranteed true no matter
what input is given to the API, barring unsafe operations on the data.
2015-04-11 13:07:43 -05:00
Andrew Poelstra ac61baf040 Add support for serde (de)serialization; add unit tests 2015-04-10 00:32:12 -05:00
Andrew Poelstra f6585616b1 Add `Display` impl to `Error`; cleanup `Result` mess 2015-04-05 20:27:43 -05:00
Andrew Poelstra 5b3858e0ce Simplify Index implementations 2015-04-05 12:16:56 -05:00
Andrew Poelstra e2daaf875d Update for language changes (rustc beta is out !!) 2015-04-04 12:20:38 -05:00
Andrew Poelstra d858d7f7e6 Slicing fixes 2015-03-25 20:36:57 -05:00
Andrew Poelstra 825e77519f for in range(a,b) -> for in a..b 2015-03-25 14:42:05 -05:00
Andrew Poelstra d0519f0b3a IoResult -> io::Result, copy_nonoverlapping_memory -> copy_nonoverlapping 2015-03-25 14:10:02 -05:00
Andrew Poelstra d495d9ca06 Update for rustc changes
We can compile now, but not link -- there have been too many changes
in libsecp256k1 behind the scenes. Next commit :)
2015-01-17 10:13:45 -06:00
Andrew Poelstra 9cab4e023d Revert "Overhaul interface to use zero-on-free SecretKeys"
This reverts commit 9889090784.

This is not ready for primetime -- the move prevention also prevents
reborrowing, which makes secret keys nearly unusable.
2014-09-12 08:28:35 -05:00
Andrew Poelstra 9889090784 Overhaul interface to use zero-on-free SecretKeys
Using the `secretdata` library, we can store SecretKeys in such a way
that they cannot be moved or copied, and their memory is zeroed out on
drop. This gives us some assurance that in the case of memory unsafety,
there is not secret key data lying around anywhere that we don't expect.

Unfortunately, it means that we cannot construct secret keys and then
return them, which forces the interface to change a fair bit. I removed
the `generate_keypair` function from Secp256k1, then `generate_nonce`
for symmetry, then dropped the `Secp256k1` struct entirely because it
turned out that none of the remaining functions used the `self` param.

So here we are. I bumped the version number. Sorry about this.
2014-09-12 08:28:26 -05:00
Andrew Poelstra eabe57e403 Also make PublicKey encodable 2014-09-04 20:21:09 -05:00
Andrew Poelstra 71312b032a Impl encodable/decodable for the array newtypes 2014-09-04 20:09:18 -05:00
Andrew Poelstra 17daebf15d Implement deterministic nonce generation with HMAC-SHA512
Testing was done against python-ecdsa; python code in the test case
comments.
2014-09-04 16:21:35 -05:00
Andrew Poelstra a0f11d0f92 Travis speaks rust now :D 2014-08-27 10:58:24 -07:00