Fill out Cargo.tomls

Updated missing fields/sections, even if some won't be used, to 
standardize.

Also made FROST tests feature-gated.
This commit is contained in:
Luke Parker
2022-10-15 23:46:22 -04:00
parent 65664dafa4
commit 19488cf446
21 changed files with 79 additions and 28 deletions

View File

@@ -3,7 +3,7 @@ name = "modular-frost"
version = "0.2.4"
description = "Modular implementation of FROST over ff/group"
license = "MIT"
repository = "https://github.com/serai-dex/serai"
repository = "https://github.com/serai-dex/serai/tree/develop/crypto/frost"
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
keywords = ["frost", "multisig", "threshold"]
edition = "2021"
@@ -57,3 +57,5 @@ p256 = ["kp256", "dep:p256"]
secp256k1 = ["kp256", "k256"]
ed448 = ["sha3", "minimal-ed448"]
tests = []

View File

@@ -42,6 +42,7 @@ pub mod algorithm;
pub mod sign;
/// Tests for application-provided curves and algorithms.
#[cfg(any(test, feature = "tests"))]
pub mod tests;
// Validate a map of serialized values to have the expected included participants
@@ -215,6 +216,7 @@ impl<C: Curve> FrostCore<C> {
self.params
}
#[cfg(any(test, feature = "tests"))]
pub(crate) fn secret_share(&self) -> C::F {
self.secret_share
}

View File

@@ -431,6 +431,7 @@ impl<C: Curve, A: Algorithm<C>> AlgorithmMachine<C, A> {
Ok(AlgorithmMachine { params: Params::new(algorithm, keys, included)? })
}
#[cfg(any(test, feature = "tests"))]
pub(crate) fn unsafe_override_preprocess(
self,
preprocess: PreprocessPackage<C>,

View File

@@ -35,7 +35,7 @@ pub struct Vectors {
#[cfg(test)]
impl From<serde_json::Value> for Vectors {
fn from(value: serde_json::Value) -> Vectors {
let to_str = |value: &serde_json::Value| dbg!(value).as_str().unwrap().to_string();
let to_str = |value: &serde_json::Value| value.as_str().unwrap().to_string();
Vectors {
threshold: u16::from_str(value["config"]["NUM_PARTICIPANTS"].as_str().unwrap()).unwrap(),