Commit f9949778 authored by Stephane Glondu's avatar Stephane Glondu

In Election, rename combine_factors into compute_result

parent e96d4387
......@@ -565,7 +565,7 @@ module MakeElection (G : GROUP) (M : RANDOM) = struct
type combinator = factor array -> elt array array
let combine_factors num_tallied encrypted_tally partial_decryptions combinator =
let compute_result num_tallied encrypted_tally partial_decryptions combinator =
let factors = combinator partial_decryptions in
let results = Array.mmap2 (fun {beta; _} f ->
beta / f
......
......@@ -225,7 +225,7 @@ module type ELECTION = sig
type combinator = factor array -> elt array array
val combine_factors : int -> ciphertext -> factor array -> combinator -> result
val compute_result : int -> ciphertext -> factor array -> combinator -> result
(** Combine the encrypted tally and the factors from all trustees to
produce the election result. The first argument is the number of
tallied ballots. May raise [Invalid_argument]. *)
......
......@@ -205,7 +205,7 @@ module Make (P : PARSED_PARAMS) : S = struct
KG.combine_factors
| Some t -> KP.combine_factors checker t
in
let result = E.combine_factors (M.cardinal ()) tally factors combinator in
let result = E.compute_result (M.cardinal ()) tally factors combinator in
assert (E.check_result combinator (Lazy.force pks) result);
string_of_result G.write result
......
......@@ -1402,7 +1402,7 @@ let handle_election_tally_release (uuid, ()) () =
Lwt_io.chars_of_file |> Lwt_stream.to_string >>=
wrap1 (encrypted_tally_of_string W.G.read)
in
let result = E.combine_factors ntallied et pds KG.combine_factors in
let result = E.compute_result ntallied et pds KG.combine_factors in
let%lwt () =
let open Lwt_io in
with_file
......
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