Commit Graph

639 Commits

Author SHA1 Message Date
Vladimir Komendantskiy 9c6ad0f0c6 removed obsolete FIXME 2018-11-19 11:21:49 +00:00
Vladimir Komendantskiy 2e5a8e429c moved BitIterator to threshold_crypto; updated tests 2018-11-19 11:21:49 +00:00
Vladimir Komendantskiy 806580f590 returned SigningState to its place and corrected a typo 2018-11-19 11:21:49 +00:00
Vladimir Komendantskiy e9c2c95c4b better wording 2018-11-19 11:21:49 +00:00
Vladimir Komendantskiy f449ed1e7f passed the coin derivation method as constructor argument, updated a comment 2018-11-19 11:21:49 +00:00
Vladimir Komendantskiy 64353fa9d8 collected the steps after setting derived common coins 2018-11-19 11:21:49 +00:00
Vladimir Komendantskiy c4d77cbf5b assignment of bits of the random value to coins of BA instances 2018-11-19 11:21:49 +00:00
Andreas Fackler c94e3ff16f Add epoch getters to JoinPlan, HB, DHB and QHB. 2018-11-18 10:48:38 +01:00
Andreas Fackler e89688bbd8
Allow arbitrary validator set changes in DHB. (#339)
* Allow arbitrary validator set changes in DHB.

This replaces `NodeChange` with a full list of IDs and public keys,
instead of just a single to-be-added or to-be-removed node, to allow
completely replacing the set of validators by any arbitrary new set in a
single key generation step.

* Address review comments: added_nodes, comments.

* Fix MessageScheduler::First.

Make sure every node eventually gets to handle its messages.
2018-11-18 10:17:33 +01:00
Andreas Fackler 767944c0f6 Fix random_value doc comment. 2018-11-12 14:16:21 +01:00
Andreas Fackler 30cce9bed8 Add a random_value option to HB and DHB.
This includes a threshold signature in each batch that can be used as a
pseudorandom value.

Also moves `EncryptionSchedule` from `threshold_decrypt` to
`honey_badger`.
2018-11-12 14:16:21 +01:00
Vladimir Komendantskiy e4435d5622
Make the incoming message queue finite in Binary Agreement (#329)
* added BA max_future_epochs and limited incoming messages in an epoch

* corrected a comment
2018-11-12 11:15:02 +00:00
Andreas Fackler b3c63774a7 Remove Epoched bound from SenderQueueableMessage. 2018-11-08 13:14:43 +01:00
Andreas Fackler d0b96f2dc8 Simplify the sender queue.
Remove the distinction between linearized and regular epochs.
Avoid iterating through the whole outgoing queue on epoch change.
2018-11-08 13:14:43 +01:00
Andreas Fackler 5ea0b92484 Minor simplification for SenderQueue. 2018-11-08 08:51:17 +01:00
Andreas Fackler 7f784e7852 Make Step independent of DistAlgorithm. 2018-11-08 08:51:17 +01:00
Vladimir Komendantskiy 9d4a477835
Merge pull request #327 from alyjak/issue326-rename-ThresholdDecryption
Rename `ThresholdDecryption` to `ThresholdDecrypt`
2018-11-07 17:36:26 +00:00
Andrew Lyjak 9a8836cf15 Rename `ThresholdDecryption` to `ThresholdDecrypt` 2018-11-07 11:13:10 -05:00
Andreas Fackler 62686afa05 Add a no-simd feature.
This disables SIMD in reed-solomon-erasure to work around problems on
Android.
2018-11-07 11:48:02 +01:00
Vladimir Komendantskiy 697565c97a
Move sender queue impls out of Honey Badger algorithms (#321)
* moved SenderQueueable impls out of HB algorithm modules and into sender_queue

* added sender_queue::honey_badger
2018-11-06 17:22:28 +00:00
alyjak bb64be55af issue286: make `ThresholdSign` and `ThresholdDecryption` APIs consistent (#316)
* issue286: make `ThresholdSign` and `ThresholdDecryption` APIs consistent

This gives both methods a `set_message(payload)` and a `sign()` method. If `sign` is called prior to
`set_message` or if was already called, then an empty step is returned. Otherwise share messages are
sent out to peers and `try_output` is called.

* Incorporating feedback from review of pull request #316

* Fixing the stack overflow and responding to further feedback

* Updates module documentation to reflect the API change from #286

* adds a new constructor to `ThresholdSign` and `ThresholdDecryption`

The `new_with_<payloadname>` function allows setting payload on construction
instead of as a separate call.
2018-11-06 16:26:48 +00:00
Andreas Fackler b71f9142f6 Add SenderQueue convenience methods for voting. 2018-11-06 14:12:31 +01:00
Andreas Fackler 2456db2d9e Rewrite Subset.
This merges the four maps into a single map, each entry of which tracks
the progress of both the `Broadcast` and the `BinaryAgreement`
subalgorithm for an individual proposer. Two advantages:
* A slight optimization, because the `Broadcast` instance is dropped as
soon as it is not needed anymore.
* The static guarantee that certain impossible situations (inserting a
broadcast value twice) cannot happen.

The module is also split up into smaller files.
2018-11-06 09:21:40 +01:00
Vladimir Komendantskiy 62cd29e4ca
Merge pull request #308 from poanetwork/vk-extern-sender-queue
External sender queue implementation
2018-11-05 17:30:01 +00:00
Vladimir Komendantskiy f02bbbb9da Updated documentation and removed a debug print 2018-11-05 14:25:59 +00:00
Vladimir Komendantskiy 52cbde42f6 simplified Step::defer_messages 2018-11-05 13:38:02 +00:00
Vladimir Komendantskiy 3deb5f1bce refactored an error! by adding linearizable epochs and wrote a comment on eras 2018-11-05 11:11:00 +00:00
Vladimir Komendantskiy a8586efc81 work on review comments 2018-11-05 11:11:00 +00:00
Vladimir Komendantskiy ee46dd4b81 sender queue implementation 2018-11-05 11:11:00 +00:00
Andreas Fackler 3c915cd4ff
Improve the broadcast documentation. (#310)
Improve the broadcast documentation.

* Reorganize the explanation, separate algorithm from justification.
* Some of the message numbers were wrong.
* Use `[i]` for indices, even in pseudocode.
2018-11-03 15:53:40 +01:00
Andreas Fackler 13340d7ad0 Remove redundant log statements, minor cleanups. 2018-11-03 15:36:32 +01:00
Vladimir Komendantskiy ad35ebafd5
Merge pull request #288 from logannc/optional_threshold_encryption_209
Optional threshold encryption 209
2018-11-01 21:45:02 +00:00
Logan Collins 7f4b83edb9
Merge branch 'master' into optional_threshold_encryption_209 2018-10-31 19:44:42 -05:00
Logan Collins 700f9b55e3 add encryption schedule to join plan (and batch), remove unnecessary lint supression, style change 2018-10-31 19:44:22 -05:00
Vladimir Komendantskiy 485267f929
Merge pull request #314 from poanetwork/afck-todo
Remove some obsolete TODOs and comments.
2018-10-31 16:39:01 +00:00
Andreas Fackler 7e4bffa825 Subset: Remove obsolete TODO.
Just like in `Broadcast`, let's keep the value a `Vec<u8>`. The user
should handle serialization.
2018-10-31 17:18:11 +01:00
Andreas Fackler f536587856 Broadcast: Remove TODO, redundant field.
Since `Broadcast` operates on a `Vec<u8>` anyway, let's not make it
generic in a serializable value. This removes the TODO.

The `data_shard_num` field is also removed; it was redundant now.
2018-10-31 15:51:21 +01:00
Logan Collins dcbc065388 clippy and fmt 2018-10-31 01:27:28 -05:00
Logan Collins ad5f725b2e
Merge branch 'master' into optional_threshold_encryption_209 2018-10-31 01:09:35 -05:00
Logan Collins 09833f2b56 remove box in propose 2018-10-31 01:08:09 -05:00
Vladimir Komendantskiy 2fed831689
Merge pull request #270 from d33a94975ba60d59/reordering-attack-test
Add a test for the reordering attack on BinaryAgreement
2018-10-30 16:56:01 +00:00
d33a94975ba60d59 c132751457 Test the reordering attack on BinaryAgreement using net framework 2018-10-30 11:33:10 -05:00
Marc Brinkmann 5f21c9a4e4
Include advice on how to handle `Step` in docs. (#297)
* Fixed spelling mistake in `Step` docs.
* Added suggestion on how to handle `Step` output.
2018-10-30 11:31:50 +01:00
Andreas Fackler df36258715 Instead of macro_use, use use. 2018-10-30 08:11:03 +01:00
Andreas Fackler d9bac58bc8 Use the correct NetworkInfos in the broadcast ProposeAdversary. 2018-10-29 15:42:20 +01:00
Vladimir Komendantskiy 5eeb06aac8
Merge pull request #298 from poanetwork/afck-api
Make the BA session ID generic.
2018-10-29 09:57:07 +00:00
Andreas Fackler c011ef49c5 Make the BA session ID generic. 2018-10-29 09:28:09 +01:00
Andreas Fackler e1038c66ba Upgrade to Rust 1.30.0. 2018-10-29 09:27:45 +01:00
Vladimir Komendantskiy 4560070fec message reordering net adversary and drop_and_readd change 2018-10-29 08:43:31 +01:00
Vladimir Komendantskiy 52d48675f0
Merge pull request #305 from poanetwork/afck-fix-sbv-bc
Fix SbvBroadcast observer issue.
2018-10-28 18:01:01 +00:00