Commit 053a73af authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Rename Crypto_sigs into Signatures

parent 076e5f85
Serializable_t
Crypto_sigs
Signatures
Election
Serializable_compat_t
Serializable_compat
open Util
open Serializable_t
open Crypto_sigs
open Signatures
(** Helper functions *)
......
(** Cryptographic primitives *)
open Crypto_sigs
open Signatures
val finite_field : p:Z.t -> q:Z.t -> g:Z.t ->
(module GROUP with type t = Z.t)
......
......@@ -67,7 +67,7 @@ module type COMPAT = sig
t Serializable_t.partial_decryption -> t partial_decryption
end
module MakeCompat (P : Crypto_sigs.ELECTION_PARAMS) = struct
module MakeCompat (P : Signatures.ELECTION_PARAMS) = struct
open Serializable_t
open P
open G
......
......@@ -15,5 +15,5 @@ module type COMPAT = sig
t Serializable_t.partial_decryption -> t partial_decryption
end
module MakeCompat (P : Crypto_sigs.ELECTION_PARAMS) :
module MakeCompat (P : Signatures.ELECTION_PARAMS) :
COMPAT with type t = P.G.t
......@@ -82,7 +82,7 @@ let verbose_verify_election_test_data (e, ballots, signatures, private_data) =
Election.check_finite_field ~p ~q ~g
));
let module P = struct
module G = (val Election.finite_field ~p ~q ~g : Crypto_sigs.GROUP with type t = Z.t)
module G = (val Election.finite_field ~p ~q ~g : Signatures.GROUP with type t = Z.t)
let public_keys =
Array.map (fun x ->
x.trustee_public_key.y
......@@ -91,7 +91,7 @@ let verbose_verify_election_test_data (e, ballots, signatures, private_data) =
let fingerprint = e.fingerprint
end in
verbose_assert "election key" (lazy (
Election.check_election (module P : Crypto_sigs.ELECTION_PARAMS)
Election.check_election (module P : Signatures.ELECTION_PARAMS)
));
let module M = Election.MakeSimpleMonad(P.G) in
let module E = Election.MakeElection(P)(M) in
......@@ -169,7 +169,7 @@ let random_exponent =
Z.(of_string_base 16 hex mod q)
module P = struct
module G = (val Election.finite_field ~p ~q ~g : Crypto_sigs.GROUP with type t = Z.t)
module G = (val Election.finite_field ~p ~q ~g : Signatures.GROUP with type t = Z.t)
let public_keys =
Array.map (fun x ->
x.trustee_public_key.y
......
......@@ -185,7 +185,7 @@ let () = Eliom_registration.Html5.register
let ballot = Serializable_compat_j.ballot_of_string Serializable_builtin_j.read_number raw_ballot in
let {g; p; q; y} = election.Common.election.e_public_key in
let module P = struct
module G = (val Election.finite_field ~p ~q ~g : Crypto_sigs.GROUP with type t = Z.t)
module G = (val Election.finite_field ~p ~q ~g : Signatures.GROUP with type t = Z.t)
let public_keys = Array.map (fun x ->
x.trustee_public_key.y
) election.Common.public_data.public_keys
......
Supports Markdown
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