Re-organize testing strategy and document Ciphersuite::hash_to_F.

This commit is contained in:
Luke Parker
2022-12-24 17:08:22 -05:00
parent 35a4f5bf9f
commit da8e7e73e0
13 changed files with 114 additions and 40 deletions

View File

@@ -9,7 +9,7 @@ use rand_core::{RngCore, CryptoRng};
use group::{ff::PrimeField, GroupEncoding};
use dkg::tests::{key_gen, test_ciphersuite as test_dkg};
use dkg::tests::key_gen;
use crate::{
curve::Curve,
@@ -19,7 +19,7 @@ use crate::{
Nonce, GeneratorCommitments, NonceCommitments, Commitments, Writable, Preprocess, SignMachine,
SignatureMachine, AlgorithmMachine,
},
tests::{clone_without, recover_key, algorithm_machines, sign, curve::test_curve},
tests::{clone_without, recover_key, algorithm_machines, sign},
};
pub struct Vectors {
@@ -118,12 +118,6 @@ pub fn test_with_vectors<R: RngCore + CryptoRng, C: Curve, H: Hram<C>>(
rng: &mut R,
vectors: Vectors,
) {
// Do basic tests before trying the vectors
test_curve::<_, C>(&mut *rng);
// Test the DKG
test_dkg::<_, C>(&mut *rng);
// Test a basic Schnorr signature
{
let keys = key_gen(&mut *rng);