Serai is a new DEX, built from the ground up, initially planning on listing Bitcoin, Ethereum, DAI, and Monero, offering a liquidity-pool-based trading experience. Funds are stored in an economically secured threshold-multisig wallet.
Find a file
Luke Parker 5b3c9bf5d0
DKG Blame (#196)
* Standardize the DLEq serialization function naming

They mismatched from the rest of the project.

This commit is technically incomplete as it doesn't update the dkg crate.

* Rewrite DKG encryption to enable per-message decryption without side effects

This isn't technically true as I already know a break in this which I'll
correct for shortly.

Does update documentation to explain the new scheme. Required for blame.

* Add a verifiable system for blame during the FROST DKG

Previously, if sent an invalid key share, the participant would realize that
and could accuse the sender. Without further evidence, either the accuser
or the accused could be guilty. Now, the accuser has a proof the accused is
in the wrong.

Reworks KeyMachine to return BlameMachine. This explicitly acknowledges how
locally complete keys still need group acknowledgement before the protocol
can be complete and provides a way for others to verify blame, even after a
locally successful run.

If any blame is cast, the protocol is no longer considered complete-able
(instead aborting). Further accusations of blame can still be handled however.

Updates documentation on network behavior.

Also starts to remove "OnDrop". We now use Zeroizing for anything which should
be zeroized on drop. This is a lot more piece-meal and reduces clones.

* Tweak Zeroizing and Debug impls

Expands Zeroizing to be more comprehensive.

Also updates Zeroizing<CachedPreprocess([u8; 32])> to
CachedPreprocess(Zeroizing<[u8; 32]>) so zeroizing is the first thing done
and last step before exposing the copy-able [u8; 32].

Removes private keys from Debug.

* Fix a bug where adversaries could claim to be using another user's encryption keys to learn their messages

Mentioned a few commits ago, now fixed.

This wouldn't have affected Serai, which aborts on failure, nor any DKG
currently supported. It's just about ensuring the DKG encryption is robust and
proper.

* Finish moving dleq from ser/deser to write/read

* Add tests for dkg blame

* Add a FROST test for invalid signature shares

* Batch verify encrypted messages' ephemeral keys' PoP
2023-01-01 01:54:18 -05:00
.github Run cargo deny daily 2022-12-02 13:38:30 -05:00
coins DKG Blame (#196) 2023-01-01 01:54:18 -05:00
common/zalloc Comment the allocator feature 2022-11-11 01:23:35 -05:00
contracts Fill out Cargo.tomls 2022-10-15 23:46:22 -04:00
crypto DKG Blame (#196) 2023-01-01 01:54:18 -05:00
deploy Misc formatting fixes 2022-12-08 22:10:12 -05:00
docs DKG Blame (#196) 2023-01-01 01:54:18 -05:00
processor Update processor to the new Zeroizing ViewPair 2022-12-14 18:40:12 -05:00
substrate Update runtime commentary in Tendermint 2022-12-05 09:04:50 -05:00
.gitattributes Cluster Orchestration with Docker Compose (#114) 2022-09-12 15:01:14 -05:00
.gitignore fix for #166 & cleanup (#184) 2022-12-07 10:08:04 -05:00
.rustfmt.toml Apply an initial set of rustfmt rules 2022-07-16 15:16:30 -05:00
AGPL-3.0 Add an initial Substrate instantiation 2022-07-15 00:05:00 -04:00
Cargo.lock Add test vectors for Ciphersuite::hash_to_F 2022-12-25 02:50:10 -05:00
Cargo.toml Add a dedicated crate for testing ff/group implementors 2022-12-24 15:09:09 -05:00
CONTRIBUTING.md Clarify identation policy 2022-10-11 00:40:50 -05:00
deny.toml Initial Tendermint implementation (#145) 2022-12-03 18:38:02 -05:00
LICENSE Clarify licensing per https://github.com/serai-dex/serai/issues/13 2022-08-25 04:02:13 -04:00
README.md Remove stray mention to USDC 2022-12-15 20:35:06 -05:00

Serai

Serai is a new DEX, built from the ground up, initially planning on listing Bitcoin, Ethereum, Monero, DAI, offering a liquidity pool trading experience. Funds are stored in an economically secured threshold multisig wallet.

Getting Started

Layout

  • docs: Documentation on the Serai protocol.

  • crypto: A series of composable cryptographic libraries built around the ff/group APIs achieving a variety of tasks. These range from generic infrastructure, to our IETF-compliant FROST implementation, to a DLEq proof as needed for Bitcoin-Monero atomic swaps.

  • coins: Various coin libraries intended for usage in Serai yet also by the wider community. This means they will always support the functionality Serai needs, yet won't disadvantage other use cases when possible.

  • processor: A generic chain processor to process data for Serai and process events from Serai, executing transactions as expected and needed.

  • contracts: Smart Contracts implementing Serai's functionality.

  • substrate: Substrate crates used to instantiate the Serai network.