Integral : Jurnal Penelitian Pendidikan Matematika p - ISSN 2654-4539 e Ae ISSN 2654-8720 Vol. 7 No. Mei 2025 Page 93 of 100 Design and Implementation of an Encryption Algorithm Based on GF. in Information Security Ahmadi Universitas Pancasakti egal ahmadi_ak@yahoo. Abstract The rapid development of information technology presents serious challenges in maintaining data confidentiality, authenticity, and integrity. Modern cryptography heavily relies on abstract algebraic structures, particularly finite fields or Galois Fields (GF), as the foundation for designing encryption algorithms. Most popular algorithms, such as AES, use GF. due to its compatibility with binary However, the utilization of non-binary bases, specifically GF. , is relatively under-researched despite its potential to increase algebraic structure diversity and expand the key space. This article discusses the design and implementation of an encryption algorithm based on GF. The encryption process involves key generation from an irreducible polynomial, substitution via a non-linear S-Box, and diffusion through matrix multiplication in the GF. Implementation was carried out using Python, with messages represented as polynomials. Test results show that this algorithm can produce ciphertext with a random symbol distribution, has relatively efficient computation time for short messages, and possesses a large key space, making it resistant to brute-force attacks. Furthermore, the non-linear property of the S-Box in GF. provides better resistance against linear and differential cryptanalysis compared to GF. -based However, further analysis is needed regarding computational optimization and resistance to advanced cryptanalytic attacks. Thus, encryption algorithms based on GF. offer a promising alternative for developing modern information security systems and open opportunities for further research on the use of non-binary finite fields for future cryptography. Keywords: Encryption. Information Security. Galois Field. GF. Modern Cryptography. Cryptographic Algorithm. Finite Field INTRODUCTION use GF. for p > 2. In this context, choosing p = 5 is interesting because: The development of information and communication technology over the last two decades has brought significant changes in how humans access, process, and store data. Along with increased digital connectivity, serious challenges have emerged in maintaining information Personal transactions, and strategic communications are vulnerable to threats such as identity theft, and large-scale cyber attacks. Diversity of Algebraic Structure: GF. has more elements than GF. for the same degree. For example. GF. A) has 25 elements, while GF. A) has only 4. This opens opportunities for designing more diverse S-Boxes, diffusion matrices, and key spaces. Increased Key Space: A larger key space makes brute-force attacks increasingly By choosing a sufficiently large m. GF. can generate a vast number of possible keys. To address these challenges, cryptography has become a crucial discipline in information security. Modern cryptography no longer relies solely on simple letter manipulations or substitutions but has approaches, one of which utilizes abstract algebraic structures. One of the most widely used structures is the Galois Field (GF) or finite field, which provides a framework for modular arithmetic operations with properties such as closure, the existence of inverses, and deterministic results. Resistance to Patterns: Many algorithms based on GF. have been intensively researched, making their weakness patterns relatively easier to study. GF. presents a new challenge because base 5 creates a different distribution of operation results, potentially making it harder for attackers to Representation Flexibility: Elements in GF. can be represented as polynomials with coefficients in ZCI, thus supporting the construction of more complex non-linear functions for substitution and diffusion Most modern encryption algorithms are built upon finite fields. For example, the Advanced Encryption Standard (AES) utilizes operations in GF. A) for its substitution and linear transformation Similarly. Elliptic Curve Cryptography (ECC) uses GF. or GF. as the basis for point operations on an elliptic curve. The use of GF. is popular due to its simple representation in the binary system, making it easy to implement in both hardware and software. Furthermore, encryption algorithms based on GF. aligns with efforts to find alternative algorithms for use in the post-quantum era. Although not directly categorized as a postquantum algorithm, the use of a non-binary base opens new research pathways for strengthening information security in the However, the heavy reliance on GF. raises a question: are there alternative bases that can increase the diversity of cryptographic algorithms and strengthen their resistance to attacks? One answer is to Based on this background, this research aims to: Design an encryption algorithm based on operations in GF. Implement this algorithm on simple text messages using software. The master key was generated from an irreducible polynomial of degree m over GF. The process included: Analyze the encryption results in terms of ciphertext quality, computational complexity, and resistance to basic cryptanalytic attacks. Selection of an irreducible polynomial, , f. = xA 2 over GF. The master key was represented in polynomial form. Through this research, it is hoped to contribute to the development of cryptographic theory and practice, specifically in utilizing non-binary Galois Fields as a basis for modern encryption. Subkeys for each encryption round transformation in GF. This scheme was designed so that each round has a unique key, thereby strengthening diffusion. METHODS The research method involved several main stages, from algorithm design and software implementation to results analysis. The methodology can be outlined as follows: Encryption Process Encryption was performed over several rounds, each consisting of the following Preliminary Study Substitution (S-Bo. : Plaintext transformed using a non-linear substitution table (S-Bo. based on GF. The nonlinear function was built using the multiplicative inverse in GF. This stage involved a literature review on Galois Field theory, specifically GF. , and a study of modern encryption algorithms using finite fields like AES and ECC. The goal was to identify the advantages and weaknesses of existing algorithms and formulate research gaps that could be addressed using GF. Diffusion (Linear Transformatio. The substitution result was then multiplied by a transformation matrix over GF. to spread the influence of each bit/symbol throughout the block. The chosen matrix must be invertible to allow decryption. Data Representation Plaintext was first mapped onto elements of GF. Add Round Key: Each transformed block was added to the round subkey using the addition operation in GF. - Letters AAeZ were encoded as numbers 0Ae 24 . - These numbers were then represented as polynomials with coefficients in ZCI. This process was repeated for r rounds, where the number of rounds is determined based on key length and the desired security - For example, the letter "K" encoded as 10 can be represented as 2x 0 in GF. A). Decryption Process This approach allows each block of plaintext to be processed as an element in GF. Decryption was performed by applying the inverse operations of each encryption stage in reverse order: Key Generation (Key Schedul. - Key subtraction using the inverse of AddRoundKey. RESULTS AND DISCUSSION - Inverse of the linear transformation using the inverse matrix. The implementation of the GF. -based encryption algorithm was tested on simple text messages and yielded several important findings analyzable from various aspects: - Inverse of substitution using the inverse S-Box. Due to the algebraic properties of GF. , the decryption process can always be performed deterministically. Ciphertext Quality The generated ciphertext showed random characteristics with a relatively even symbol distribution. This indicates a good level of diffusion . preading plaintext information into ciphertex. and confusion . omplex relationship between key and Computational Implementation The algorithm was implemented using the Python programming language with - `numpy` for matrix operations. For example, the plaintext "AMAN" was encrypted using GF. A) with the irreducible polynomial f. = xA 2. Letters were mapped as A=0. B=1. A Z=24 . The encryption results showed that a small difference in plaintext produced a significant difference in ciphertext. This phenomenon, known as the avalanche effect, is crucial for cryptographic security. - `sympy` for polynomial arithmetic and inverse calculations in GF. The implementation phase included: - A conversion module for plaintext Ie GF. - A key generation module. - Encryption and decryption functions. Numerical Example: Encryption of the word "DATA" in GF. A) - Performance evaluation . xecution time, ciphertext distributio. Plaintext Representation Results Analysis - Letters AAeZ mapped to numbers 0Ae24 . Encryption results were evaluated based on three main aspects: - D = 3. A = 0. T = 19. A = 0 Ciphertext Randomness: Tested using symbol frequency distribution. - With GF. A) . , each number is represented as a polynomial with coefficients in ZCI. Computational Complexity: Calculated average encryption and decryption time for short and long -3Ie3 -0Ie0 - 19 Ie 4x Ae 1 O 4x 4 . Security: A simple analysis of resistance to brute force, linear cryptanalysis, and differential cryptanalysis was performed. -0Ie0 Thus, the plaintext "DATA" is represented Convert Back to Letters Use the reverse mapping polynomial Ie number . , 0, 4x 4, . ` - x 3 Ie 5A1 3 = 8 Ie letter I Irreducible Polynomial - 0 IeA Let the irreducible polynomial be: `f. = xA - 2x 3 Ie 5A2 3 = 13 Ie letter N - 0 IeA so all operations are reduced mod f. Thus, the encryption result is: Plaintext: DATA Key Ciphertext: IANA Take the master key K = 2x 1 in GF. A). Analysis Encryption Process - It can be seen that a change in the letter T . arge valu. results in ciphertext N, which is very different from its original For each plaintext block P, ciphertext C is calculated by: `C = (P y K) mod f. ` - A small difference in plaintext . , if A=0 is changed to B=. would produce a vastly different ciphertext, demonstrating the avalanche effect. - D=3 `C = 3 y . = 6x 3 O x 3 . od - A=0 Computational Complexity `C = 0 y . = 0` Testing was conducted on short messages (<100 character. using Python. The average encryption time was <0. 05 seconds on a standard laptop processor. This result shows that although the base p=5 is larger than p=2 . s in AES), the computational load did not increase significantly. - T = 4x 4 `C = . = 8xA 4x 8x 4 = 8xA 12x 4 O 3xA 2x 4 . ` Since `f. = xA 2 Ne xA O 3 . `C = 3. 2x 4 = 9 2x 4 = 13 2x O 3 2x . ` However, for long messages (>1000 character. , encryption time increased linearly with message length. This aligns with the complexity theory of block cipher algorithms, which is heavily influenced by the number of blocks processed. - A=0 `C = 0` Thus, the ciphertext in polynomial form is: 3, 0, 2x 3, . ` Key Space and Brute-Force Security By choosing a sufficiently large m, the key space of GF. is very large. For - RSA is based on large prime numbers, a different paradigm . symmetric vs. GF. is more similar to AES, being a symmetric block cipher. - m = 4 Ie number of elements = 5A = 625 - Elliptic Curve Cryptography (ECC) uses GF. or GF. If expanded with GF. , potential security could increase, but implementation would be more complex. - m = 8 Ie number of elements = 5A = 390,625 - m = 16 Ie number of elements OO 1. Thus, this algorithm can be positioned as a new alternative block cipher combining the mathematical strength of GF. with relatively good efficiency. This key space makes brute-force attacks If the key is expanded to a 128bit equivalent based on GF. , the time required to guess all possible keys would be enormous, even with a supercomputer. Implementation Limitations Some identified limitations: S-Box Analysis in GF. Scalability: For large m, polynomial representation requires higher memory. The S-Box (Substitution Bo. was built from a non-linear function in GF. Initial analysis shows a sufficiently high level of non-linearity compared to simple S-Boxes in GF. This makes the algorithm more resistant to linear and differential cryptanalysis. - Optimization: Python is not yet optimal for large-scale encryption. in C/C or hardware acceleration is - Formal security analysis: Testing for resistance against algebraic, side-channel, or statistics-based attacks has not been However, potential weaknesses remain: - If the irreducible polynomial is chosen carelessly, the S-Box structure could become weak. - A deep mathematical study is needed to ensure the S-Box has no symmetrical patterns that attackers could exploit. Prospects for Further Research This algorithm is still in its early stages and needs further development, including: Designing S-Boxes based on group theory or number theory to increase nonlinearity. Comparison with Other Algorithms Compared to popular algorithms: Optimizing the encryption algorithm based on parallel computing or GPUs. - AES (Advanced Encryption Standar. , based on GF. A), has very fast GF. ) is still less efficient but has higher algebraic structure diversity. - Security testing with real attacks, e. ciphertext-only or chosen-plaintext attacks. CONCLUSION This research demonstrates that an encryption algorithm based on GF. can be effectively implemented to enhance information security. By utilizing the algebraic structure of finite fields, an encryption system was obtained that: diversification in the quantum computing REFERENCES