Commit 3aab2a28 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Private key checking

parent 6801b834
......@@ -135,14 +135,16 @@ let verbose_verify_election_test_data (e, ballots, signatures, private_data) =
verbose_assert "signature count" (lazy (
Array.length signatures = Array.length ballots
));
(*
verbose_assert "private keys" (lazy (
Array.foralli
(fun _ k -> Crypto.check_private_key k)
let open P.G in
Array.forall
(fun k ->
let {g=g'; p=p'; q=q'; y} = k.public_key in
g =~ g' && p =% p' && q =% q' &&
g **~ k.x =~ y
)
private_data.private_keys
))
*)
();;
));;
let iter_keep f xs = List.iter f xs; xs;;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment