mirror of
https://github.com/saymrwulf/swisspost-evoting-go-poc.git
synced 2026-05-14 20:58:03 +00:00
Proof-of-concept reimplementation of the Swiss Post e-voting cryptographic protocol in Go. Single binary, 52 source files, 2 dependencies. Covers ElGamal encryption, Bayer-Groth verifiable shuffles, zero-knowledge proofs, return codes, and a full election ceremony demo.
24 lines
598 B
Go
24 lines
598 B
Go
package main
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
"github.com/user/evote/pkg/protocol"
|
|
)
|
|
|
|
var demoVoters int
|
|
var demoOptions int
|
|
|
|
var demoCmd = &cobra.Command{
|
|
Use: "demo",
|
|
Short: "Run a full election ceremony end-to-end",
|
|
Long: "Runs setup → vote → tally → verify in one command.",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
protocol.RunDemoElection(demoVoters, demoOptions)
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
demoCmd.Flags().IntVar(&demoVoters, "voters", 10, "Number of voters")
|
|
demoCmd.Flags().IntVar(&demoOptions, "options", 2, "Number of voting options")
|
|
rootCmd.AddCommand(demoCmd)
|
|
}
|