Skip to main content

Posts

Showing posts from December, 2014

Play Fair Cipher (Version 2-with some corrections)

In my last post, I attached a file ( PlayFairCipher.java ) as my Play Fair Cipher Crypto System. But, I found out that it has an error when converting single row or column-wise words (E.g. WORD, PICO). Hence, I re-edited the file and my second version of it. Now it was working as expected. File : PlayFairCipherv2.java Comments are welcome.

Play Fair Cipher

The best-known multiple-letter encryption cipher is the Play fair, which treats diagrams in the plaintext as single units and translates these units into ciphertext diagrams.3 The Playfair algorithm is based on the use of a 5 × 5 matrix of letters constructed using a keyword. This cipher was actually invented by British scientist Sir Charles Wheatstone in 1854, but it bears the name of his friend Baron Playfair of St.Andrews, who championed the cipher at the British foreign office. We had to create our own version of PlayFairCipher. I used Java as my Programming language and created this file  PlayFairCipher.java . My Cipher's Key is "WORD". I used 'I' instead of 'J' and 'X' for inserting within double letters

Doubts in C++ to JAVA conversion

In my Numerical Computing I recently created a C++ program to normalize a number to a certaing number. The program is  Normalization.cpp Then, I converted it to a JAVA program. But, I got an liitle bit of problem when converting it. If anyone know the solution, please help me. The converted ptogram is  RelativeError.java

Caesar Cipher

Let's Look at "The Caesar Cipher." The earliest known, and the simplest, use of a substitution cipher was by Julius Caesar. The Caesar cipher involves replacing each letter of the alphabet with the letter standing a number of places further down the alphabet. I implemented in JAVA with a custom shift number(which a user gives as input) to encrypt and decrypt. And my Key consists of Alpha(Capital and simple, one after other)-numeric. But not for the special characters. I divided it into two files. That CSKey.java (Caesar Cipher Key) and CaesarCipher.java which contains the main method.