Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
belenios
belenios
Commits
34a72c52
Commit
34a72c52
authored
Apr 25, 2013
by
Stephane Glondu
Browse files
Simplify Serializable_compat interface
parent
543d87d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/serializable_compat.ml
View file @
34a72c52
...
@@ -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. *)
...
...
lib/serializable_compat.mli
View file @
34a72c52
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment