Commit 34a72c52 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Simplify Serializable_compat interface

parent 543d87d7
...@@ -60,20 +60,11 @@ let result r = ...@@ -60,20 +60,11 @@ let result r =
let open Serializable_t in let open Serializable_t in
{nb_tallied; encrypted_tally; partial_decryptions; result} {nb_tallied; encrypted_tally; partial_decryptions; result}
module type COMPAT = sig
type t
val ballot : t Serializable_t.ballot -> t ballot
val partial_decryption : t Serializable_t.ciphertext array array ->
t Serializable_t.partial_decryption -> t partial_decryption
end
module MakeCompat (P : Signatures.ELECTION_PARAMS) = struct module MakeCompat (P : Signatures.ELECTION_PARAMS) = struct
open Serializable_t open Serializable_t
open P open P
open G open G
type t = G.t
(* The following duplicates parts of module Crypto, in order to (* The following duplicates parts of module Crypto, in order to
reconstruct commitments. *) reconstruct commitments. *)
......
...@@ -8,12 +8,8 @@ val partial_decryption : ...@@ -8,12 +8,8 @@ val partial_decryption :
'a partial_decryption -> 'a Serializable_t.partial_decryption 'a partial_decryption -> 'a Serializable_t.partial_decryption
val result : 'a result -> 'a Serializable_t.result val result : 'a result -> 'a Serializable_t.result
module type COMPAT = sig module MakeCompat (P : Signatures.ELECTION_PARAMS) : sig
type t val ballot : P.G.t Serializable_t.ballot -> P.G.t ballot
val ballot : t Serializable_t.ballot -> t ballot val partial_decryption : P.G.t Serializable_t.ciphertext array array ->
val partial_decryption : t Serializable_t.ciphertext array array -> P.G.t Serializable_t.partial_decryption -> P.G.t partial_decryption
t Serializable_t.partial_decryption -> t partial_decryption
end end
module MakeCompat (P : Signatures.ELECTION_PARAMS) :
COMPAT with type t = P.G.t
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