Title: CS691 E-Voting System
1CS691E-Voting System
- An Implementation overview
2Main components
- Language JAVA.
- Server A Certificate management server.
- Client A Java service running.
- Communication Java Secure Sockets.
3Implementations requirements
- Digital Certificates.
- Sockets.
- Encryption. (Symmetric Public Key).
- Ballots.
- Hash functions.
- Secure Random Numbers.
- XML.
4DCs
- 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
5Sockets
- JSSE (Java Secure Socket Extension)
- Pure Java implementation.
- Implements SSL V3 TLS 1.0.
- SSLSocket SSLServerSocket classes.
- HTTPS support.
- Package javax.net.ssl
6Encryption 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
7Creating a JTable Ballot
- These things are pretty easy to create, and they
serve our purpose quite well, best of all theyre
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, "Her
e's another.", Boolean.TRUE, Boolean.FALSE,
Boolean.FALSE, "One more.", Boolean.FALSE,
Boolean.TRUE, Boolean.FALSE
8Serialization
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()
9XML
- 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 ?