mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-10 05:09:22 +00:00
Implement a FROST algorithm for Schnorrkel
This commit is contained in:
14
crypto/schnorrkel/src/tests.rs
Normal file
14
crypto/schnorrkel/src/tests.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use rand_core::OsRng;
|
||||
|
||||
use frost::tests::{key_gen, algorithm_machines, sign};
|
||||
|
||||
use crate::Schnorrkel;
|
||||
|
||||
#[test]
|
||||
fn test() {
|
||||
let keys = key_gen(&mut OsRng);
|
||||
const CONTEXT: &[u8] = b"FROST Schnorrkel Test";
|
||||
let machines = algorithm_machines(&mut OsRng, Schnorrkel::new(CONTEXT), &keys);
|
||||
const MSG: &[u8] = b"Hello, World!";
|
||||
sign(&mut OsRng, Schnorrkel::new(CONTEXT), keys, machines, MSG);
|
||||
}
|
||||
Reference in New Issue
Block a user