-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCryptoAlternativesToEG
More file actions
40 lines (27 loc) · 2.26 KB
/
CryptoAlternativesToEG
File metadata and controls
40 lines (27 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
It's not clear what we should do without Xamarin bindings for ElectionGuard.
For the server, one option is (A) to keep using EG's guardians. We'd have to find three friends who'd be willing to
run Microsoft's (python-based) guardian services. They'd do partial decryption, then send to the server for
elementwise multiplication.
Another option (B) is to find some completely different MPC library. Lots of options, most of them probably not
really indended to be reliable for production.
If we stick with (A), we probably end up with something a lot like ElectionGuard. On the one hand, possibly good
because it might mean a degree of verifier compatibility. OTOH, we'd be stuck with prime fields instead of
elliptic curves, which is easy to understand but computationally intensive.
Either way, we'd then have to find a C# (or C#-compatible library) that could do the ElGamal encryption (with
prime fields or elliptic curves) and ZKPs (though in the worst case we could probably implement the ZKPs ourselves).
Wallach suggests HACL*, which ElectionGuard is also based on: https://hacl-star.github.io/Supported.html.
I guess we'd build of their ECDH? Not clear. Also there are apparently Rust bindings, but these are not
attested to by the HACL* team. I don't fully understand if we can run a C library in C#.
There's also BouncyCastle, which might have much of what we need. Already using it in the app for signatures.
Update: Chris notes that this
https://github.com/microsoft/electionguard-cpp/blob/7b681513f6661dfaff064bdc5e43ffaddc932072/bindings/netstandard/ElectionGuard/ElectionGuard.Encryption/NativeInterface.cs
is still there, as a C# wrapper.
What seems to have disappeared is this:
https://github.com/microsoft/electionguard-cpp/blob/0bad662f3c6c32f4f7c257b2826d448930736594/bindings/netstandard/ElectionGuard/ElectionGuard.Shared/Election.cs
So this
https://github.com/microsoft/electionguard-cpp/tree/0bad662f3c6c32f4f7c257b2826d448930736594/bindings/netstandard/ElectionGuard
needs to be recreated from
https://github.com/microsoft/electionguard-cpp/tree/main/bindings/netstandard/ElectionGuard
Another approach may be to use Bouncycastle:
https://github.com/novotnyllc/bc-csharp/
We could potentially use the very well-specified ZKPs in the ElectionGuard spec to make our own.