Enhanced security of affine ciphers using digraph transformation and a modified three pass protocol - Bete, Seble; Demilew, Samuel Asferaw; Woldegiworgis, Tefera Alagaw; Tsegaye, Getaneh Geto; Girmaw, Dagne Walle (Scientific reports, 2025)
Ensuring secure data transmission over public channels remains a fundamental challenge in modern communication systems. Cryptography, through encryption and decryption processes, is vital for protecting sensitive information from unauthorized access. Various symmetric and asymmetric cryptographic algorithms are used for this purpose, including Caesar, Affine, Vigenère, Hill ciphers, DES, AES, elliptic curve cryptography, ElGamal, and RSA. Among them, the Affine cipher is a monoalphabetic substitution cipher designed to convert plaintext into unreadable ciphertext to prevent intrusion. Although modified versions of the Affine cipher—such as those incorporating digraph transformation and squared modulus—have attempted to enhance security, they continue to suffer from vulnerabilities such as insecure key exchange, predictable ciphertext patterns, and padding-related ambiguities, especially with odd-length plaintexts. To overcome these limitations, we propose an enhanced Affine cipher algorithm that integrates a digraph transformation and a modified three-pass protocol for secure key exchange. This approach eliminates the need for padding characters, supports encryption of odd-length messages, expands the key space, and significantly improves overall security. We evaluated our method against both the original and modified Affine ciphers using key metrics including the avalanche effect, confusion and diffusion properties, encryption/decryption time, and resistance to brute-force and frequency analysis attacks. Our proposed method achieved a 75% avalanche effect, demonstrated better confusion and diffusion, and showed superior resistance to common cryptanalysis techniques. It also ensured secure key exchange between sender and receiver using the modified three-pass protocol and avoided padding, thereby reducing memory usage and processing time while resolving ciphertext ambiguity. Overall, the enhanced Affine cipher significantly outperforms existing approaches in both security and efficiency, and future work may focus on extending its application to multimedia data and further optimizing its computational performance.