• Tidak ada hasil yang ditemukan

BAB V : Kesimpulan dan Saran

DAFTAR PUSTAKA

Agustina, E.R. & Kurniati, A. 2009. Pemanfaatan Kriptografi dalam Mewujudkann Keamanan Informasi Pada e-Voting di Indonesia. Seminar Nasional Informatika UPN. Yogyakarta: hal. 22-28.

Ariyus, D. 2008. Pengantar Ilmu Kriptografi (Teori, Analisis dan Implementasi). Yogyakarta: Andi.

Azhari, R. 2005. E-voting. Jakarta: Fakultas Ilmu Komputer UI.

Azhari, R. 2005. Studi dan Perbandingan Penggunaan Kriptografi Kunci Simetri dan Asimetri pada Telepon Seluler. Bandung: Institut Teknologi Bandung.

Brian, F. 2000. RSA Releases Patent Early. InfoWord. 22: hal. 27.

Blaha, M & Premerlani, W. 1998. Object-oriented Modeling and Design for Database applications. New Jersey: Prentice-Hall.

Daemen, J. & Rijmen, V. 1999. AES Proposal: Rijndael. (Online) http://csrc.nist.gov/archive/aes/rijndael/Rijndael-ammended.pdf (07 September 2014).

E-voting Hemat dan Aman: Pemilu Langsung Investasi Masa Depan Demokrasi Indonesia. 2014. Harian Kompas, 13 Semptember 2014.

Gallaugher, J and Ramanathan, S. 1996. Three Critical Choice of Client Server Architecture : A Comparison of two and three tier System, Auerbach Publications, New York.

Garfinkel, S. 1995. PGP: Pretty Good Privacy, O'Reilly & Associates, Inc.

Gefen, D., Rose, G.M., Warkentin, M., & Pavlou, P.A. 2005. Cultural diversity and trust in IT adoption : A comparison of potential e-voters in the USA and South Africa. Journal of Global Information Management Vol. 13 : 54-78.

Hajjar, M., Daya, B., Ismail, A., & Hajjar, H. 2006. An e-voting system for Lebanese elections. Journal of Theoretical and Applied Information Technology : 21-29. Kahani, M. 2005. Experiencing small-scale e-democracy in Iran. The Electronic

Journal On Information Systems in Developing Countries Vol 22 : 1-9.

Kurniawan, Y., M.T. 2004, Kriptografi: Keamanan Internet dan Jaringan Komunikasi. Penerbit Informatika Bandung, Yogyakarta

Menezes, A.J. 1997. Handbook of Applied Cryptography. CRC Press.

Mollin, R. A., 2002. RSA and Public Key Cryptography. Chapman & Hall/CRC . Munir, R. 2004. Bahan Kuliah IF5054Kriptografi Departemen Teknik Informatika

ITB. (Online)

http://informatika.stei.itb.ac.id/~rinaldi.munir/Kriptografi/Steganografi%20dan %20Watermarking.pdf (06 September 2014).

Munir, R. 2005. Penggunaan Tanda Tangan Digital untuk Menjaga Integritas Berkas Perangkat Lunak. (Online)

http://journal.uii.ac.id/index.php/Snati/article/viewFile/1364/1145 (07 September 2014).

Munir, R. 2006. Kriptografi. Informatika Bandung : Bandunng.

Nechvatal J. et al. 2000. Report on the Development of the Advanced Encryption Standard (AES). Computer Security Division Information Technology Laboratory National Institute of Standards and Technology Administration U.S. Department of Commerce.

Pardede, P.S.P. 2012. Analisis dan Perancangan Keamanan Informasi Pada Electronic Voting Menggunakan Algoritma Kriptografi Kunci Publik. Skripsi. Universitas Sumatera Utara.

Permadi, R.B. 2014. Sistem E-Voting Menggunakan Protokol Two Central Facilities dengan Menggabungkan Algoritma AES dan RSA sebagai Kombinasi Keamanan. Skripsi. Universitas Pendidikan Indonesia.

Priyono, E & Dihan, F.N. 2010. E-Voting : Argensi Transparansi dan Akuntabilitas. Seminar Nasional Informatika UPN Yogyakarta: hal. 55-62.

Rokhman, A. (2011). Prospek dan Tantangan Penerapan e-Voting di Indonesia. Seminar Nasional Peran Negara dan Masyarakat dalam Pembangunan Demokrasi dan Masyarakat Madani di Indonesia 7 Juli 2011. Jakarta: Universitas Terbuka.

Schneier, B. 1996. Applied Cryptography, Second Edition: Protocols, Algorithms, and Source Code in C. John Willey & Sons, Inc.

Stallings, W. 2003. Cryptography and Network Security Principles and Practice. Third Edition. New Jersey: Pearson Education.

Sulistyanto, H. (2004) Autentikasi dalam Basis Data Jaringan Menggunakan Kriptosistem Kunci Publik RSA. EMITOR, Jurnal Teknik Elektro dan Komputer, Vol.4 (No.1). pp. 39-48.

Wisnu, D.A.M.G. 2014. Rancang Bangun Sistem E-Voting dengan Menerapkan Hash dan Digital Signature untuk Verifikasi Data Hasil Voting. Skripsi. Universitas Brawijaya.

Zafar, Ch.N. & Pilkzaer, A. 2007. E-voting in Pakistan. Master Thesis, Departement of Business Administration and Social Sciences, Lulea University of Technology

Zamora, C.G., Henriquez, F.R., & Arroyo, D.O. 2005. SELES: An e-voting system for medium scale online elections. Proceedings of the 6th Mexican International Confrence on Computer Science.

RSA.java package voter; import java.io.* import java.math.*; import java.security.*; import java.util.*; import org.apache.commons.io.FileUtils; import sun.security.pkcs11.wrapper.Constants; public class RSA {

private BigInteger n, d, e;

String newLine = System.getProperty("line.separator"); private int bitlen = 1024;

/** Create an instance that can both encrypt and decrypt. */ public RSA(int bits) {

bitlen = bits;

SecureRandom r = new SecureRandom();

BigInteger p = new BigInteger(bitlen/2 , 100, r); BigInteger q = new BigInteger(bitlen/2 , 100, r); n = p.multiply(q); BigInteger m = (p.subtract(BigInteger.ONE)).multiply(q .subtract(BigInteger.ONE)); do { e = new BigInteger(bitlen, r); }while( (e.compareTo(m) != 1) || (e.gcd(m).compareTo(BigInteger.valueOf(1)) != 0)); d = e.modInverse(m); }

/** Encrypt the given plaintext message. */

public synchronized String encrypt(String message) {

PrintingTask.print("Modulus : " + newLine + n + newLine + newLine + "Private Key : " + newLine + d);

return (new BigInteger(message.getBytes())).modPow(e, n).toString();

}

public synchronized BigInteger encryptWithKey(BigInteger message) { BigInteger pubKey = null;

BigInteger modulus = null; try {

File dist = new File("ext/Dist.txt");

pubKey = new BigInteger(FileUtils.readLines(dist).get(0)); modulus = new BigInteger(FileUtils.readLines(dist).get(2)); } catch (Exception ex) {

Logger.getLogger(RSA.class.getName()).log(Level.SEVERE, null, ex);

}

//return new String((new

BigInteger("test".getBytes())).modPow(pubKey, modulus).toByteArray());

return message.modPow(pubKey, modulus); }

/** Encrypt the given plaintext message. */

public synchronized BigInteger encrypt(BigInteger message) { PrintingTask.print("Modulus : " + newLine + n + newLine + newLine + "Private Key : " + newLine + d);

return message.modPow(e, n); }

/** Decrypt the given ciphertext message. */

public synchronized String decrypt(String message, BigInteger priKey, BigInteger modulus) {

return new String((new BigInteger(message)).modPow(priKey, modulus).toByteArray());

}

public synchronized BigInteger decryptWithKey(BigInteger message) { BigInteger priKey = null;

BigInteger modulus = null; try {

File dist = new File("ext/Dist.txt");

priKey = new BigInteger(FileUtils.readLines(dist).get(1)); modulus = new BigInteger(FileUtils.readLines(dist).get(2)); } catch (Exception ex) {

Logger.getLogger(RSA.class.getName()).log(Level.SEVERE, null, ex);

}

return message.modPow(priKey, modulus); }

/** Decrypt the given ciphertext message. */

public synchronized BigInteger decrypt(BigInteger message, BigInteger priKey, BigInteger modulus) {

return message.modPow(priKey, modulus); }

public synchronized BigInteger decrypt(BigInteger message) { System.out.println("Ini priKey : " +d );

System.out.println("Ini Mod : " +n ); return message.modPow(d, n);

}

public static void main(String[] args) { } } AES.java package TPS; import java.io.*; import java.math.*; import java.security.*; import java.util.*; import javax.crypto.*;

public class AES {

Cipher ecipher; Cipher dcipher;

{

// Create an 8-byte initialization vector byte[] iv = new byte[]

{

0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f

};

AlgorithmParameterSpec paramSpec = new IvParameterSpec(iv); try { ecipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); dcipher = Cipher.getInstance("AES/CBC/PKCS5Padding");

// CBC requires an initialization vector ecipher.init(Cipher.ENCRYPT_MODE, key, paramSpec); dcipher.init(Cipher.DECRYPT_MODE, key, paramSpec); } catch (Exception e) { e.printStackTrace(); } }

// Buffer used to transport the bytes from one stream to another byte[] buf = new byte[1024];

public static SecretKey generateAESKey() throws NoSuchAlgorithmException

{

KeyGenerator keyGenerator = KeyGenerator.getInstance("AES"); keyGenerator.init(128); // 128 default; 192 and 256 also possible

SecretKey key = keyGenerator.generateKey(); WriteKeytoFile(key);

return key; }

public static void WriteKeytoFile(SecretKey key) { FileWriter fileWriter = null;

byte[] encodedKey = key.getEncoded(); try {

String strKey = new BigInteger(encodedKey).toString(16); File file = new

File(TPSPanel.TPS+TPSPanel.Distribute+"key"); fileWriter = new FileWriter(file); fileWriter.write(strKey); } catch(Exception e) { e.printStackTrace(); }finally { try { fileWriter.close(); } catch (IOException ex) {

ex.printStackTrace(); }

} }

public static String readKeyFile( String file ) throws IOException {

BufferedReader reader = new BufferedReader( new FileReader (file));

String line = null;

StringBuilder stringBuilder = new StringBuilder(); while( ( line = reader.readLine() ) != null ) { stringBuilder.append( line );

}

String strKey = stringBuilder.toString(); return strKey;

}

public static SecretKey LoadKey(String strKey) {

byte[] encoded = new BigInteger(strKey, 16).toByteArray(); SecretKey key = new SecretKeySpec(encoded, "AES");

return key; }

public void encrypt(InputStream in, OutputStream out) {

try {

out = new CipherOutputStream(out, ecipher); int numRead = 0;

while ((numRead = in.read(buf)) >= 0) { out.write(buf, 0, numRead); } out.close(); in.close(); } catch (java.io.IOException e) { } }

public void decrypt(InputStream in, OutputStream out) {

try {

in = new CipherInputStream(in, dcipher); int numRead = 0;

while ((numRead = in.read(buf)) >= 0) { out.write(buf, 0, numRead); } out.close(); } catch (java.io.IOException e) { } }

public static void main(String args[]) {

} }

Dokumen terkait