Commit Graph

60 Commits

Author SHA1 Message Date
Adam Cigánek a7fbfa4522
replace failure (which is deprecated) with thiserror (#105) (#106) 2020-12-16 10:47:40 +01:00
Andreas Fackler 7709462f2d
Version 0.4.0 (#102) 2020-07-28 19:33:31 +02:00
Andreas Fackler 8ec1e20fa3
Make SecretKeySet cloneable. Rust 1.42.0. (#101) 2020-03-20 10:34:17 +01:00
Weiliang Li d18269ebca
upgrade pairing (#93)
* [wip] upgrade pairing

* fix non mock

* fix mock

* derive Clone for SecretKey

* fix bench and derive Clone for poly

* sort Cargo.toml

* fix Rng

* Update mod.rs

* Update lib.rs

* update

* update dep

* update dep

* bump dep

* bump dep

* fix test
2020-03-18 12:13:39 +01:00
Andreas Fackler 16a3bb650c Make `reveal` print the secret key, not the public one.
That's what the method documentation says. It explicitly warns that it
reveals the secret key, unlike the Debug implementation.
2019-12-20 19:43:40 +01:00
Weiliang Li 624eeee7e4 fix codec build error under feature std (#92) 2019-11-11 10:55:14 +01:00
Weiliang Li 036b720b7f Clean up and add parity codec support (#91)
* clean Cargo.toml and add parity codec support

* upgrade parity codec

* fix travis

* make clippy happy

* use zeroize instead of memsec

* fix zeroize and add test

* Update .travis.yml

* improve codec support

* fix

* add TODO for removing clear_fr
2019-11-08 10:53:40 +01:00
Andreas Fackler 48c7b7bd40 Hide DecryptionShare contents in Debug output. 2019-08-27 13:08:15 +02:00
Sebastian Geisler a40c770abb Implement common traits for SerdeSecret
Implement Debug, Eq, PartialEq and Clone for SerdeSecret if they
are implemented for the inner type.
2019-06-27 21:17:59 +02:00
Nikita Baksalyar 594bfdaa30 Implement Copy trait for PublicKeyShare 2019-06-18 08:33:51 +02:00
Andreas Fackler e0785f465c Update to Rust 1.35.0. (#83) 2019-06-06 11:05:48 +01:00
Fraser Hutchison 4ef9496776 Fix some documentation issues. 2019-06-05 22:27:01 +02:00
Peter van Nostrand 295e42954a Removed 'lazy_static' dependency. 2019-04-11 10:57:53 +02:00
Vladimir Komendantskiy fb2ad369f9 using serde derive feature instead of separate crate 2019-04-01 18:45:13 +02:00
Andreas Fackler 784c815fe7 Make `PublicKeySet` orderable, too. 2019-02-08 10:16:31 +00:00
Andreas Fackler 009ec6ceee Make SerdeSecret's field public.
Otherwise it's impossible to actually use the wrapper to serialize an
existing secret key.
2019-02-06 18:09:12 +01:00
Andreas Fackler c486b93631 Make several types Ord, PartialOrd.
Also fixes some new Clippy and rustfmt issues and extends documentation.
2019-02-01 16:56:57 +01:00
Sebastian Geisler 7a077846c9 Add documentation to secret keys pointing to SerdeSecret 2019-01-22 15:06:38 -08:00
Sebastian Geisler ce1c30f9b4 Address @afck's comments
* make SerializeSecret private
* simplify serde impls
2019-01-22 14:35:47 -08:00
Sebastian Geisler cd490bcdee Implement ser/de for SecretKeyShare 2019-01-18 14:23:38 -08:00
Sebastian Geisler a17cff2041 Implement ser/de for SecretKey 2019-01-18 12:09:50 -08:00
Sebastian Geisler 823609b53e Add SerdeSecret wrapper type and SerializeSecret trait 2019-01-17 15:07:05 -08:00
David Irvine 43f615c953 Cargo fix update. Also update dependencies, minus lazy static due to issues with criterion. 2019-01-09 10:38:28 +01:00
Andreas Fackler dbb9fae896 Version 0.3.0 2018-12-18 15:20:47 +01:00
Andreas Fackler 9ab09897bd Update docs.rs link. 2018-12-18 15:20:47 +01:00
Andreas Fackler 8b6fa87cdc Export serde_impl::FieldWrap. 2018-12-18 15:20:47 +01:00
Andreas Fackler a14e7d1867 Migrate to rand 0.6. 2018-12-18 15:20:47 +01:00
Andreas Fackler 1b1df40c67 Upgrade to Rust 1.31.0 and edition 2018. 2018-12-10 17:18:32 +01:00
Andreas Fackler c2d63b214a Add missing_docs lint, extend docs. 2018-11-29 18:01:32 +01:00
Andreas Fackler c7eda7a14a Make serialization less wasteful.
This removes the unneeded length from key and signature representation,
removing 8 bytes from each. Also adds `from_bytes` and `to_bytes`
methods to convert keys and signatures.
2018-11-26 16:23:01 +01:00
Andreas Fackler 05cde32d01 Instead of macro_use, use use. 2018-10-30 08:11:18 +01:00
Andreas Fackler 54026f5fe7 Upgrade to Rust 1.30.0. 2018-10-27 18:05:31 +02:00
Andreas Fackler 1d613c2113 Make hash_g2 public.
This function can be useful, to avoid redundant hashing of a long message.
2018-10-22 17:25:42 +02:00
Andreas Fackler 29b40fffa7 Use hex_fmt 0.2.0. 2018-10-16 16:53:47 +02:00
Andreas Fackler 2ca1d2ef7d Fix negative overflow, add interpolation test. (#52) 2018-10-16 14:48:09 +02:00
Andreas Fackler 20de873356 Replace HexBytes with the hex_fmt crate. 2018-10-11 21:59:31 +02:00
Marc Brinkmann d133bb6d79
Mocktography (#49)
Added mocktography (feature `use-insecure-test-only-mock-crypto) and factored out CI execution script.
2018-10-11 18:25:15 +02:00
Andreas Fackler 90f63e34e9 Remove explicit Send+Sync impl for Error. 2018-10-11 15:04:05 +02:00
Andreas Fackler d9da30835f Reorder: public imports come last. 2018-10-11 12:21:46 +02:00
Andreas Fackler 3d324bb8d7 Optimize polynomial interpolation in the curve.
Slightly reduce the number of multiplication and division operations in
the scalar field.
2018-10-09 08:51:52 +02:00
Andreas Fackler 214e5f81cf Remove try_ methods. 2018-10-08 17:37:23 +02:00
Andreas Fackler ad11ceaed6 Remove mlock.
It currently causes too many problems to be practical. We will re-enable
it once we have a dedicated allocator for locked memory.
2018-10-08 17:37:23 +02:00
Andreas Fackler 191cf0b741 Reexport pairing.
Since we are reexporting some of the pairing types, we should also
export pairing itself, to make all the matching traits available and
avoid version conflicts.
2018-10-08 15:56:58 +02:00
Andreas Fackler 0efdad4d69 Prepare for adding mock cryptography for testing.
* Add a feature flag (that doesn't do anything yet).
* Give `clear_fr` a stronger type to prevent mistakes and ensure the
  right amount of memory gets cleared.
* Re-export the engine and related types from `lib.rs`.
2018-10-08 15:56:58 +02:00
Marc Brinkmann d69590bedc Convert all uses of `Bls12` and friends to refer to root `lib.rs` instead of importing from pairing directly. 2018-10-08 15:56:58 +02:00
Andreas Fackler 84e8b69a24 Validate polynomial degrees: fix panics. 2018-10-08 13:19:11 +02:00
Andreas Fackler 0bb41bd990 Merge xor_vec and hash_bytes.
They are only used together, and the API of `xor_vec` is a bit dangerous
since it silently stops at the minimum of the two arguments' lengths.
2018-10-08 13:19:11 +02:00
Marc Brinkmann 3645668bff Add an API that allows specifying the RNG to be used for encryption. 2018-10-02 08:37:53 +02:00
DrPeterVanNostrand 5f09f96345 Added type for clearing temporary values. 2018-09-14 13:34:35 -07:00
DrPeterVanNostrand 72d1c607f8 Added 'try_' constructors to secret types. 2018-09-04 15:10:20 +00:00