90 likes | 212 Views
This overview delves into the main components of a Java-based e-voting system, covering both server and client aspects. The server employs a certificate management server while the client runs a Java service utilizing secure sockets for communication. Essential requirements include digital certificates, encryption algorithms, secure random number generation, and ballot handling. The implementation utilizes the Bouncy Castle library for cryptographic support and JCE for encryption functions. The system is designed to be secure, open-source, and user-friendly, appealing to developers interested in e-voting solutions.
E N D
CS691E-Voting System An Implementation overview
Main components • Language : JAVA. • Server: A Certificate management server. • Client: A Java service running. • Communication: Java Secure Sockets.
Implementation’s requirements • Digital Certificates. • Sockets. • Encryption. (Symmetric + Public Key). • Ballots. • Hash functions. • Secure Random Numbers. • XML.
DCs • Bouncy Castle library. • Open source. • Totally FREE. • A provider for the JCE. • Works for everything from J2ME to JDK1.5 • Supports V1 & V3 X509 Certificates, V2 CRLs and PKCS12 files, and much more … • http://www.bouncycastle.org/index.html
Sockets • JSSE (Java Secure Socket Extension) • Pure Java implementation. • Implements SSL V3 & TLS 1.0. • SSLSocket & SSLServerSocket classes. • HTTPS support. • Package: javax.net.ssl
Encryption & Hash functions • JCE (Java Cryptography Extension) • Before 1.5, it was optional. • The JDK 5.0 release comes standard with a JCE provider named "SunJCE", which comes pre-installed and registered. • Supports: DES, 3DES, Blowfish, AES, MD5, SHA1, DH, HMAC, RC2, RC4, RSA, Secure Random Numbers, …. • Packages: java.security & javax.crypto
Creating a JTable Ballot • These things are pretty easy to create, and they serve our purpose quite well, best of all they’re serializable … jTable = new JTable(data, columnNames){ public Class getColumnClass(int c) { return getValueAt(0, c).getClass(); } }; Object[][] data = { {"Should we get new computers?", Boolean.FALSE, Boolean.TRUE, Boolean.FALSE}, {"Should we eat cake?", Boolean.FALSE, Boolean.FALSE, Boolean.TRUE}, {"Here's another.", Boolean.TRUE, Boolean.FALSE, Boolean.FALSE}, {"One more.", Boolean.FALSE, Boolean.TRUE, Boolean.FALSE} };
Serialization try{ FileOutputStream fStream = new FileOutputStream("tabledata.dat"); ObjectOutput stream = new ObjectOutputStream(fStream); stream.writeObject(jTable); System.out.println(jTable); stream.flush(); stream.close(); fStream.close(); }catch (Exception e) { e.printStackTrace(); }
XML • SAX (Simple API for XML) • Package: org.xml.sax • DOM (Document Object Model) • Package: org.w3c.dom • Of course there are a LOT of java packages to deal with XML stuff: • JAXP, JAXB, JDOM, DOM4J, JAXM, JAXR, … • Apache and Oracle have tons of XML packages too