Securing digital data from unauthorized access throughout its entire lifecycle has been always a critical concern. A robust data security system should protect the information assets of any organization against cybercriminal activities. The Twofish algorithm is one of the well-known symmetric key block cipher cryptographic algorithms and has been known for its rapid convergence. But when it comes to security, it is not the preferred cryptographic algorithm to use compared to other algorithms that have shown better security. Many applications and social platforms have adopted other symmetric key block cipher cryptographic algorithms such as the Advanced Encryption Standard (AES) algorithm to construct their main security wall. In this paper, a new modification for the original Twofish algorithm is proposed to strengthen its security and to take advantage of its fast convergence. The new algorithm has been named Split-n-Swap (SnS). Performance analysis of the new modification algorithm has been performed using different measurement metrics. The experimental results show that the complexity of the SnS algorithm exceeds that of the original Twofish algorithm while maintaining reasonable values for encryption and decryption times as well as memory utilization. A detailed analysis is given with the strength and limitation aspects of the proposed algorithm.

Data security has become a burning issue in the past decade as the amount of data over the Internet increases exponentially every day especially after the introduction of cloud computing technologies. Critical transactions and sensitive data are required to traverse daily over the Internet. All data platforms such as e-banking platforms [

Various symmetric key block cipher cryptographic algorithms provide a good level of security and have been adopted by many platforms, but with the enormous introduction of new technologies, new levels of security should be introduced as well. Previous security algorithms may not be the best choice for todays’ needs. Either new cryptography algorithms should be developed, or extra complexity should be added to existing algorithms.

Twofish is a symmetric key cryptography algorithm developed by Bruce Schneier and was one of the five finalists of the Advanced Encryption Standard contest. Over the past years Twofish has been used in a number of firms to secure their infrastructure. However, other cryptography algorithms such as AES or Rivest’s cipher (RC) are considered more favorable and much appealing because of their better security. While such algorithms may be of better security, their slow convergence is still an issue. Twofish has proven to be one of the fastest cryptography algorithms.

In this paper, a modification for the Twofish algorithm have been proposed, namely Split-n-Swap (SnS), to strengthen the security via increasing the complexity of the algorithm. Several metrics have been used to test the performance of the proposed algorithm. The paper is organized as follows: Related work is given in Section 2. An overview of the Twofish algorithm is given in Section 3. An explanation of Split-n-Swap algorithm is given in Section 4. Experimental results and conclusion are given in Sections 5 and 6 respectively.

Since the introduction of new technologies and platforms such as cloud computing, Internet of Things (IoT), and social networking as an important paradigm to access and share data and resources over this huge network, an emergent security issue has raised to secure such data. And despite of other major concerns of these technologies such as performance and cost [

A number of reviews has been introduced to compare between various symmetric and non-symmetric cryptography algorithms [

Several modifications have been done to enhance some block cipher algorithms. In [

Another try by [

A new idea was published by [

In [

In [

In [

The authors in [

The authors in [

Twofish is considered one of the symmetric key block cipher cryptography algorithm.

It is designed by Bruce Schneier [

In each round of Twofish, two 32-bit words are used as an input to the F function. Each word is divided into four bytes. Those four bytes are sent to four different key-dependent S-boxes. The four output bytes (the S-boxes have 8-bit input and output) are combined using a Maximum Distance Separable (MDS) matrix to form a 32-bit word. Then the two 32-bit words are combined using a Pseudo-Hadamard Transform (PHT), added to two round subkeys, then XORed with the right half of the divided text. There are also two 1-bit rotations going on, one before and one after the XOR. Twofish also use what is so called the “prewhitening” and “postwhitening” additional subkeys are XORed into the text block both before the first round and after the last round.

The g function of the Twofish Algorithm receives 32-bits data divided into four 8-bits. In the original Twofish the four 8-bits are fed directly to the S-boxes. In the modifying proposed algorithm, a Split and Swap operation is made to the four 8-bits prior to the entry of S-boxes, as shown in

Let’s divide the 32-bits input to the g function into four bytes _{1}_{2}_{3}_{4}

Split each _{i}_{i}

Constitute new four bytes _{1}_{2}_{3}_{4}

Feed the resulting _{1}_{2}_{3}_{4}

In this section, computational analysis is given to measure the performance of the Split-n-Swap algorithm compared to the original Twofish algorithm. Four performance metrics have been examined which are: Encryption/Decryption Time and Encryption/Decryption memory utilization.

Encryption/Decryption Time can be defined as the amount of time needed by the cipher algorithm to encrypt or decrypt the cipher text. Both

File type | File size | Encryption time in msec | ||
---|---|---|---|---|

Towfish | SnS | AES | ||

JPG | 96 KB | 565.63 | 499.11 | 552.67 |

TXT | 116 KB | 646.12 | 660.29 | 756.4 |

324 KB | 1646.31 | 2136.45 | 1668.18 | |

PPT | 1.29 MB | 6700.8 | 8875.93 | 6593.46 |

MP3 | 2.04 MB | 10641.16 | 13290.57 | 10450.02 |

MP4 | 2.13 MB | 11053.33 | 13906.69 | 10797.49 |

File type | File size | Decryption time in msec | ||
---|---|---|---|---|

Towfish | SnS | AES | ||

JPG | 96 KB | 485.12 | 594.02 | 492.23 |

TXT | 116 KB | 588.11 | 798.02 | 615.84 |

324 KB | 1617.94 | 2650.39 | 1660.3 | |

PPT | 1.29 MB | 6408.95 | 8471.77 | 6667.7 |

MP3 | 2.04 MB | 10330.41 | 12515.73 | 10449.53 |

MP4 | 2.13 MB | 10699.38 | 13073.78 | 10966.1 |

Encryption/Decryption memory utilization is another important metric that should be taken into account when designing a cipher model.

File type | File size | Memory utilization in KB | ||
---|---|---|---|---|

Towfish | SnS | AES | ||

JPG | 96 KB | 176.63 | 151.67 | 134.34 |

TXT | 116 KB | 142.31 | 255.705 | 225.68 |

324 KB | 717.81 | 861.26 | 340.29 | |

PPT | 1.29 MB | 138.92 | 870.89 | 1463.37 |

MP3 | 2.04 MB | 3556.91 | 2198.02 | 2251.3 |

MP4 | 2.13 MB | 3710.92 | 2406.44 | 2353.59 |

File type | File size | Memory utilization in KB | ||
---|---|---|---|---|

Towfish | SnS | AES | ||

JPG | 96 KB | 325.60 | 356.81 | 124.13 |

TXT | 116 KB | 436.42 | 209.15 | 225.66 |

324 KB | 562.15 | 747.96 | 450.3 | |

PPT | 1.29 MB | 487.16 | 613.41 | 1463.37 |

MP3 | 2.04 MB | 3719.82 | 3716.50 | 2200.21 |

MP4 | 2.13 MB | 3344.24 | 3342.31 | 2328.07 |

It can be seen from the tables and the figures that the complexity added to SnS didn’t affect the memory utilization performance. Moreover, at some instances SnS performs better than both the original Twofish and AES algorithms.

Twofish has been always considered a flexible design that can be implemented over a wide range of hardware and software platforms. In this paper, Split-n-Swap, a novel modification of the Twofish algorithm has been proposed to increase its security level by increasing the complexity based on interbit exchange of the g function input. The experimental results show that the proposed model has increased the complexity of the original Twofish algorithm yet keeps a reasonable encryption/decryption times and memory utilization. Even when compared to AES algorithm, the proposed model gives better results over text and image files.