swisspost-evoting-go-poc/cmd/evote/demo.go
saymrwulf e8b6f30871 Swiss Post E-Voting Go PoC
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.
2026-02-13 19:53:09 +01:00

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)
}