Rabu, 27 Juni 2018

Sponsored Links

Rail Fence Cipher - YouTube
src: i.ytimg.com

The rail fence cipher (also called zigzag cipher ) is a transposition cipher form. It derives its name from the way in which it is encoded.


Video Rail fence cipher



Metode

In a hedge fence, plain text is written down and diagonal on the "rails" of imaginary fences, then moves up when we reach the bottom rail. When we reach the top rail, the message is rewritten down until the entire plaintext is written. The message is then read in rows. For example, if we have 3 "rails" and a message from 'WE FOUND'. FLEE AT ONCE ', cipherer writes:

 W... E... C... R... L... T... E  . E. R. D. S O. E. E. F. E. A. O. C.  .. A... I.. V... D... E... N..  

Then read to get ciphertext:

 WECRLTEERDSOEEFEAOCAIVDEN  

Note that this particular example does NOT use spaces that separate words. The interpreter needs to add them in context. If spaces are displayed in the ciphertext, then they must be entered in a matter of letters to determine the width of the solution grid.

Keys can also be used in this cipher for example. In this example shown above has Key = 3 which means there are three rails, or three lines of text.

Maps Rail fence cipher



Solution

Here's another example to see how to completely solve the Rail Fence ciphers. We will use a 3-rail fence to encode the new phrase and insert a space between the words. Our ciphertext came out as IA_EZS_ELYLK_UZERLIPL. Note that our ciphertext has a total of 21 units (space letters). This will be important later as we try to decipher it.

To solve the cipher, you must know the height and cycle of the puzzle. Its height is just the amount of rail fence used to make it. In this example, we say that 3 rails are used, so the height is 3. The altitude will always be higher than 2 and not more than the number of letters in the ciphertext (in this case 21) or else the phrase will not be correctly encoded; Such height can be found by the elimination process if not known.

To determine the width of the puzzle, which will tell us how many units total in each row, you have to specify the letter "cycle". A "cycle" letters runs from the top row, descends through each subsequent line, and then rises again, but stops before it reaches the top row again. (The next letter in the top row will actually start the next cycle.) So the 2-rail puzzle has a "cycle" of 2 units; 3-rail puzzle has a 4-letter "cycle"; 4-rail puzzle has a 6-letter "cycle"; etc. (See below.) The mathematical equation for this is: "Cycle" = ([# rel] x 2) - 2 (because the top and bottom rows have half as many units per cycle as any middle row)).

 1. 1 1 1 1 1... 1.. 1.. 1.. 1 1..... 1.... 1.... 1.... 1  . 2 2 2 2. 2 4. 2 4. 2 4. 2 4.. 2.. 6 2.. 6 2.. 6 2.. 6  Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â.. 3.. 3.. 3.. 3... 3 5... 3 5... 3 5... 3 5..  Â Â Â Â Â Â Â Â Â · Â · Â · Â Ã Â Ã, Â Â Ã, Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â... 4..... 4..... 4..... 4...  

Example of our 3-rail fence has a "cycle" of 4 units. So divide the total units (space letters) with the number of cycles and round up the whole next number. There are 21 units in the example, so our "basic puzzle width" is 5 (21/4 = 5.25, rounding to 5). It is important to realize that there are 5 "full cycles" plus "partial cycles" of 1 letter again (5 x 4 = 20 and 20 1 = 21 units). Therefore, the top row has 6 units in it (5 "full cycle" 1 extra letters that started the 6th cycle by itself). The middle row has 10 units (5 "full cycle" x 2 units for each cycle). The bottom row has 5 units (5 "full cycles" x 1 unit for each cycle because this is the bottom row).

Take the first 6 units of our ciphertext and write in the top row, leaving plenty of space between units: [IA_EZS] _ELYLK_UZERLIPL.

 I... A... _... E... Z... S  

The middle row takes the next 10 units and adds 1 unit right afterwards and 1 unit just before each unit in the top row: IA_EZS [_ELYLK_UZE] RLIPL.

 I... A... _... E... Z... S  . _. E. L. Y. L. K. _. U. Z. E.  

The bottom line gets the last 5 units written below and between pairs of units in the middle row: IA_EZS_ELYLK_UZE [RLIPL].

 I... A... _... E... Z... S  . _. E. L. Y. L. K. _. U. Z. E.  .. R... L.. Me.. P.. L.  

Now just follow the down-up-down-up pattern to determine the original message: I_REALLY_LIKE_PUZZLES!

Rail Fence Cipher Program In Php - Best Fence For Security 2017
src: www.thecrazyprogrammer.com


Problem with rail fence cipher

Cipher fence fence is not too strong; the number of practical keys (number of rails) is small enough that cryptanalyst can try everything by hand.

EPISODE 3 Rail Fence Cipher - YouTube
src: i.ytimg.com


Zigzag cipher

The term zigzag cipher may refer to the encryption fence as described above. However, this can also refer to different types of cipher systems that look like zigzag lines that come out from the top of the page down. As described in Fletcher Pratt Secret and Urgent , it "is written by ruling a sheet of paper in a vertical column, with the letter on the head of each column.A point is created for each letter of the message in the appropriate column, reading from top to bottom of the sheet.The letters at the top of the column are then cut, the verdict is deleted and the message dots are sent to the receiver, who, knowing the column width and setting the letters at the top, rearranges the diagram and reads what it says. "

2 Rail Fence Cipher - Best Fence 2018
src: www.elblender.com


See also

  • Cipher Transposition
  • Scytale

Rail Fence Cipher (NETWORK SECURITY) - YouTube
src: i.ytimg.com


References

  • Helen FouchÃÆ' Ã… © Gaines, Cryptanalysis, study of cipher and its solution , Dover, 1956, ISBNÃ, 0-486-20097-3

Practical Questions Theoretical Questions - ppt download
src: slideplayer.com


External links

  • American Cryptogram Association - Railfence
  • online cipher (archive)
  • The Railfence Cipher

Source of the article : Wikipedia

Comments
0 Comments