-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpdf_text.txt
More file actions
1986 lines (1181 loc) · 36.9 KB
/
Copy pathpdf_text.txt
File metadata and controls
1986 lines (1181 loc) · 36.9 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
PROJECT DOCUMENTATION
MatSetu (■■■■■■)
Digital Election Management Platform
All-India Edition · Version 2.0
CONFIDENTIAL — Internal Use Only
PROJECT TITLE
MATSETU ( ■■■■■■ ) — Digital Election Management Platform
VERSION
v2.0 — All-India Expanded Edition
OBJECTIVE
Secure, scalable, AI-powered digital voting for 950M+ voters across all 36
states/UTs
BACKEND
Python 3.11 + FastAPI + Uvicorn + Celery
DATABASE
PostgreSQL 16 + Redis 7 + Qdrant + TimescaleDB
AI STACK
InsightFace + ArcFace + DeepFace + Tesseract + YOLO-World
SCALE
All India — 950M voters · 1M+ booths · 800 districts · 36 states/UTs
ADMIN HIERARCHY
7 Tiers: Master → State → Division → District → Constituency → Worker →
Voter
CLASSIFICATION
CONFIDENTIAL — Internal Use Only
BUILT ON
Senterix-AI Intelligence Stack
MATSETU ( ■■■■■■ ) ·Digital Election Management Platform · v2.0 — All-India Edition · CONFIDENTIAL
1
INDEX
NO.
TITLE
PAGE NO.
1
About Project
3
2
Existing System
4
3
Need of New System
4
4
H/W & S/W Requirements
5
5
Admin Hierarchy — Who Manages What
6
6
System Flow Charts
7
7
Data Flow Diagrams
9
8
Data Dictionary
11
9
E-R Diagram Description
15
10
Process Description (All Roles)
16
11
Process Algorithm (All Roles)
18
12
System Design — Screen Descriptions
20
13
Testing
22
14
Post-Implementation Review
23
15
Future Enhancements
24
16
Bibliography
25
MATSETU ( ■■■■■■ ) ·Digital Election Management Platform · v2.0 — All-India Edition · CONFIDENTIAL
2
ABOUT PROJECT
MatSetu ( — meaning 'vote bridge') is a next-generation, AI-powered Digital Election Management
■■■■■■
Platform designed to serve the entire Indian electorate. v2.0 supersedes the Gujarat-only v1.0 and scales to all
28 states and 8 Union Territories, covering approximately 950 million registered voters across 1 million+ polling
booths. The platform replaces paper-based voter rolls and manual tallying with a real-time, biometricauthenticated, cryptographically-secured voting pipeline.
Scale Comparison — v1.0 vs v2.0
Metric
v1.0 (Gujarat only)
v2.0 (All India)
States / UTs covered
1 (Gujarat)
36 (All states + UTs)
Registered voters
~50 million
~950 million
Polling booths
~50,000
~1,000,000+
Constituencies
182 (Assembly)
4,120+ (Assembly + Lok Sabha)
Districts
33
800
Admin tiers
4
7
Qdrant voter vectors
50M @ ~100 GB
950M @ ~1.9 TB (sharded)
Worker GPS tracking
Not present
Full trail + anomaly detection
Area-wise drill-down
Constituency
8-level geographic drill-down
MATSETU ( ■■■■■■ ) ·Digital Election Management Platform · v2.0 — All-India Edition · CONFIDENTIAL
3
EXISTING SYSTEM
■ India's current election process relies on Electronic Voting Machines (EVMs) and Voter Verifiable
Paper Audit Trails (VVPATs) that operate entirely offline, making real-time national tallying impossible.
■ Voter authentication depends solely on physical EPIC (Voter ID) cards and manual register checks,
which are slow, error-prone, and susceptible to impersonation.
■ There is no centralised, live view of turnout across booths — District Election Officers receive data
hours after polling closes.
■ Worker deployment and movement cannot be tracked in real-time, making cross-booth fraud detection
impossible.
■ Geographic analysis of voting patterns requires days of manual data aggregation after election results
are declared.
■ There is no cryptographic proof that a specific vote was counted — voters must trust the process
without any technical verifiability.
NEED OF NEW SYSTEM
Real-time biometric voter authentication using face recognition (InsightFace ArcFace) eliminates
■
impersonation entirely.
■ A live, 8-level geographic vote tally (country → state → division → district → taluka → block → village
→ booth) gives every admin tier an instant drill-down view.
■ Worker GPS tracking with anomaly detection flags cross-booth movement, late logins, and suspicious
re-authentication events in real time.
■ PostgreSQL Row-Level Security (RLS) policies enforce geographic data isolation — no admin can see
outside their own scope.
■ A cryptographic hash chain on every vote and a zero-knowledge receipt scheme give India's first
end-to-end verifiable digital election.
■ Federated Qdrant clusters, state-partitioned PostgreSQL, and regional Redis make the system
horizontally scalable to the full 950M voter electorate.
MATSETU ( ■■■■■■ ) ·Digital Election Management Platform · v2.0 — All-India Edition · CONFIDENTIAL
4
H/W & S/W REQUIREMENTS (RECOMMENDED)
Central Hub — Server Side
Component
Recommended Specification
Processor
Intel Xeon / AMD EPYC — 32 cores or above
RAM
256 GB DDR5 (Qdrant in-memory vectors require high RAM)
Storage
10 TB NVMe SSD RAID array for PostgreSQL + 4 TB for TimescaleDB
Network
10 Gbps dedicated uplink; redundant fiber
OS
Ubuntu 22.04 LTS Server
Database
PostgreSQL 16 + Redis 7 + Qdrant + TimescaleDB
Backend runtime
Python 3.11 + FastAPI + Uvicorn + Celery workers
AI models
InsightFace ArcFace (512-D), DeepFace, Tesseract OCR, YOLO-World
Monitoring
Prometheus + Grafana + OpenTelemetry
Polling Booth Agent — Client Side
Component
Recommended Specification
Processor
Intel Core i5 / Raspberry Pi 5 (8 GB) or above
RAM
8 GB DDR4 above
Storage
128 GB SSD (local SQLite queue for offline resilience)
Camera
1080p USB webcam with IR liveness support
Network
4G/LTE SIM + Wi-Fi fallback + LoRa mesh relay
OS
Ubuntu 22.04 LTS / Raspberry Pi OS 64-bit
Software
booth_agent.py (Python 3.11), Chromium browser (kiosk mode)
Security
mTLS certificate (per-booth), Hardware TPM chip
GPS
USB or built-in GPS module (±5 m accuracy)
MATSETU ( ■■■■■■ ) ·Digital Election Management Platform · v2.0 — All-India Edition · CONFIDENTIAL
5
ADMIN HIERARCHY — WHO MANAGES WHAT
MatSetu v2.0 implements a strict 7-tier administrative hierarchy that mirrors India's actual governance
structure. Every role is read-only on vote_ledger at the PostgreSQL level; Row-Level Security (RLS) enforces
geographic data isolation automatically.
Ti
e
r
Role
Geographic
Scope
1
Master Admin
All India
2
State Admin
One state
3
Division Admin
One division
4
District Admin
One district
5
Constituency Admin
One constituency
6
Worker (Booth Op.)
Exactly one booth
7
Voter
Own constituency
Key Responsibilities
Start / stop election · Full audit read · Export signed results · Forensic
timeline · No vote writes
State-wide live tally · All district + division heat maps · Anomaly alerts for
state · CEO-level dashboard
District rollup within division · Cross-district anomaly detection ·
Division-level choropleth heatmap
Taluka / booth drill-down · Live worker movement map · Area-wise vote
counts · Worker anomaly resolution
Booth-level live view · Candidate-wise rollup post-close · Anomaly alerts ·
Booth health grid
Voter face scan + OTP submit · GPS-tagged login · Cast vote · Cannot
see other booths
Face auth → OTP → cast one vote · Receive anonymous ZK receipt ·
Cannot re-vote
Authentication Method Per Role
Role
Auth Method
IP Allowlist
TOTP
Master Admin
Username + bcrypt password + TOTP + IP allowlist
Mandatory
Yes
State Admin
Username + bcrypt password + TOTP + IP allowlist
Mandatory
Yes
Division Admin
Username + bcrypt password + TOTP
Optional
Yes
District Admin
Username + bcrypt password + TOTP
Optional
Yes
Constituency Admin
Username + bcrypt password + TOTP
No
Yes
Worker (Booth Op.)
Face recognition (ArcFace) + GPS + mTLS cert
No
No
Voter
Face auth (liveness check) + OTP on mobile
No
No
MATSETU ( ■■■■■■ ) ·Digital Election Management Platform · v2.0 — All-India Edition · CONFIDENTIAL
6
SYSTEM FLOW CHARTS
Flow Chart — Master Admin
START
▼
Enter Username + Password + TOTP
▼
Verify Credentials + IP Allowlist
▼
INCORRECT → Retry / Lock
▼
Dashboard — All-India Tally
▼
Start / Stop Election
▼
Monitor Anomaly Alerts
▼
Export Signed Results
▼
Forensic Timeline Reconstruction
▼
Logout
Flow Chart — Booth Worker (Booth Operator)
START
▼
Face Scan at Booth (ArcFace login)
▼
GPS + mTLS + Device Verify
▼
Anomaly? → Alert District Admin
▼
MATSETU ( ■■■■■■ ) ·Digital Election Management Platform · v2.0 — All-India Edition · CONFIDENTIAL
7
Voter Arrives — Scan EPIC / Face
▼
Liveness Check + Qdrant Match
▼
Duplicate Vote? → Reject
▼
OCR Verify EPIC + OTP Send
▼
OTP Confirmed → Submit Vote
▼
Hash Chain Entry + Redis INCR ×8
▼
Repeat Until Polling Closes
▼
Logout
MATSETU ( ■■■■■■ ) ·Digital Election Management Platform · v2.0 — All-India Edition · CONFIDENTIAL
8
Flow Chart — Voter
START
▼
Arrive at Booth
▼
Present EPIC / E-EPIC QR Code
▼
Worker Scans — OCR + Face Auth
▼
Liveness Check Passed?
▼
NO → Reject and Alert
▼
Already Voted? → Block
▼
OTP Sent to Registered Mobile
▼
Enter OTP on Booth Screen
▼
Select Candidate
▼
Confirm Vote → Submitted
▼
ZK Anonymous Receipt Shown
▼
END
MATSETU ( ■■■■■■ ) ·Digital Election Management Platform · v2.0 — All-India Edition · CONFIDENTIAL
9
DATA FLOW DIAGRAMS
Context Level DFD (Level 0)
CONTEXT LEVEL DESCRIPTION External Entities: VOTER · BOOTH WORKER · ELECTION COMMISSION (Master
Admin) Central Process: MATSETU DIGITAL ELECTION PLATFORM (Process 0.0) Data Flows: VOTER → System:
Face scan, EPIC, OTP confirmation, candidate selection System → VOTER: OTP, ballot screen, anonymous ZK
receipt WORKER → System: Login credentials, GPS coordinates, voter scan result System → WORKER: Session
JWT, voter verification result, anomaly alerts EC ADMIN → System: Election start/stop commands, admin credentials
System → EC ADMIN: Live tally, anomaly reports, signed result export
Admin DFD — Level 1 (Master Admin)
Process
No.
Process Name
Input Data
Output / Store
1.0
Admin Login
Username, password, TOTP, IP
JWT token → admin_accounts
2.0
Election Control
Start/stop command
election_status table updated
3.0
View All-India Tally
JWT (master scope)
Reads Redis tally keys at all 8 levels
4.0
Anomaly Dashboard
Anomaly events from scanner
anomaly_log → Master dashboard SSE
5.0
Export Results
Signed result request
Cryptographically signed JSON export
6.0
Forensic Timeline
Post-election request
audit_log + worker_location_trail merge
Voter DFD — Level 1
Process
No.
Process Name
Input Data
Output / Store
1.0
EPIC Scan & OCR
EPIC card image / E-EPIC QR
Tesseract text → voter lookup
2.0
Face Authentication
Webcam frame (liveness check)
ArcFace 512-D vector → Qdrant match
3.0
Duplicate Check
voter_id from match
voters.has_voted flag check
4.0
OTP Dispatch
Voter's registered mobile no.
Twilio SMS → otp_sessions table
5.0
OTP Verification
OTP entered by voter
otp_sessions.is_valid = TRUE
6.0
Vote Submission
candidate_id, booth_id, JWT
vote_ledger + hash chain + Redis INCR
7.0
ZK Receipt Generation
vote_hash + voter_random_salt
ZK commitment shown on screen
MATSETU ( ■■■■■■ ) ·Digital Election Management Platform · v2.0 — All-India Edition · CONFIDENTIAL
10
DATA DICTIONARY
❖ VOTERS
Tabledescription: Stores all registered voter records across India
Field Name
Data Type
Description
_id / id
UUID PK
Unique voter identifier
epic_number
TEXT UNIQUE
Voter ID card number
full_name
TEXT
Voter's legal full name
dob
DATE
Date of birth
gender
TEXT
M/F/T
mobile
TEXT
Registered mobile for OTP
state_code
CHAR(2)
ISO state code e.g. GJ, MH
booth_id
UUID FK
Assigned polling booth
face_enrolled
BOOLEAN
Face vector registered in Qdrant
has_voted
BOOLEAN
TRUE once vote submitted — immutable
qdrant_vector_id
UUID
Pointer to face vector in state Qdrant cluster
❖ VOTE_LEDGER
Tabledescription:Immutable record of every vote cast — append-only
Field Name
Data Type
Description
id
UUID PK
Vote identifier
voter_id
UUID FK
References voters(id)
candidate_id
UUID FK
References candidates(id)
booth_id
UUID FK
References booths(id)
worker_id
UUID FK
Booth operator who processed the vote
location_chain
JSONB
Full 8-level geographic chain (immutable)
submitted_at
TIMESTAMPTZ
NTP-synced server timestamp
vote_hash
TEXT
SHA-256 of vote data — part of hash chain
prev_hash
TEXT
Previous vote hash (chain integrity)
is_valid
BOOLEAN
FALSE if anomaly invalidated the vote
receipt_token
TEXT
ZK commitment token for voter receipt
MATSETU ( ■■■■■■ ) ·Digital Election Management Platform · v2.0 — All-India Edition · CONFIDENTIAL
11
❖ BOOTHS
Tabledescription: All polling booth locations with GPS and location chain
Field Name
Data Type
Description
id
UUID PK
Booth identifier
name
TEXT
Booth name e.g. Primary School No. 4
booth_number
TEXT
Official ECI booth number
state_id
UUID FK
References states(id)
district_id
UUID FK
References districts(id)
taluka_id
UUID FK
References talukas(id)
village_id
UUID FK
References villages(id)
gps_lat
DECIMAL(10,7)
Booth GPS latitude (7dp ≈ 1 cm accuracy)
gps_lng
DECIMAL(10,7)
Booth GPS longitude
booth_type
TEXT
regular / remote / mobile / home (80+ yr voters)
cert_fingerprint
TEXT
mTLS certificate fingerprint for this booth
is_active
BOOLEAN
Live booth status
❖ WORKERS
Tabledescription:Booth operator roster
Field Name
Data Type
Description
id
UUID PK
Worker identifier