Extended-Chacha20 Stream Cipher With Enhanced Quarter Round Function
Victor R. Kebande
Abstract
Chacha20 is a widely-used stream cipher known for using permutation functions to enhance resistance against cryptanalysis. Although the existing literature highlights its strengths, it is worth further exploring its susceptibility to potential differential attacks. This paper proposes an Extended Chacha20 (EChacha20) stream cipher, which offers a slight improvement of Chacha20. It incorporates enhanced Quarter Round Functions <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">QR-F</i> with 32-bit input words and <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">Add</i> , <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">Rotate</i> , and <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">XOR (ARX)</i> operations on 16, 12, 8, 7, 4, and 2 constants. Using these improved <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">QR - Fs</i> , we expect EChacha20 to be more secure and effective against attacks than Chacha20. The threat model considers attacker assumptions based on Bellare-Rogaway Model (B-RM) and the Chosen Plaintext Attack (CPA) to assess the potential security weaknesses. Then the study analyzes the EChacha20 cipher using the NIST Statistical Test Suite (NSTS) and demonstrates its effectiveness against differential cryptanalysis. A differential attack is considered to address this challenge, where the study comprehensively analyses the differences between original and flipped bits. The NSTS has been used to analyze the outcome for uniformity statistically and to evaluate the randomness of generating sequences of tests with consideration of 1000 tests based on a range of [0, 1]. Uniformity is evaluated based on the <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">p - values</i> test against a battery of <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">passing sequences</i> and 100% is achieved from <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">Runs</i> and <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">Serial</i> (2) : <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">Test</i> 1 respectively.The performance evaluation metrics leveraged include encryption speed, decryption speed, and memory usage. Based on the test conducted, it has been observed that with increased <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">QR - F</i> , EChacha20 maintains a good balance in speed although slightly higher than Chacha20; however, with also slightly high memory usage compared to Chacha20. Despite that, a comparative study has been conducted against state-of-the-art studies, and the outcome has been reported to show the significance of the current study. Ultimately, the outcome indicates that the EChacha20 cipher has improved <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">QR - F</i> and security properties compared to Chacha20 and may provide a more robust encryption solution for various applications.