Copyright © infotec016 . Powered by Blogger.

Thursday, April 20, 2017

Cryptography


Crypto System Cryptographic system are characterized along 3 independent dimensions The type of operation transforming plain text to cipher text The number of keys used The way in which plain text is processed. Substitution techniques Caesar Cipher Monoalphabatic Cipher Playfair Cipher Hill Cipher Polyalphabatic Cipher Transposition techniques Rail fence Cipher Columnar transp...

Cryptography : Caesar Cipher


Caesar Cipher Sample java code for Caesar Cipher key : each letter shift of two in alphabet order caesar cipher encryption eg: hello -----------jgnnq encryption import java.util.*; public class encryption{ public static void main(String args[]){ Scanner...

Cryptography : Vigenere Cipher


Vigenere Cipher Sample java code for Vigenere Cipher Encryption //Vigenere cipher encryption import java.util.*; public class vigenere_encry{ public static void main(String args[]){ Scanner myscanner=new Scanner(System.in); String alpha="abcdefghijklmnopqrstuvwxyz"; ...

Cryptography : Playfair Cipher


Playfair Cipher Sample java code for Playfair Cipher Encryption //playfair encryption: i and j count as one letter import java.util.*; public class playfair_encry{ public static void main(String args[]){ Scanner myscanner=new Scanner(System.in); System.out.println("Enter the keyword"); String key=myscanner.nextLine().toLowerCase().replace(" ","").replace("j","i"); ...

Cryptography : Railfence Cipher


Railfence Cipher Sample java code for Railfence Cipher Key = 2 Encryption //key=2 import java.util.Scanner; public class Railfence_encry{     public static void main(String args[]){         Scanner myscanner =new Scanner(System.in);         System.out.println("Enter the plaintext");         String word=myscanner.nextLine().replace("...

Cryptography : Railfence Cipher


Railfence Cipher Sample java code for Railfence Cipher Key = 3 Encryption //key=3 import java.util.*; public class Railfence1_encry{     public static void main(String args[]){         Scanner myscanner =new Scanner(System.in);  ...