Skip to main content

Posts

Railfence Cipher

The rail fence cipher (also called a zigzag cipher) is a form of transposition cipher. It derives its name from the way in which it is encoded. In the rail fence cipher, the plaintext is written downwards and diagonally on successive "rails" of an imaginary fence, then moving up when we reach the bottom rail. When we reach the top rail, the message is written downwards again until the whole plaintext is written out. The message is then read off in rows. The file is available below railfence.java Feb 11, 2015

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.