Secure Electronic Voting System - PowerPoint PPT Presentation

1 / 47
About This Presentation
Title:

Secure Electronic Voting System

Description:

Two LCD s of 16X4 characters. Two 3X4 Keypads. ... Circuit Diagram for LCD and Keypad Interface. Pin Diagram for RF board. Circuit schematic on multisim. PCB Layout. – PowerPoint PPT presentation

Number of Views:475
Avg rating:3.0/5.0
Slides: 48
Provided by: saturnEce
Category:

less

Transcript and Presenter's Notes

Title: Secure Electronic Voting System


1
Secure Electronic Voting System
  • SD 1103
  • Semester 2 Presentation
  • Adam Diemert
  • Akshay Raj
  • Yu Chen
  • Advisor Dr. Katti

2
Introduction
  • The electronic voting system provides a secure,
    easy way to vote between two options. This can
    be used for voting for or against legislative
    bills or for deciding between two candidates.
  • The difficulty is providing a secure system that
    allows for voters to maintain privacy.
  • The security comes from encryption, and the
    privacy comes from the method used to encrypt and
    decrypt the votes.

3
Requirements-Hardware
  • We were given basic hardware requirements for the
    project.
  • The voter has to be able to vote on one module.
  • The vote will be counted on another module.

4
Requirements
  • The vote needs to be public and verifiable.
  • The results will be displayed on the bulletin
    board and digital signatures will be displayed to
    ensure authorization.
  • The El Gamal encryption scheme will be used.
  • The votes will be counted without being
    individually decrypted for privacy.
  • The encryption will use small numbers, and if
    time allows, large numbers will be attempted.

5
Transceiver
  • We need a transceiver to send messages from one
    breadboardd to another breadboard, store it, and
    send signal back to the first breadboard. We
    choose the MRF49XA transceiver from Microchip.
  • low-cost-2.82
  • two-way, short range wireless applications
  • can be used in the 433, 868, and 915 MHz
    frequency bands

6
Pin Diagram Transceiver
7
MICROCONTROLLER TO MRF49XA INTERFACE
8
APPLICATION CIRCUIT
9
Very small chip
10
16-Lead Plastic Thin Shrink Small Outline (ST)
4.4 mm Body TSSOP
11
Problems
  • Because the chip is surface mount, we cannot put
    it in our breadboard. We needed to find a way to
    use it in our breadboard. We found some options.

Two methods to problems
  • 1. just order a breakout board built on
    digi-key.com from Jeff.
  • 2.we build a breakout board by ourselves.

12
Our first option
  • Thinking about the price and convenience, we
    decide to build the adaptor by ourselves.

13
Top of the board
14
Back of the board
15
Front of the board
16
Problems again
  • Other parts are all very small, even smaller than
    chip itself. For example, capacitors and
    inductors with small values. It is almost
    impossible to solder them to our final PCB if we
    want to do it by ourselves.

Solution
  • We had to choose the other way we mentioned
    before, which is that we directly order a
    breakout board that every components were
    soldered. Then we found MRF49XA PICtail/PICtail
    Plus Daughter Board

17
MRF49XA PICtail/PICtail Plus Daughter Board
18
RF Transceiver daughter board
Wire Antenna
Power Disconnect/ Current Measurement Headers
24AA02E48 EUI Node Identity Serial EEPROM
MRF49XA Sub-GHz Transceiver
PICtail and PICtail Plus Connectors
19
Datasheet of MRF49XA PICtail/PICtail Plus
Daughter Board
20
Components used in Hardware
  • Two LCDs of 16X4 characters.
  • Two 3X4 Keypads
  • Two Microcontroller (18F4620)
  • Crystal oscillators 20 MHz

21
Design Module
  • Voting Panel
  • Bulletin Board

22
Circuit Diagram for LCD and Keypad Interface
23
Pin Diagram for RF board
24
Circuit schematic on multisim
25
PCB Layout
26
Software
  • The software has several routines that are used
    for the encryption.
  • The vote counting code is to be put on one of the
    modules.
  • The voting code is to be put on the other module.
  • There are supporting routines that do things such
    as
  • Retrieve entries from the keypad
  • LCD and transceiver drivers
  • Calculations such as finding numbers that will
    work in the encryption

27
Voting Code
  • The voting code works in this order
  • Calculate the correct x for the encryption
    (discussed later)
  • Ask user to input the vote and one other number
    for the encryption
  • Calculate encryption numbers r and t
  • Send r and t to the other module
  • Wait for a response confirming reception of vote
  • Ask whether more voters are waiting to vote
  • Repeat process if there are more voters

28
Voting Counting Code
  • This code works as follows
  • Calculate x for encryption as in the other
    routine
  • Receive r and t from other module
  • Multiply r and t by other votes previously
    captured
  • See if there are more votes (variable set while
    receiving r. If r ends up being re, then
    there are no more votes.
  • Calculate decryption of product of votes
  • Calculate the number of votes that correspond to
    the number from decryption
  • Set variables and output results to the users

29
El Gamal Basics
  • Choose p, which is a prime number
  • Choose g, which is an integer
  • Choose x, which in our case is chosen using the
    Extended Euclidean Algorithm
  • Calculate h, which is gx mod p
  • User choose vote and k, a random encryption
    number
  • Encrypt rgk mod p, thkgvote mod p
  • Vote can be either 1 for yes or -1 for no.

30
El Gamal Basics
  • When all the votes are collected, multiply rs
    and ts.
  • r1r2r3rn, t1t2t3tn
  • This gives a sum of votes in the exponent because
    multiplying like bases causes an addition in
    exponents.
  • Decrypt this product of votes to receive M, which
    is g(net number of votes)

31
Extended Euclidean Algorithm
  • The Extended Euclidean Algorithm is used to
    calculate an acceptable value of x.
  • This is needed because El Gamal encryption uses g
    and g inverse, but needs to use only integer
    numbers.
  • If we choose g6, then mathematically, g
    inverse1/6. The Extended Euclidean Algorithm
    calculates an acceptable integer inverse of g.
    The integer is the inverse for the encryption.
  • The algorithm gives g inverse3, if we choose
    g6.

32
Extended Euclidean Algorithm-MATLAB
  • function xexteucalg(x,y)
  • a0x xg
  • b0y yp for el gamal
  • t00
  • t1
  • s01
  • s0
  • rmod(a0,b0) ra0-qb0 is the remainder
  • q(a0-r)/b0 need only result with no
    remainder
  • while rgt0
  • tempt0-qt
  • t0t
  • ttemp
  • temps0-qs
  • s0s
  • stemp
  • a0b0
  • b0r
  • rmod(a0,b0) ra0-qb0 is the
    remainder

33
Decryption
  • We decrypt the product of votes to get g(net
    number of votes) as described above.
  • If our answer comes out as x, or g-1, we have to
    compare to see if that is a correct answer. This
    can be checked. x1 mod p corresponds to one no
    vote.
  • If x3, and the result comes out as 3, we know
    there was a net of one no vote because p is
    always larger than x.
  • If we get 10 from the decryption, we check with
    x3 mod p. x3, so x327, mod p10. We know this
    corresponds to 3 no votes.

34
Testing and Evaluation-Software
  • I tested my code by running the algorithms in
    MATLAB.
  • I found many errors this way, and I discovered
    that the encryption and decryption do not work if
    integers are not used, prompting questions that
    led to the Extended Euclidean Algorithm.
  • There were some problems with this method of
    testing.
  • MATLAB rounds to 15 significant digits, which
    really limits the capabilities of the algorithm.

35
Testing and Evaluation-Software
  • I wrote the code in C, and then I went through
    the flowcharts and updated them.
  • I made sure everything flowed logically in the
    code.
  • I compiled the code, and finally had success
    after much troubleshooting. The code will
    definitely have errors, but without anything to
    test it on, I cannot find any more.
  • There are some warnings about the pointers used
    in the transceiver code, but I tried fixing the
    syntax, and nothing helped.

36
Problems Encountered-Software
  • I encountered many problems with the software,
    which have been mentioned previously.
  • Needing integers for encryption and decryption to
    work
  • MATLAB rounding errors
  • Nothing to test code on
  • Inadequate understanding of the algorithms
  • Most of these have been fixed, but some are
    unresolved.
  • My routines do not work well in MATLAB because of
    the rounding/cutoff of numbers.
  • I still have nothing to test the C code on.

37
Problems Encountered-Hard/Software
  • We came across an issue with the LCD in the
    breadboard.
  • The LCD will not write characters.
  • We thought the pins were mixed up, but switching
    pins did not help.
  • The issue is still unresolved.

38
Problems Encountered-Hardware
  • The values of the inductors and capacitors in the
    application circuit were very small.

39
Problems Encountered-Transceiver
  • We had quite a few problems with the transceiver.
  • Mentioned previously, we tried to build our own
    adaptor to put the chip on a breadboard, but that
    failed because of the small size.
  • We didnt know how to write driver and
    initializer code.
  • We finally ordered the application circuit, but
    we did that too late.

40
Lessons Learned-Transceiver
  • We learned to ask around to see if there is a
    simpler transceiver that others know how to use.
  • We learned to look for an application circuit
    early and use that rather than take the long way.
  • The application circuit came with driver code,
    which saved a ton of time.

41
BUDGET
Item Per unit Cost Quantity Cost ()
PIC 18F4620 7.94 3 23.82
LCD 16X4 23.82 2 47.64
LM7805 0.6 3 1.2
Keypad 6.95 2 13.9
20 MHz crystal 1.7 2 2.14
RF Transceiver 1.99 2 3.98
Daughter Board For MRF49XA 39.99 2 79.98
Total 172.66

42
Software Future Work
  • There is much work that could be done to improve
    the software algorithms for this project.
  • Error checking code
  • The transceiver code can be refined to work more
    efficiently.
  • There may also be a need to use larger variable
    types or break the large numbers into smaller
    pieces to implement the larger encryption.

43
Software Future Work
  • To be effective, the encryption needs to use
    larger numbers. The article that this idea came
    from stated that a 200-300 digit prime number was
    needed to make the algorithm secure.
  • The rest of the requirements also need to be
    implemented.
  • This includes digital signatures, which was one
    of our requirements as well
  • Other requirements for the secure voting system
    are verifiability, robustness, and authorization.

44
Software Future Work
  • There are many ways this code could be made
    better.
  • One suggestion we received during our
    demonstration was to change our encryption
    numbers periodically and keep track of how many
    votes were recorded during certain time periods.
  • This scheme could be implemented, and it would
    take a lot of work. It would be interesting.
  • To take into consideration there would need to
    be a threshold number of votes before the numbers
    could change to ensure privacy.

45
Hardware Future Work
  • Can redesign all the hardware
  • Use a simpler transceiver such as the Xbee, which
    other groups have used successfully
  • Include serial port interface on the PCB for
    downloading code directly to PIC without removing
    from PCB

46
Hardware Future Work
  • Redesign PCB to be smaller
  • Enclose in box
  • Add batteries and switches to each module
  • Many of these were supposed to be done this
    semester.

47
Summary
  • We have software algorithms that work
  • There is nothing to test the C code on
  • Hardware does not work at all, though the circuit
    should be correct
  • We did not implement digital signatures
Write a Comment
User Comments (0)
About PowerShow.com