Smash Ciphersuite definitions into their own crates

Uses dalek-ff-group for Ed25519 and Ristretto. Uses minimal-ed448 for Ed448.
Adds ciphersuite-kp256 for Secp256k1 and P-256.
This commit is contained in:
Luke Parker
2025-08-20 04:50:37 -04:00
parent 8be03a8fc2
commit b63ef32864
95 changed files with 322 additions and 184 deletions

View File

@@ -38,6 +38,7 @@ simple-request = { path = "../../common/request", version = "0.1", optional = tr
bitcoin = { version = "0.32", optional = true }
dalek-ff-group = { path = "../../crypto/dalek-ff-group", optional = true }
ciphersuite = { path = "../../crypto/ciphersuite", version = "0.4", optional = true }
monero-wallet = { git = "https://github.com/monero-oxide/monero-oxide", rev = "a74f41c2270707e340a9cb57fcd97a762d04975b", version = "0.1.0", default-features = false, features = ["std"], optional = true }
@@ -47,7 +48,8 @@ hex = "0.4"
blake2 = "0.10"
ciphersuite = { path = "../../crypto/ciphersuite", features = ["ristretto"] }
dalek-ff-group = { path = "../../crypto/dalek-ff-group" }
ciphersuite = { path = "../../crypto/ciphersuite" }
dkg-musig = { path = "../../crypto/dkg/musig" }
frost = { package = "modular-frost", path = "../../crypto/frost", features = ["tests"] }
schnorrkel = { path = "../../crypto/schnorrkel", package = "frost-schnorrkel" }
@@ -63,7 +65,7 @@ borsh = ["serai-abi/borsh"]
networks = []
bitcoin = ["networks", "dep:bitcoin"]
monero = ["networks", "ciphersuite/ed25519", "monero-wallet"]
monero = ["networks", "dalek-ff-group", "monero-wallet"]
# Assumes the default usage is to use Serai as a DEX, which doesn't actually
# require connecting to a Serai node

View File

@@ -2,7 +2,8 @@ use core::{str::FromStr, fmt};
use scale::{Encode, Decode};
use ciphersuite::{Ciphersuite, Ed25519};
use dalek_ff_group::Ed25519;
use ciphersuite::Ciphersuite;
use monero_wallet::address::{AddressError, Network, AddressType, MoneroAddress};

View File

@@ -3,7 +3,8 @@ use std::collections::HashMap;
use rand_core::{RngCore, OsRng};
use zeroize::Zeroizing;
use ciphersuite::{Ciphersuite, Ristretto};
use dalek_ff_group::Ristretto;
use ciphersuite::Ciphersuite;
use dkg_musig::musig;
use schnorrkel::Schnorrkel;

View File

@@ -9,7 +9,8 @@ use sp_core::{
Pair as PairTrait,
};
use ciphersuite::{Ciphersuite, Ristretto};
use dalek_ff_group::Ristretto;
use ciphersuite::Ciphersuite;
use dkg_musig::musig;
use schnorrkel::Schnorrkel;