Stringology-Based Cryptanalysis for EChaCha20 Stream Cipher
Abstract
Stringology-Based Cryptanalysis (SBC) offers a suitable and a structurally aligned approach for uncovering structural patterns in stream ciphers that traditional statistical tests may often fail to detect. Despite EChaCha20's design enhancements, no systematic investigation has been performed to determine whether its expanded 6×6 state matrix and modified Quarter-Round Function (QR-F) introduce subtle keystream patterns, rotational biases, or partial collisions that could serve as statistical distinguishers. As such, addressing this gap is critical to ensure that the cipher's modifications do not unintentionally reduce its security margin. Therefore, this paper leverages Knuth-Morris-Pratt (KMP) and Boyer-Moore (BM) algorithms to analyze EChaCha20, which is a variant of ChaCha20 that features an expanded 6×6 state matrix and an enhanced QR-F. The author has developed and optimized adaptations of the KMP and BM algorithms for 32-bit word level pattern analysis and employed them to investigate m-bit pattern frequency distributions to assess the EChaCha20's resistance of rotational-differential attacks. Our experimental results on large-scale one million keystream datasets have confirmed that EChaCha20 is able to maintain strong pseudorandomness at 16-bit and 32-bit levels with minor irregularities observed in the 8-bit domain. In addition to these, the differential tests have indicated a rapid diffusion, exhibiting an avalanche effect after two QR-F rounds and no statistically significant rotational collisions were observed within the evaluated bounds, consistent with expected ARX diffusion behavior beyond 3 rounds. This work puts forward SBC as a complementary tool for ARX cipher evaluation and provide new thoughts on the security properties of EChaCha20.
Turn this paper into a lesson
ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.