Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
belenios
belenios
Commits
053a73af
Commit
053a73af
authored
Apr 25, 2013
by
Stephane Glondu
Browse files
Rename Crypto_sigs into Signatures
parent
076e5f85
Changes
8
Hide whitespace changes
Inline
Side-by-side
api.odocl
View file @
053a73af
Serializable_t
Crypto_sig
s
Signature
s
Election
Serializable_compat_t
Serializable_compat
lib/election.ml
View file @
053a73af
open
Util
open
Serializable_t
open
Crypto_sig
s
open
Signature
s
(** Helper functions *)
...
...
lib/election.mli
View file @
053a73af
(** Cryptographic primitives *)
open
Crypto_sig
s
open
Signature
s
val
finite_field
:
p
:
Z
.
t
->
q
:
Z
.
t
->
g
:
Z
.
t
->
(
module
GROUP
with
type
t
=
Z
.
t
)
...
...
lib/serializable_compat.ml
View file @
053a73af
...
...
@@ -67,7 +67,7 @@ module type COMPAT = sig
t
Serializable_t
.
partial_decryption
->
t
partial_decryption
end
module
MakeCompat
(
P
:
Crypto_sig
s
.
ELECTION_PARAMS
)
=
struct
module
MakeCompat
(
P
:
Signature
s
.
ELECTION_PARAMS
)
=
struct
open
Serializable_t
open
P
open
G
...
...
lib/serializable_compat.mli
View file @
053a73af
...
...
@@ -15,5 +15,5 @@ module type COMPAT = sig
t
Serializable_t
.
partial_decryption
->
t
partial_decryption
end
module
MakeCompat
(
P
:
Crypto_sig
s
.
ELECTION_PARAMS
)
:
module
MakeCompat
(
P
:
Signature
s
.
ELECTION_PARAMS
)
:
COMPAT
with
type
t
=
P
.
G
.
t
lib/
crypto_sig
s.mli
→
lib/
signature
s.mli
View file @
053a73af
File moved
tests/sandbox.ml
View file @
053a73af
...
...
@@ -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_sig
s
.
GROUP
with
type
t
=
Z
.
t
)
module
G
=
(
val
Election
.
finite_field
~
p
~
q
~
g
:
Signature
s
.
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_sig
s
.
ELECTION_PARAMS
)
Election
.
check_election
(
module
P
:
Signature
s
.
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_sig
s
.
GROUP
with
type
t
=
Z
.
t
)
module
G
=
(
val
Election
.
finite_field
~
p
~
q
~
g
:
Signature
s
.
GROUP
with
type
t
=
Z
.
t
)
let
public_keys
=
Array
.
map
(
fun
x
->
x
.
trustee_public_key
.
y
...
...
web/helios_registration.ml
View file @
053a73af
...
...
@@ -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_sig
s
.
GROUP
with
type
t
=
Z
.
t
)
module
G
=
(
val
Election
.
finite_field
~
p
~
q
~
g
:
Signature
s
.
GROUP
with
type
t
=
Z
.
t
)
let
public_keys
=
Array
.
map
(
fun
x
->
x
.
trustee_public_key
.
y
)
election
.
Common
.
public_data
.
public_keys
...
...
Write
Preview
Supports
Markdown
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