Peter van Nostrand
77a5829c1d
Replaced clear-on-drop with 'std::ptr::write_volatile'.
7 years ago
Marc Brinkmann
8af4b502ae
Added `RandomAdversary` and the necessary auxiliary functions.
...
Random adversaries are created for `broadcast` and `honey_badger`. Random value generation was added for all type-dependencies of these algorithms, causing the `Rand` trait to be implement for a large portion of the codebase.
Additionally, `MessageWithSender` turned into an actual struct, making it much easier to handle. Tuple-like construction is still available through `MessageWithSender::new()`.
7 years ago
Andreas Fackler
1f3768f2b6
Add coin docs, change parity computation.
...
This makes the signature parity computation take into account all bits,
not just the last one of each byte.
7 years ago
Marc Brinkmann
b7d12585f8
Implemented `Rand` for `SecretKey`.
7 years ago
Andreas Fackler
51b87b8bae
Add node transaction messages to Dynamic HB.
7 years ago
Andreas Fackler
c0cef3b50b
Avoid redundant key computations.
7 years ago
Andreas Fackler
e3a401bcb9
Make SyncKeyGen NodeUid-aware.
...
This allows the caller to address nodes by ID instead of by index.
Also contains a few other minor changes that will be needed for
`DynamicHoneyBadger`.
7 years ago
Vladimir Komendantskiy
17fdffa90f
threshold encryption of proposals in HoneyBadger
7 years ago
Andreas Fackler
0c66e16010
Remove generic E: Engine from crypto.
7 years ago
Andreas Fackler
81cbe5a63b
Implement SyncKeyGen.
...
This is a _synchronous_ key generation algorithm. We will use it in
`DynamicHoneyBadger`, on top of `HoneyBadger` to satisfy the synchrony
requirements.
It can also be used independently e.g. on top of a blockchain.
7 years ago
Peter van Nostrand
1c3afe85eb
Fix formatting.
7 years ago
Peter van Nostrand
5bf57d5d1d
Added clear-on-drop secret-keys to 'NetworkInfo'.
7 years ago
Andreas Fackler
34d642f709
Improve Hash impl for Ciphertext.
...
This formulation makes it harder to forget updating the `Hash`
implementation if the `Ciphertext` type changes.
7 years ago
Andreas Fackler
db1de60237
Implement Hash for "public" cryptographic types.
...
This adds a `Hash` implementation for public keys, commitments,
ciphertexts and signatures — types that might make sense to be included
in special transactions. The `DynamicHoneyBadger` implementation will
require some of them.
7 years ago
Andreas Fackler
cf1782b2cf
Simplify serde implementations, add Ciphertext.
7 years ago
Andreas Fackler
db2d84cabd
Support serde by default.
...
This removes the `serialization-serde` feature, since serde is already
used internally and therefore a dependency anyway.
7 years ago
Andreas Fackler
78b2a008c1
Rename crypto::keygen to crypto::poly.
7 years ago
Vladimir Komendantskiy
36c32822ed
review comment coverage
7 years ago
Vladimir Komendantskiy
28ec3c5824
note in the broadcast example about the use of keys
7 years ago
Vladimir Komendantskiy
16b3c045ca
extended the common coin nonce with a global UID and the top-level epoch
7 years ago
Vladimir Komendantskiy
3592c13133
fixed propagation of common coin messages to the top level
7 years ago
Vladimir Komendantskiy
2faf2afa46
protobuf serialization
7 years ago
Vladimir Komendantskiy
a1038d9fb3
updated the tests with key initialisation
7 years ago
Vladimir Komendantskiy
a87bd6460b
common coin implementation
7 years ago
Vladimir Komendantskiy
68b9da5a3d
Common Coin module template; added keys in NetworkInfo
7 years ago
Andreas Fackler
f6e01daa13
Implement polynomials for distributed key generation.
7 years ago
Andreas Fackler
f8685b5367
Expand crypto tests.
7 years ago
Andreas Fackler
40196fae1d
Implement threshold encryption.
7 years ago
Andreas Fackler
419aae5adc
Implement simple encryption.
7 years ago
Andreas Fackler
abff26a153
Make public keys and signatures serializable.
7 years ago
Andreas Fackler
12516d2716
Simplify hash_g2.
7 years ago
Andreas Fackler
c830e8f605
Use SHA256 and byteorder in hash_g2.
7 years ago
Andreas Fackler
036548e6b8
Implement threshold signatures.
7 years ago
Vladimir Komendantskiy
d3149b92f6
Initial commit
7 years ago