Preprint
Article

This version is not peer-reviewed.

Algorithmic Modeling of Multiplicative Hyperrings and Their Cryptographic Applications

Submitted:

01 July 2026

Posted:

02 July 2026

You are already at the latest version

Abstract
Hyperstructures, which have gained increasing importance in the field of Abstract Algebra in recent years, differ from classical algebraic structures in that the result of an operation can be a set rather than a single element. This property gives them the potential to produce multiple outcomes and offer a higher level of complexity This study focuses specifically on the algorithmic modeling of multiplicative hyperrings. For this purpose, a web-based interactive platform has been developed where users can define and test their own hyper-operation rules on both finite and infinite sets. The developed platform consists of two main sections: an "Education Module" and a "Cybersecurity Module". The Education Module illustrates abstract algebraic concepts using visual tools such as Cayley tables, while the Cybersecurity Module demonstrates the practical applications of hyperring structures in symmetric encryption algorithms similar to Diffie-Hellman key exchange and Caesar cipher. Additionally, a system has been integrated that provides users with AI-assisted constructive suggestions for structures that do not satisfy the axioms. This study aims to build a bridge between the theoretical world of hyperstructures and their applications in computational mathematics and cybersecurity.
Keywords: 
;  ;  ;  ;  ;  

1. Introduction

Algebraic hyperstructures were first introduced in 1934 by F. Marty as a generalization of group theory [1]. This structure has a wide range of applications in both pure and applied mathematics. The fact that the result of a hyperoperation is a set rather than a single element adds a rich flexibility and complexity to these structures that is not found in classical algebraic systems. In particular, multiplicative hyperrings are structures in which the addition operation preserves a classical group structure, while the multiplication operation is a hyperoperation [2]. This property has enabled them to have potential applications in multidisciplinary fields such as cryptography, coding theory, and artificial intelligence [3].

2. Algorithmic Modeling of Multiplicative Hyperrings

Hypergroups, a fundamental example of hyperrings, are structures that result from applying an operation to a set different from the empty set H , expressed as ο   :   H × H   P * ( H ) [4], and provide the union property leading to P ( H ), consisting of non-empty subsets of H . Canonical hypergroups are a special type of hypergroup defined by Marty.
Three different types of hyperrings have been defined [4]. If only addition “+” is a hyperoperation and multiplication is the classical multiplication operation on R , it is called a Krasner hyperring. A special variant of this type of hyperring was defined by Krasner in 1957 [5]. Krasner also defined hyperfields and division hyperrings in 1983. On the other hand, if only multiplication is a hyperoperation, this type of hyperring is called a multiplicative hyperring [5]. Multiplicative hyperrings were defined by Rota in 1982. Subsequently, many scientists such as Nakassis (1988), Olson and Ward (1997), Procesi and Rota (1999) have also conducted studies in this field [5]. In recent years, algebraic hyperstructures continue to be intensively researched by many mathematicians. Over the past 15 years, hyperstructures have been found to have applications in many different fields, such as geometry, hypergraphs, binary relations, lattices, fuzzy sets, rough sets, automata theory, cryptography, median algebra, relation algebras, combinatorics, coding, artificial intelligence, and probability [3].
Let there be two binary operations “+” and “.” defined on the set R ≠ Ø. The algebraic structure ( R, +, .) is called a ring if it satisfies the following conditions:
(1) (R, +) is an abelian group.
(2) The operation “.” is associative in R.
(3) The operation “.” is left and right distributive over the operation “ + “:
For ∀ a,b,c ∈ R, a(b + c) = ab + ac and (a + b)c = ac + bc [6]
The identity element for the “+” operation in a ring is called the zero element of the ring and is denoted by 0 R . The ring may not have an identity element for the “.” operation. If it also has an identity element for the second operation, this element is called the unit element (or identity element) of the ring and is denoted by 1 R . Such a ring is called a unital ring (or ring with unity). Furthermore, if the ring is commutative with respect to the second operation, the ring is called a commutative ring [6].
[2] Let H be a nonempty set and : H x H   P * ( H ) be a hyperoperation. The couple ( H , ) is called hypergroupoid. For any two nonempty subsets A and B of H , we define A B = a A , b B a b . A hypergroupoid ( H , ) is called a semihypergroup if for all a , b , c of H we have a ( b c ) = ( a b ) c , which means that u a b u c = v b c a v . A hypergrupoid ( H , ) is called quasihypergroup if for all a of H we have a H = H a = H . A hypergrupoid ( H , ) which is both a semihypergroup and a quasihypergroup is called a hypergroup [2].
A triple ( R , + , . ) is called a multiplicative hyperring if
(1) ( R , + ) is an abelian group;
(2) ( R , . ) is a semihypergroup;
(3) For all a , b , c R , we have a . ( b + c ) a . b + a . c and ( b + c ) . a b . a + c . a ;
(4) For all a , b R , we have a . ( b ) = ( a ) . b = ( a . b ) If ın (3) we have equalities instead of inclusions, then we say that the multiplicative hyperring is strongly distributive. A nonempty subset I of a commutative hyperring R is said to be a hyperideal of R if
x y I and r . x I for any x , y I and r I . If A and B are hyperideals of R ,
then A + B = { a + b : a A , b B } and A . B = { i = 1 n a i . b i : a i A , b i B , n Z } which are
hyperideals of R . The principal ideal of R generated by an element a is given by
a = { p . a : p Z } + { i = 1 n x i + j = 1 m y j + k = 1 z z k : i , j , k , r i , s j , u k R   such   that   x i r i a , y j a s j , z k t k a u k }
We define a set A = { r R : r n I } for some n N is called the radical of I and denoted by I or r a d ( I ) [7]. A homomorphism (good homomorphism) between two multiplicative hyperrings ( R , + , ) A and ( R ' , + ' , ' ) is a map f : R R ' such that for all x , y R , we have f ( x + y ) = f ( x ) + ' f ( y ) and f ( x y ) f ( x ) ' f ( y ) ( f ( x y ) = f ( x ) ' f ( y ) ) respectively. Let R be a commutative ring with identity. We define a proper hyperideal P of R to be weakly prime if 0 a . b P implies a P or b P . For any hyperideals I and J of R , ( I : J ) = { a R : a J I } .
Example 2.3. See the example below from [8]. Let take
(Z4, ⊕, ⊗) on the set of integers.
From Table 1 and Table 2 (Z4, ⊕, ⊗) is a multiplicative commutative hyperring on the set of integers.
Let define the example in [9], take A = { 14,21 } and then define multiplication
x y = { 14 x y , 21 x y } on Z4. Then Z4 is a multiplicative hyperring by this multiplication.
However, despite the theoretical potential of these hyperstructures, there is a noticeable lack of computational tools that concretize these abstract concepts, facilitate their discovery, and demonstrate their practical applications. Even powerful mathematical software such as SageMath does not offer direct and interactive support for hyperrings [10].
The aim of this work is to fill this gap. Within this scope, a web platform called HyperCrypt has been developed, where users can define their own hyper-operation rules, test whether the structures formed according to these rules satisfy algebraic axioms (such as associativity, distributivity, etc.), and visually analyze the results.
One of our two main modules on the platform, the Education Module, is geared towards this purpose.

2.1. The Education Module: Concretizing the Abstract

One of the greatest challenges in mathematics education is making abstract concepts understandable. Our educational module is designed to overcome this challenge.
Users can define a finite base set (e.g., {0, 1, 2, 3}) and a dynamic rule that will be effective on this set (e.g., a ο b = {2ab, 3ab}). Our system takes these inputs and:
  • Generates a Cayley Table: The developed backend engine calculates the hyper-operation result for each pair of elements in the set and sends this data to the frontend. The frontend receives this data and presents an interactive operation table to the user (see Figure 1).
  • Verifies Axioms: The AxiomVerifier engine in the backend tests axioms such as associativity and generation on this finite set using a “brute-force” method.
  • AI-Assisted Feedback: If the structure does not satisfy an axiom, our system uses the Google Gemini AI model to provide the user with a constructive suggestion on “how they might change their rule”.

2.2. Computational Analysis Engine: AxiomVerifier

The foundation of our project is an engine named AxiomVerifier, which analyzes finite algebraic structures defined by the user. This engine is designed as a generic class (<T extends Number>) in the Java language, enabling it to work flexibly with integers, matrices, or other data types that may be added in the future.
The engine’s primary task is to verify which algebraic axioms the structure satisfies for a given baseSet and a hyperMultiplication, using a “brute-force” method—that is, by testing all possible combinations of elements.
The engine’s main control method, verifyAll, acts like an orchestra conductor, delegating tasks to specialized sub-methods and combining the results into a comprehensive report.
Code 1: The Main Control Logic of the AxiomVerifier Class (verifyAll)
  • public class AxiomVerifier<T extends Number> {
  •     // ... class members ...
  • .
  •     public VerificationResult verifyAll() {
  •         VerificationResult result = new VerificationResult();
  • .
  •         // Axiom 2: (R,*) is a semihypergroup (Associativity)
  •         boolean isAssociative = isAssociative();
  •         result.setSemihypergroup(isAssociative);
  • .
  •         // Axiom 3: Distributivity
  •         boolean isDistributive = checkDistributivity();
  •         result.setDistributive(isDistributive);
  • .
  •         // Axiom 4: Negative Property
  •         boolean hasNegativeProperty = checkNegativeProperty();
  •         result.setHasNegativeProperty(hasNegativeProperty);
  • .
  •         // Final Decision: Is it a Multiplicative Hyperring?
  •         // (Assuming Axiom 1: (R,+) is an abelian group)
  •         boolean isMultiplicativeHyperring = isAssociative && isDistributive && hasNegativeProperty;
  • .
  •         if (isMultiplicativeHyperring) {
  •             result.setHighestStructure(“Multiplicative Hyperring”);
  •             // ...
  •         } else {
  •             // ... Error reporting logic ...
  •         }
  •         return result;
  •     }
  •     // ... other methods ...
  • }
Explanation 1:
The verifyAll method systematically tests the fundamental conditions from Rota’s definition. Assuming that (R,+) is an abelian group, it verifies multiplicative associativity, distributivity, and the negative property to determine if the structure qualifies as a multiplicative hyperring.
The most distinctive and crucial technical feature of our engine is its ability to directly process the set-based nature of hyper-operations (H × H → P*(H)). For cases where the result of an operation is a set rather than a single element, a special “expand and collect” algorithm was developed to verify the axioms. This algorithm is clearly visible in the isAssociative method, which tests the associative axiom.
Code2: Associative Axiom Test for Hyper-operations (isAssociative)
  • public boolean isAssociative() {
  •     for (T a : baseSet) {
  •         for (T b : baseSet) {
  •             for (T c : baseSet) {
  •                 // // Left Side Calculation: (a ο b) ο c
  •                 Set<T> leftSideResult = new HashSet<>();
  •                 // 1. The (a ο b) operation returns an intermediate result set.
  •                 Set<T> firstOpResult = hyperOperation.apply(a, b);
  •                 // 2. Each element in this intermediate result set is then operated with ‘c’.
  •                 for (T intermediateResult : firstOpResult) {
  •                     leftSideResult.addAll(hyperOperation.apply(intermediateResult, c));
  •                 }
  • .
  •                 // Right Side Calculation:a ο (b ο c)
  •                 Set<T> rightSideResult = new HashSet<>();
  •                 Set<T> secondOpResult = hyperOperation.apply(b, c);
  •                 for (T intermediateResult : secondOpResult) {
  •                     rightSideResult.addAll(hyperOperation.apply(a, intermediateResult));
  •                 }
  •                 // 3. The equality of the two final result sets is checked.
  •                 if (!leftSideResult.equals(rightSideResult)) {
  •                     return false; // If not equal, the axiom is not satisfied.
  •                 }
  •             }
  •         }
  •     }
  •     return true; // Equality holds for all triplets.
  • }
Explanation 2:
The isAssociative method verifies the associative axiom for∀ a,b,c∈ H. To compute the expression (a ο b) ο c , first, the a ο b operation is performed, yielding an intermediate set (firstOpResult). Then, each element in this intermediate set is subjected to the hyper-operation with $c$ individually, and all results from these operations are collected into a single final set (leftSideResult). The same process is repeated for the right side of the equation. Finally, the equality (equivalence) of the two final result sets is checked
(with the.equals() method). This algorithm forms the basis of the computational analysis of hyperstructures.
This approach is critical not only for the associative axiom but also for the distributive axiom, which links the multiplication and addition operations.
Code 3: Distributive Axiom Test for Hyper-operations (checkDistributivity)
  • public boolean checkDistributivity() {
  •     for (T a : baseSet) {
  •         for (T b : baseSet) {
  •             for (T c : baseSet) {
  •                 // Calculate Left-Hand Side: a * (b + c)
  •                 T b_plus_c = standardAddition.apply(b, c);
  •                 Set<T> leftSideResult = hyperMultiplication.apply(a, b_plus_c);
  • .
  •                 // Calculate Right-Hand Side: a*b + a*c
  •                 Set<T> a_mult_b = hyperMultiplication.apply(a, b);
  •                 Set<T> a_mult_c = hyperMultiplication.apply(a, c);
  • .
  •                 Set<T> rightSideResult = new HashSet<>();
  •                 // Take the Cartesian sum of the two result sets
  •                 for (T x : a_mult_b) {
  •                     for (T y : a_mult_c) {
  •                         rightSideResult.add(standardAddition.apply(x, y));
  •                     }
  •                 }
  • .
  •                 // Check for inclusion: Is the set a*(b+c) a subset of (a*b + a*c)?
  •                 if (!rightSideResult.containsAll(leftSideResult)) {
  •                     return false; // Axiom is violated if not a subset.
  •                 }
  •             }
  •         }
  •     }
  •     return true;
  • }
Explanation 3: The checkDistributivity method verifies the condition a · (b + c) ⊆ a·b + a·c for every triplet (a,b,c). The left side (leftSideResult) is a set obtained by first calculating b+c with standard addition and then applying the hyper-multiplication with a. The right side (rightSideResult) is a new set formed by taking the Cartesian sum of the two sets resulting from the a*b and a*c hyper-multiplications—that is, by individually adding each element from the first set to every element in the second set. Finally, it checks if the left-side set is a subset of the right-side set.
Code 4: Negative Property Test (checkNegativeProperty)
  • public boolean checkNegativeProperty() {
  •     for (T a : baseSet) {
  •         for (T b : baseSet) {
  •             T negB = standardNegation.apply(b);
  •             T negA = standardNegation.apply(a);
  • .
  •             // Calculate the three distinct sets
  •             Set<T> res1 = hyperMultiplication.apply(a, negB);     // a.(-b)
  •             Set<T> res2 = hyperMultiplication.apply(negA, b);     // (-a).b
  • .
  •             Set<T> a_mult_b = hyperMultiplication.apply(a, b);   // a.b
  •             Set<T> res3 = new HashSet<>();                     // -(a.b)
  •             for (T x : a_mult_b) {
  •                 res3.add(standardNegation.apply(x));
  •             }
  • .
  •             // Check if the three sets are equivalent
  •             if (!res1.equals(res2) || !res1.equals(res3)) {
  •                 return false;
  •             }
  •         }
  •     }
  •     return true;
  • }
Explanation 4:
The checkNegativeProperty method validates Axiom 4 from Rota’s definition. It computes three separate sets corresponding to the expressions a.(-b), (-a).b, and -(a.b) and then compares them for equality using the.equals() method to ensure their elements are equivalent.
Our platform also includes a prototype module capable of analysis on infinite sets, such as the Integers (ℤ). Instead of testing all elements (which is impossible), this module attempts to symbolically prove whether a rule satisfies the axioms by using the Java Algebra System (JAS) library [11].
Figure 2. Analysis results generated for the set of Integers (ℤ) and the rule a ο b = {4ab, 7ab} selected by the user.
Figure 2. Analysis results generated for the set of Integers (ℤ) and the rule a ο b = {4ab, 7ab} selected by the user.
Preprints 221114 g002
The engine’s main control method, verifySymbolically, works like an orchestra conductor, delegating tasks to specialized sub-methods.
Code 5: Main Control Method (verifySymbolically)
  • public VerificationResult verifySymbolically(String rule, String domain) {
  •     // 1. Check the rule’s format and whether it contains multiplication.
  •     if (!isValidPolynomialRule(rule) || !rule.contains(“*”)) {
  •         // ... Return error ...
  •         return result;
  •     }
  •     try {
  •         // 2. Test the associative axiom symbolically.
  •         this.<RingElem>verifyAssociativity(rule, domain, result);
  •         // 3. Test the reproduction axiom symbolically.
  •         this.<RingElem>verifyReproduction(rule, domain, result);
  •         // 4. Determine the final result.
  •         boolean isHypergroup = result.isSemihypergroup() && result.isQuasihypergroup();
  •         result.setHypergroup(isHypergroup);
  •         // ...
  •     } catch (Exception e) { /* ... Error handling ... */ }
  •     return result;
  • }
Explanation 5: The main method first checks the validity of the rule. Subsequently, it delegates the symbolic tests for the associative and reproduction axioms to the respective specialized methods and determines the final level of the structure by combining the returned results.
To test the associative axiom ((a ο b) ο c = a ο (b ο c)) a true symbolic substitution mechanism was developed, rather than a simple text replacement method. This is accomplished using a helper method named compose, which applies the polynomial composition operation.
Code 6: Symbolic Associativity Test (verifyAssociativity)
  • // ...
  • // We convert the rule into a symbolic polynomial with temporary variables (x,y).
  • GenPolynomial<C> rulePoly = ruleRing.parse(rule.replace(“a”, “x”).replace(“b”, “y”));
  • .
  • // We also define the letters a, b, c as symbolic polynomials.
  • GenPolynomial<C> polyA = mainRing.univariate(0);
  • GenPolynomial<C> polyB = mainRing.univariate(1);
  • GenPolynomial<C> polyC = mainRing.univariate(2);
  • .
  •  // Left Hand Side (LHS) is being calculated: (a ο b) ο c
  •  // 1. Calculate a ο b (substitute x with a, y with b).
  •  GenPolynomial<C> a_op_b = compose(rulePoly, mainRing, polyA, polyB);
  •  // 2. Calculate  (a ο b) ο c (substitute x with a_op_b, y with c).
  •  GenPolynomial<C> lhs = compose(rulePoly, mainRing, a_op_b, polyC);
  • .
  •  // Right Hand Side (RHS) is being calculated: a ο (b ο c)
  •  // ... similarly...
  •  GenPolynomial<C> rhs = compose(rulePoly, mainRing, polyA, b_op_c);
  • .
  •  // Compare the two symbolic polynomials.
  •  If (lhs.equals(rhs)) {
  •      // Axiom is satisfied...
  •  }
Explanation 6:
In this method, the user’s rule is first converted into a general polynomial (rulePoly).Subsequently, the variables a, b, and c are also treated as symbolic polynomials. The compose method constructs the left and right sides of the equation separately and entirely symbolically by substituting these polynomials into the rule polynomial. Finally, whether these two resulting complex polynomials are mathematically equal is checked using the .equals() method.
The reproduction axiom (a ο H = H), is a more difficult problem because requires proving the solvability of an equation. In this prototype, this problem is addressed with a simpler approach that analyzes the structure of the rule.
Code 7: Symbolic Reproduction Test (verifyReproduction)
  • private <C extends RingElem<C>> void verifyReproduction(String rule, String domain, VerificationResult result) {
  •     // Objective: Does the equation ‘a ο x = y’ have a solution ‘x’ for every ‘y’ ?
  • .
  •     boolean isSolvable = false;
  •     String trimmedRule = rule.trim();
  • .
  •     // Simple Case 1: If the rule is ‘a+b’ -> a + x = y  => x = y - a.
  •     // A solution always exists for Integers and Rationals.
  •     if (trimmedRule.equals(“a+b”)) {
  •         isSolvable = true;
  •     }
  •     // Simple Case 2: If the rule is ‘a*b’ -> a * x = y => x = y / a.
  •     else if (trimmedRule.equals(“a*b”)) {
  •         // Not always solvable in Integers, but solvable in Rationals.
  •         if (“RATIONALS”.equalsIgnoreCase(domain)) {
  •             isSolvable = true;
  •         } else { isSolvable = false; }
  •     }
  • .
  •     result.setQuasihypergroup(isSolvable);
  •     // ...
  • }
Explanation 7:
To test the reproduction axiom, our engine attempts to solve the equation a ο x = y. This prototype recognizes whether the rule is in basic forms such as a+b or a*b. Subsequently, it makes a decision by using fundamental mathematical knowledge as to whether this equation has a general solution in the selected domain. This is an intelligent analysis method that recognizes known patterns rather than attempting to solve every rule.

3. Cryptographic Applications of Multiplicative Hyperrings

Hyperring theory has the potential to develop innovative solutions in various fields by extending algebraic structures beyond abstract mathematics. Since hyperring theory offers more complex structures than classical ring and group structures, the use of these properties in security protocols provides several advantages.
The use of hyperring structures in key generation and data encryption processes is realized by integrating their algebraic properties into cryptographic systems. Hyperring structures offer a wider set of operations compared to classical ring structures. This feature can be used to generate unique keys. For example, key diversification can be achieved through algebraic operations (such as addition and multiplication) on the hyperring, so that even keys created with the same parameters differ from each other [12]. This reduces the predictability of the keys, making them more resistant to brute-force or prediction attacks [13]. Hyperring arithmetic allows keys to be generated in an interconnected manner within the algebraic structure. Thanks to this structure, it becomes possible to obtain keys only through specific mathematical relationships, making it impossible to produce keys with information outside of these relationships [14].
Hyperring structures provide non-linear transformations during data encryption and increase security against pattern analysis [15]. This feature provides extra security in VPN and SSL protocols [16].
Hyperring structures offer a natural defense against Brute-force and Man-in-the-Middle attacks thanks to complex algebraic operations [14]. The dynamic key generation capability of hyperring structures provides additional flexibility in protocols such as VPN and SSL. Hyperring structures strengthen methods like Diffie-Hellman, providing extra security against prediction-based attacks [17]. Hyperring structures offer a wider range of operations compared to classical ring and group structures. This structure provides an additional layer of security during key exchange [18]. Hyperring-based keys can be easily renewed to provide a rapid response to security incidents [12]. Hyperring-based verification processes can quickly detect whether data has been altered [15]. It enhances security by providing flexibility, especially in military and financial applications [16].
The algebraic complexity of hyperring structures can be used to increase security in key exchange protocols. For example, when integrated into key exchange protocols like Diffie-Hellman, it complicates the acquisition of the key through intermediate operations [18]. The inclusion of a large number of algebraic operations in hyperring structures makes protocols difficult to analyze. This provides a strong defense, especially against man-in-the-middle or prediction-based attacks [12]. By utilizing different algebraic structures, more complex key sequences and longer keys can be created [13]. Processing times may increase, but it provides higher levels of security. This provides stronger security than traditional encryption algorithms. Therefore, the use of hyperring structures can be optimized according to the balance of performance and security [17].
In data encryption, they can secure not only the encryption but also the integrity of the data. Thus, it can be easily determined whether the data has been altered [18]. Hyperring structures can add an additional security layer to the symmetric key generation process during data encryption. In hyperring-based encryption algorithms, data can be encrypted through algebraic operations on the hyperring, making it more complex to decrypt [17].
In digital signature processes, unique and verifiable signatures can be produced using hyperring structures. Specifically, signing data using specific hyperring operations ensures that only authorized parties can verify the data [15].
For ease of learning, concretizing abstract structures such as hyperrings makes it easier for students to understand complex mathematical structures. Researching the application-practical aspects of this structure develops students’ analytical thinking skills and strengthens their problem-solving abilities.
In this context, the algebraic complexity of hyperstructures makes them an attractive candidate for cryptographic protocols [19]. To demonstrate this potential, two practical modules have been developed.

3.1. Hyper Encryption Module: Custom Map Mode and Binary Mode

This module is a hyperstructure-based generalization of the Caesar encryption. In the “Custom Map Mode” option, the system assigns an initial number to each letter. The user enters a rule (e.g., a ο b = {2ab, 3ab}) that will modify these numbers.
  • Map Creation: An initial map is set (e.g., A=17, B=86, ...).
  • Rule Application: The user-entered rule, such as a ο b = {x*2-5}, is applied to the numerical value of each letter to create a new encryption map.
  • Encryption: The message entered by the user is encrypted according to this new map. The message “merhaba” is converted into a number sequence such as 1993 5 7 47 ... using the rule, a ο b = {x*2-5}. This makes it difficult to crack the cipher without knowing the rule.
Figure 3. Symmetric encryption simulation with a user-defined rule.
Figure 3. Symmetric encryption simulation with a user-defined rule.
Preprints 221114 g003
Unlike the “Custom Map Mode”, the “Binary Mode” does not bind characters to a predefined numerical map. Instead, it focuses on bit-level operations, which form the basis of modern cryptography. In this mode, each character of the text to be encrypted is converted into its 8-bit binary equivalent according to the universal standard ASCII (American Standard Code for Information Interchange) table. This binary sequence forms the fundamental “set” for the encryption.
The user then defines a simple yet powerful rule to be applied to each bit of this binary sequence.

3.1.1. Encryption Process:

  • Converting Text to Binary: A text entered by the user, such as “merhaba”, is converted character by character into its ASCII binary equivalents.
    o
    m -> 01101101
    o
    e -> 01100101
    o
    ...
  • Applying the Rule: The user enters a rule to be applied to each bit. For example, the XOR 1 rule means that each bit is subjected to an XOR (exclusive or) operation with 1. This operation flips 0s to 1s and 1s to 0s.
    o
    Original m (01101101) -> Rule-Applied m (10010010)
  • Encrypted Message: After this rule is applied to the bits of the entire text, the resulting new binary sequence becomes the “encrypted message”.

3.1.2. Security Principle

The security of this method relies on the secrecy of both the rule used and the way of its applied. For an attacker who does not know the rule, the intercepted binary sequence is nothing more than meaningless noise. The receiving party, by applying the inverse of the same rule (for example, the inverse of the XOR 1 operation is again XOR 1), obtains the original binary sequence and decrypts the message by converting it back to text.
This module concretely demonstrates how hyperstructures can be used as a flexible and powerful encryption tool, not only at the algebraic level but also in bit-level logical operations.

3.2. Hyper-Diffie-Hellman Module

This module simulates a version of the classic Diffie-Hellman key exchange protocol [20], reinforced by a user-defined hyper-operation rule.
The goal of the protocol is for two parties (Alice and Bob) to agree on a shared secret key that an adversary (Eve), eavesdropping on the communication, cannot determine. The innovation in our model is the ability to use any user-defined algebraic rule agreed upon by Alice and Bob, instead of a fixed operation like exponentiation.
Example Scenario:
The user defines an expression such as (a*5-7)%n as the rule. Alice and Bob use this rule to calculate their public keys and shared secret. Our simulation shows that if this rule satisfies the necessary algebraic properties, such as associativity or commutativity, Alice and Bob arrive at the same shared secret (83) (See Figure 4). Even if the attacker, Eve, sees the public keys (18) exchanged, she cannot calculate the private keys and, consequently, the shared secret. This provides a defense mechanism against Man-in-the-Middle attacks. In a scenario like a mobile banking application, the password (1234) entered by the user could actually be a private key. This key is processed through a rule shared with the server, transforming it into the actual authentication data, and the data intercepted by an attacker in the middle remains meaningless.
Figure 4. Bit-level encryption and decryption of the text “merhaba” by applying the “XOR 1” rule.
Figure 4. Bit-level encryption and decryption of the text “merhaba” by applying the “XOR 1” rule.
Preprints 221114 g004
Figure 5. Hyper-Diffie-Hellman Simulation.
Figure 5. Hyper-Diffie-Hellman Simulation.
Preprints 221114 g005
Code 8: Hyper-Diffie-Hellman Calculation Engine (CryptoService)
  • @Service
  • public class CryptoService {
  •     private final RuleParserService ruleParserService;
  • .
  •     @Autowired
  •     public CryptoService(RuleParserService ruleParserService) {
  •         this.ruleParserService = ruleParserService;
  •     }
  • .
  •     public Integer calculate(String rule, int base, int exponent, int modulus) {
  •         // Define constants that can be used in the rule (n=modulus).
  •         Map<String, Object> constants = Map.of(“n”, modulus);
  • .
  •         // Prepare the rule string, replacing ‘a’ with base and ‘b’ with exponent.
  •         String finalRule = rule.replace(“a”, String.valueOf(base))
  •                                .replace(“b”, String.valueOf(exponent));
  • .
  •         // Have the RuleParser calculate this final expression which contains no
  •         // variables.
  •         // apply(1,1) is only used to trigger the function; the values are not important.
  •         Set<Integer> resultSet = ruleParserService.parseRule(finalRule, constants).apply(1, 1);
  • .
  •         if (resultSet.isEmpty()) {
  •             throw new IllegalStateException(“Cryptographic operation produced an empty
  •             result..”);
  •         }
  •         // Even if the hyper-operation result is a set, cryptographic protocols
  •         // usually expect a single result. In this prototype, we select the first element.
  •         return resultSet.iterator().next();
  •     }
  • }
Explanation 8:The calculate method performs the hyper-operation generalization of the exponentiation operation (ga mod p) in the Diffie-Hellman protocol. The method replaces the a and b variables in the rule text received from the user with the values required for the current step of the protocol (e.g., base=g, exponent=a). The resulting final expression, which no longer contains variables (e.g., ”Math.pow(5, 6) % 23, is executed by the RuleParserService. Since the hyper-operation result can return a set, the first element of the result is used as the cryptographic key in this prototype. This structure demonstrates how any user-defined rule can be integrated into a key exchange protocol.
Code 9: CryptoController
  • // CryptoController.java
  • .
  • @RestController
  • @RequestMapping(“/api/crypto”)
  • public class CryptoController {
  •     private final CryptoService cryptoService;
  • .
  •     // ... constructor ...
  • .
  •     @PostMapping(“/calculate-key”)
  •     public KeyExchangeResult calculateKey(@RequestBody KeyExchangeRequest request) {
  •         try {
  •             // We determine which step of the protocol we are in.
  •             int base = request.generator;
  •             String explanation = “Genel anahtar hesaplandı.”;
  • .
  •             // If the request includes the other party’s public key,
  •             // this is a “shared secret” calculation step.
  •             if (request.theirPublicKey != null) {
  •                 base = request.theirPublicKey; // The base of the operation becomes the
  •                 // key from the other party.
  •                 explanation = “ Shared secret key calculated.”;
  •             }
  • .
  •             // Call CryptoService with the correct parameters.
  •             Integer result = cryptoService.calculate(
  •                 request.rule,
  •                 base,
  •                 request.privateKey,
  •                 request.modulus
  •             );
  •             return new KeyExchangeResult(result, explanation);
  •         } catch (Exception e) {
  •             // ... error handling ...
  •         }
  •     }
  •     // ...
  • }
Explanation 9:
CryptoService’s calculation capability is provided as a web API endpoint via the CryptoController class. The calculateKey method shown above is designed to manage both public key (g ο a) and shared secret (B ο a) calculations through a single endpoint. The method determines which step of the protocol it is in by checking whether the incoming request contains the other party’s public key (theirPublicKey), and it calls CryptoService with the appropriate base parameter accordingly. This design simplifies the API by eliminating the complexity of creating separate endpoints for different steps of the protocol.

4. Conclusion and Recommendations

The HyperCrypt platform, developed in this study, provides a concrete tool that bridges the theoretical world of hyperrings with both educational and practical cybersecurity applications. Our dynamic engine, capable of processing user-defined rules, has the potential to encourage exploration and the development of new applications in this field.
The practical application areas for these developed hyperstructure-based cryptographic modules are quite broad. The “Hyper-Diffie-Hellman” module, in particular, can be used to add an additional layer of complexity and security to existing security infrastructures. For example, in a mobile banking application, the PIN or password entered by the user, instead of being sent directly to the server, could be processed by a user-defined hyper-operation rule pre-shared between the client and server to be transformed into a “one-time key”. In this case, an attacker eavesdropping on the traffic with a Man-in-the-Middle attack cannot deduce the relationship between the intercepted data (e.g., the public key) and the original password without knowing the rule, and this data remains meaningless. Similarly, in communication between IoT (Internet of Things) devices or in military communication systems, an additional line of defense against standard encryption protocols can be established by assigning specific hyper-operation rules to each group of devices. Our “Hyper Encryption” module offers a practical solution for scenarios that are less critical but require flexibility, where simple texts need to be encrypted quickly with customized rules.

Funding

This work was supported by the Scientific and Technological Research Council of Türkiye (TÜBİTAK) under the 2209-A University Students Research Projects Support Program, Project No. 1919B012427941.

Acknowledgments

The authors would like to thank the Scientific and Technological Research Council of Türkiye (TÜBİTAK) for their valuable support for this study under the 2209-A Program, project number [1919B012427941].

Competing Interests

The authors declare that they have no competing interests.

References

  1. Marty, F. Sur une generalization de la notion de groupe. in 8th congress Math. Scandinaves, 1934; 1934, pp. 45–49. [Google Scholar]
  2. Davvaz, B.; Leoreanu-Fotea, V. Hyperring Theory and Applications; International Academic Press, 2007. [Google Scholar]
  3. Corsini, P.; Leoreanu, V. Applications of Hyperstructure Theory; Kluwer Academic Publishers, 2003. [Google Scholar]
  4. Mordeson, J. N.; Bhutani, K. R.; Rosenfeld, A. Fuzzy Group Theory. In Studies in Fuzziness and Soft Computing; Springer-Verlag, 2005; vol. 182. [Google Scholar]
  5. Mordeson, J. N.; Malik, D. S. Fuzzy Commutative Algebra; World Scientific, 1998. [Google Scholar]
  6. Çallıalp, F.; Tekir, Ü. Değişmeli Halkalar ve Modüller; Birsen Yayınevi, 2009. [Google Scholar]
  7. Anderson, D. D.; Smith, E. Weakly Prime Ideals. Houst. J. Math. 2003, 29(4)(2003), 831–840. [Google Scholar]
  8. Ameri, R.; Norouzi, M. On Commutative Hyperrings. Int.Journal Algebr. Hyperstructures Its Appl. 2014, Vol. 1(No.1), 45–58. [Google Scholar]
  9. Dasgupta, U. Prime and Primary Hyperideals of a Multiplicative Hyperrings. Article in Analele Stiintifice ale Universitatii Al I Cuza din Iasi-Matematica 2012, f 1(1), 19–36. [Google Scholar] [CrossRef]
  10. The Sage Developers. SageMath, the Sage Mathematics Software System (Version 9.0). 2020. Available online: http://www.sagemath.org.
  11. Krum, H. J.; et al. Java Algebra System. 2018. Available online: https://github.com/krumheuer/jas.
  12. Davvaz, B. Hyperring theory and applications. Adv. Math. 2007, 13(3), 441–469. [Google Scholar]
  13. Stinson, D. R. Cryptography: Theory and Practice; CRC Press, 2005. [Google Scholar]
  14. Koblitz, N. A Course in Number Theory and Cryptography; Springer-Verlag, 1994. [Google Scholar]
  15. Dummit, D. S.; Foote, R. M. Abstract Algebra; Wiley, 2004. [Google Scholar]
  16. Shoup, V. A Computational Introduction to Number Theory and Algebra; Cambridge University Press, 2009. [Google Scholar]
  17. Menezes, A. J.; van Oorschot, P. C.; Vanstone, S. A. Handbook of Applied Cryptography; CRC Press, 1996. [Google Scholar]
  18. Fraleigh, J. B. A First Course in Abstract Algebra; Pearson Education, 2013. [Google Scholar]
  19. Davvaz, B.; Cristea, I. A course on hyperstructures for computer scientists and engineers. Cogent Eng. 2015, 2(1). [Google Scholar]
  20. Diffie, W.; Hellman, M. New directions in cryptography. IEEE Trans. Inf. Theory 1976, 22(6), 644–654. [Google Scholar] [CrossRef]
  21. Mozilla Foundation. Rhino: Scripting Java. Available online: https://github.com/mozilla/rhino.
Figure 1. The Cayley table and analysis results generated for the user-defined set {1,2,3} and the rule a ο b = {4ab, 7ab}.
Figure 1. The Cayley table and analysis results generated for the user-defined set {1,2,3} and the rule a ο b = {4ab, 7ab}.
Preprints 221114 g001
Table 1.
0 ̄ 1 ̄ 2 ̄ 3 ̄
0 ̄ 0 ̄ 1 ̄ 2 ̄ 3 ̄
1 ̄ 1 ̄ 2 ̄ 3 ̄ 0 ̄
2 ̄ 2 ̄ 3 ̄ 0 ̄ 1 ̄
3 ̄ 3 ̄ 0 ̄ 1 ̄ - 2
Table 2.
0 ̄ 1 ̄ 2 ̄ 3 ̄
0 ̄ 0 ̄ 0 ̄ 0 ̄ 0 ̄
1 ̄ 0 ̄ Z4 { 0 ̄ , 2 ̄ } Z4
2 ̄ 0 ̄ { 0 ̄ , 2 ̄ } 0 ̄ { 0 ̄ , 2 ̄ }
3 ̄ 0 ̄ Z4 { 0 ̄ , 2 ̄ } Z4
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2026 MDPI (Basel, Switzerland) unless otherwise stated

Accessibility

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings