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

@@ -24,7 +24,9 @@ zeroize = { version = "1", default-features = false }
rand_core = { version = "0.6", default-features = false }
blake2 = "0.10"
ciphersuite = { path = "../../crypto/ciphersuite", default-features = false, features = ["ristretto", "secp256k1"] }
dalek-ff-group = { path = "../../crypto/dalek-ff-group", default-features = false }
ciphersuite = { path = "../../crypto/ciphersuite", default-features = false }
ciphersuite-kp256 = { path = "../../crypto/ciphersuite/kp256", default-features = false }
schnorrkel = "0.11"
dkg = { path = "../../crypto/dkg", default-features = false }

View File

@@ -14,9 +14,10 @@ use rand_core::{RngCore, OsRng};
use zeroize::Zeroizing;
use dalek_ff_group::Ristretto;
use ciphersuite::{
group::{ff::PrimeField, GroupEncoding},
Ciphersuite, Ristretto,
Ciphersuite,
};
use serai_client::primitives::ExternalNetworkId;

View File

@@ -10,7 +10,10 @@ use blake2::{
digest::{consts::U32, Digest},
Blake2b,
};
use ciphersuite::{group::GroupEncoding, Ciphersuite, Ristretto, Secp256k1};
use dalek_ff_group::Ristretto;
use ciphersuite::{group::GroupEncoding, Ciphersuite};
use ciphersuite_kp256::Secp256k1;
use dkg::Participant;
use scale::Encode;

View File

@@ -6,10 +6,12 @@ use std::{
use zeroize::Zeroizing;
use rand_core::OsRng;
use dalek_ff_group::Ristretto;
use ciphersuite::{
group::{ff::Field, GroupEncoding},
Ciphersuite, Ristretto, Secp256k1,
Ciphersuite,
};
use ciphersuite_kp256::Secp256k1;
use dkg::ThresholdParams;
use serai_client::{

View File

@@ -1,6 +1,6 @@
use tokio::time::{sleep, Duration};
use ciphersuite::Secp256k1;
use ciphersuite_kp256::Secp256k1;
use serai_client::{
primitives::{insecure_pair_from_name, NetworkId},

View File

@@ -5,7 +5,7 @@ use std::{
use rand_core::{RngCore, OsRng};
use ciphersuite::Secp256k1;
use ciphersuite_kp256::Secp256k1;
use dkg::Participant;