  An innovative strategy to enhance the security of symmetric substitution
ciphers is presented, through the implementation of a randomized key matrix
suitable for various file formats, including but not limited to binary and text
files. Despite their historical relevance, symmetric substitution ciphers have
been limited by vulnerabilities to cryptanalytic methods like frequency
analysis and known plaintext attacks. The aim of our research is to mitigate
these vulnerabilities by employing a polyalphabetic substitution strategy that
incorporates a distinct randomized key matrix. This matrix plays a pivotal role
in generating a unique random key, comprising characters, encompassing both
uppercase and lowercase letters, numeric, and special characters, to derive the
corresponding ciphertext. The effectiveness of the proposed methodology in
enhancing the security of conventional substitution methods for file encryption
and decryption is supported by comprehensive testing and analysis, which
encompass computational speed, frequency analysis, keyspace examination,
Kasiski test, entropy analysis, and the utilization of a large language model.
