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 797be71eb3
Utilize zeroize (#76)
* Apply Zeroize to nonces used in Bulletproofs

Also makes bit decomposition constant time for a given amount of 
outputs.

* Fix nonce reuse for single-signer CLSAG

* Attach Zeroize to most structures in Monero, and ZOnDrop to anything with private data

* Zeroize private keys and nonces

* Merge prepare_outputs and prepare_transactions

* Ensure CLSAG is constant time

* Pass by borrow where needed, bug fixes

The past few commitments have been one in-progress chunk which I've 
broken up as best read.

* Add Zeroize to FROST structs

Still needs to zeroize internally, yet next step. Not quite as 
aggressive as Monero, partially due to the limitations of HashMaps, 
partially due to less concern about metadata, yet does still delete a 
few smaller items of metadata (group key, context string...).

* Remove Zeroize from most Monero multisig structs

These structs largely didn't have private data, just fields with private 
data, yet those fields implemented ZeroizeOnDrop making them already 
covered. While there is still traces of the transaction left in RAM, 
fully purging that was never the intent.

* Use Zeroize within dleq

bitvec doesn't offer Zeroize, so a manual zeroing has been implemented.

* Use Zeroize for random_nonce

It isn't perfect, due to the inability to zeroize the digest, and due to 
kp256 requiring a few transformations. It does the best it can though.

Does move the per-curve random_nonce to a provided one, which is allowed 
as of https://github.com/cfrg/draft-irtf-cfrg-frost/pull/231.

* Use Zeroize on FROST keygen/signing

* Zeroize constant time multiexp.

* Correct when FROST keygen zeroizes

* Move the FROST keys Arc into FrostKeys

Reduces amount of instances in memory.

* Manually implement Debug for FrostCore to not leak the secret share

* Misc bug fixes

* clippy + multiexp test bug fixes

* Correct FROST key gen share summation

It leaked our own share for ourself.

* Fix cross-group DLEq tests
2022-08-03 03:25:18 -05:00
.github BP Verification (#75) 2022-07-31 21:45:53 -05:00
coins Utilize zeroize (#76) 2022-08-03 03:25:18 -05:00
contracts Correct clippy warnings 2022-07-22 02:35:17 -04:00
crypto Utilize zeroize (#76) 2022-08-03 03:25:18 -05:00
docs Correct missing escape sequences 2022-07-22 00:32:18 -04:00
processor Utilize zeroize (#76) 2022-08-03 03:25:18 -05:00
substrate Replace rand with rand_core where possible 2022-07-27 05:45:08 -04:00
.gitignore Add a patch for zip so ethereum-serai doesn't conflict with Substrate 2022-07-16 17:49:35 -04:00
.gitmodules Move the Monero create to coins/ 2022-04-27 00:09:05 -04: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 Utilize zeroize (#76) 2022-08-03 03:25:18 -05:00
Cargo.toml Implement Bulletproofs in Rust (#69) 2022-07-26 02:05:15 -05:00
README.md Add social links to the README 2022-07-23 05:20:36 -04:00

Serai

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

Layout

  • docs - Documentation on the Serai protocol.

  • 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.

  • 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.

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