Abstract
<title>Abstract</title> <p>The rapid expansion of digital information exchange across modern communication infrastructures has increased the need for cryptographic techniques that can securely protect binary data of arbitrary formats while maintaining computational efficiency. Traditional Hill Cipher schemes provide an elegant matrix-based encryption mechanism; however, their practical adoption is limited by the difficulty of generating invertible key matrices and by their inability to efficiently process binary files whose sizes are not exact multiples of the selected matrix dimension. This study introduces CGHC-S128, a hybrid encryption framework that integrates a Complete Graph Hill Cipher (CGHC) with a Shift128 residual encryption mechanism to support universal binary file protection. In the proposed approach, adjacency matrices derived from complete graphs serve as deterministic encryption keys whose modular invertibility is mathematically guaranteed. Binary files are divided into fixed-size matrix blocks encrypted using the graph-based Hill Cipher, whereas any remaining bytes are processed by the Shift128 algorithm. This strategy eliminates the need for padding while preserving the exact size of the original file. The proposed cryptosystem was experimentally evaluated using multiple PDF documents and various matrix dimensions to investigate encryption correctness, reversibility, statistical randomness, diffusion performance, and resistance to differential cryptanalysis. Experimental results achieved a ciphertext entropy of 7.999810, a correlation coefficient of − 0.000795, an avalanche effect of 49.9241%, an NPCR value of 99.6061%, a UACI value of 33.6548%, and a key sensitivity of 99.6114%, demonstrating strong cryptographic behavior. Furthermore, integrity verification through MD5 and SHA-256 hash comparisons confirmed perfect reconstruction of the original files after decryption. Overall, the proposed CGHC-S128 framework offers a mathematically sound and computationally efficient solution for universal binary file encryption by combining deterministic key generation, guaranteed matrix invertibility, exact file-size preservation, and lossless decryption within a unified graph-based cryptographic architecture.</p>