Implementation of Message Encryption Using the Digraph Affine Cypher Algorithm with Python - Aditya, Andre (PT. Technology Laboratories Indonesia (TechnoLabs), 2025)
The security of digital messages is a critical concern, necessitating robust encryption methods. While the classical Affine Cipher offers a foundational approach, its security can be enhanced. This study addresses a gap in the practical application of the Digraph Affine Cipher (DAC), a modification that encrypts character pairs (digraphs) to increase cryptographic complexity. We implemented the DAC algorithm using Python to encrypt and decrypt text files and evaluated its performance against standard Affine Cipher and ASCII-based variations. The system was tested on files ranging from 200 to 5000 characters, measuring processing time and final file size. Results showed that processing time is directly proportional to message length, with the standard ASCII Affine Cipher being the fastest and the classic DAC the slowest. Notably, the DAC produced an encrypted file size most consistent with the original plaintext, while ASCII-based versions demonstrated greater flexibility by successfully processing a wider range of symbols. The study successfully demonstrates a practical Python-based implementation of the DAC, providing a performance baseline and confirming its effectiveness in securing text data. This work serves as a foundation for developing stronger hybrid classical cryptographic techniques.