mirror of
https://github.com/luxfi/fhe.git
synced 2026-09-24 00:27:17 +00:00
Two thousand and twenty-one packages carried more than one spec across this estate — eslint alone in a hundred and four forms — and a package resolved twice is two copies at run time, which is how react-hook-form came to report "two different types with this name" from files nobody had edited. None do now. The number lives in the catalog: a manifest names the package, the workspace names the version. Where a manifest cannot reach a catalog it still carries the one version, because the table is the source either way. Co-authored-by: Hanzo Dev <[email protected]>
Shadow Governance - Anonymous Parallel Government
FHE-encrypted anonymous governance protocol for shadow government operations.
Implements: PIP-7010 / Shadow Government Protocol for pars.vote
Features
- Shadow Ministries: Parallel government departments monitoring real governance
- Anonymous Proposals: Submit proposals without revealing identity
- Encrypted Voting: FHE-encrypted ballots — homomorphic tallying without decrypting individual votes
- Nullifier-based Anti-Fraud: Prevent double-voting without linking votes to identities
- Quorum Enforcement: Configurable quorum requirements
How It Works
- Admin creates shadow ministries (Education, Health, Economy, etc.)
- Anyone submits proposals tied to a ministry
- Participants vote with encrypted ballots using unique nullifiers
- After the voting period, tally decrypts aggregate counts (not individual votes)
- Finalization checks quorum and majority to pass/reject
Anonymity Guarantees
- Vote privacy: Individual votes are FHE-encrypted; only the aggregate is decrypted
- Voter unlinkability: Nullifier = hash(secret || proposalId) — cannot link voter to vote
- Proposal anonymity: Proposals can be submitted via relay/mixer for full anonymity
Quick Start
npm install
npx hardhat compile
npx hardhat test
# Deploy
npx hardhat task:deploy-gov
# Create a ministry
# (done programmatically in deploy or via admin functions)
# Create a proposal
npx hardhat task:propose --contract <addr> --content "Reform education" --ministry <id>
# Vote anonymously
npx hardhat task:vote --contract <addr> --proposal 0 --choice yes --secret "my-secret"
# Tally after voting period
npx hardhat task:tally --contract <addr> --proposal 0
# List ministries
npx hardhat task:list-ministries --contract <addr>
Related
- Go implementation: github.com/luxfi/fhe/cmd/vote — Boolean-circuit encrypted voting
- Pars voting app: pars.vote — Production deployment
- PIP-0012: Encrypted Voting protocol
- LP-6500: fheCRDT Architecture