An Improved Algorithmic Implementation of Rail Fence Cipher

  • Samarth Godara
  • Shakti Kundu
  • Ravi Kaler


In today’s world, internet is one of the biggest platforms where huge amount of information had been exchanged to fulfil the individual’s objective or purpose. Due to this overall scenario, internet has really called for vital security. The increase number of data transfers via electronic means from one system to the other has an extensive growth in the past few years. Before the mode of transfer, there are a number of algorithms available for encrypting data and transportation ciphers. They are widely used along with other ciphers to increase the encryption complexity in order to form a product cipher [1]. The rail fence cipher is a form of transposition cipher which is also referred as zigzag cipher. The working is preceded in a manner that it extracts information via approach in which it is encoded. The same key is used for both encryption and decryption via rail fence cipher which is one of the categories of data encryption algorithm. The number of rows used to breakup data to be encrypted into rows and column arrangement which acts as the key in rail fence cipher [3]. This paper proposed an algorithm to implement rail fence transposition cipher in the time and space complexity of O(n), further we discussed the optimized rail number which gives best randomness in the cipher and a new method has been proposed using rail fence cipher to increase the complexity of the cipher, without increasing the time complexity of the encryption algorithm.