Plaintext coding method
By dividing large integers into multiple small integers and performing encryption and decryption operations in algebraic integer rings, the problem of inefficient encryption and decryption efficiency of public key cryptography system is solved, and the effect of significantly improving the encryption and decryption speed is achieved.
Patent Information
- Application Number
- CN202411086046.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-12-06
AI Technical Summary
The existing public key cryptography system is less efficient in the encryption and decryption process, especially when processing large-scale data, which makes users unable to tolerate long-term processing time consumption.
The plaintext encoding method based on algebraic integers is adopted to divide large integers into multiple smaller integers, and the encrypted and decrypted operations are performed through the algebraic integer ring and multiplication subgroup on the finite domain, which improves efficiency.
By dividing large integers into multiple small integers, the number of encryption and decryption times and calculation complexity are reduced, and the encryption and decryption efficiency is significantly improved. Especially at the same security level, the encryption and decryption speed of the algebraic integer cryptography system exceeds that of the elliptic curve cryptography system. 30 times the rate.
Smart Images

Figure CN119094110A_ABST
Abstract
Description
Technical Field
[0001] The disclosed embodiments relate to the technical field of cryptographic data processing, and in particular to a plaintext encoding method. Background Art
[0002] Public key cryptography systems are divided into encryption systems and signature systems according to their uses. Compared with traditional cryptography systems, the advantage of public key cryptography systems is that they are more convenient to manage and distribute keys. Public key cryptography systems are all based on the assumption of computational difficulty. The public key cryptography systems that are still in use are either based on the assumption of difficulty in factoring large integers (such as the RSA cryptography system) or the assumption of difficulty in solving discrete logarithms (such as GL GAMAL and elliptic curve cryptography systems). The security level of the cryptography system is marked by the binary length of the elliptic curve cryptography system key (private key). Common security levels include EC160, EC192, and EC256. At the same security level, the elliptic curve cryptography system is considered to have the fastest encryption, decryption, or signature verification speed. Even if the lowest security level EC160 is used, it takes about 1 to 2 minutes to encrypt and decrypt 1M (megabytes) of data using the elliptic curve cryptography system. Users cannot tolerate the time consumption of processing tens or even hundreds of megabytes of data. A basic mathematical structure and plaintext encoding method that can improve the efficiency of encryption and decryption is needed. Summary of the invention
[0003] The present disclosure provides a method for encoding plain text based on algebraic integers. The use of algebraic integers makes the scale p d The integer of -1 is divided into d integers of size p, thereby improving the efficiency of encryption and decryption. Converting the processing of large integers into processing of small integers is a data operation method that cannot be implemented by existing public key cryptography systems.
[0004] The present disclosure provides a plaintext encoding method, including:
[0005] Step 1: For an odd prime number p, an irreducible d-degree integer coefficient polynomial f(x)=x in the field of rational numbers d +a1x d-1 +...+a d-1 x+a d The root δ and number field In finite fields The algebraic integer ring over Let L equal p d -1 binary digits, M is equal to the integer part of (L-1) / 8, N = 8M;
[0006] Step 2: Convert the packet data into a non-negative integer plaintext P with a binary digit number N, and express P as P = λ0+λ1p+λ2p 2 +...+λ d-1 p d-1, so that (λ d-1 ...λ2λ1λ0) p is the p-ary representation of P, where λ i Represents the p-base digit of the plaintext P, i∈{0,1,...,d-1};
[0007] Step 3, according to Encode the plaintext P into an algebraic integer λ0+λ1δ+λ2δ 2 +...+λ d-1 δ d-1 , that is, P is encoded as elements.
[0008] According to a specific implementation of the embodiment of the present disclosure, the step 1 further includes the following steps:
[0009] Select a polynomial of degree d with integer coefficients f(x) = x d +a d-1 x d-1 +...+a1x+a0 makes f(x) in the field of rational numbers Irreducible on the d-order domain The number of classes is not equal to 1, where d ≥ 2, and δ is the root of the polynomial f(x);
[0010] Select the security level Security_Level;
[0011] choose The algebraic integer γ and the odd prime number p are such that In finite fields The algebraic integer ring over The order Q of the multiplicative subgroup <γ> of is an odd prime number, and p and Q can ensure that the cryptographic system based on the group <γ> has a given security level Security_Level, where Q|(p d -1), The elements of are represented by the algebraic integers λ0+λ1δ+λ2δ 2 +...+λ d-1 δ d-1 , a non-negative integer λ k (k∈{0,1,...,d-1}) is elements.
[0012] The beneficial effects of the embodiments of the present disclosure are as follows: According to the method of the present disclosure, the order Q of <γ> satisfies Q <p d -1 makes the number of encryption and decryption main loops log2Q less than log2(p d -1), processing d smaller integers is more efficient than processing one larger integer, thereby improving the efficiency of encryption and decryption. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solution of the embodiments of the present disclosure, the following briefly introduces the drawings required in the embodiments. It is obvious that ordinary technicians in this field can obtain other structural diagrams or flow charts based on these drawings without any creative work.
[0014] Figure 1 A plaintext encoding flow chart provided for an embodiment of the present disclosure;
[0015] Figure 2 The encryption and decryption diagram provided by the embodiment of the present disclosure is as follows: Figure 2 (a) is the encryption diagram. Figure 2 (b) is a schematic diagram of decryption;
[0016] Figure 3 A public key generation flow chart provided for an embodiment of the present disclosure;
[0017] Figure 4 An encryption flow chart provided for an embodiment of the present disclosure;
[0018] Figure 5 A decryption flow chart provided for an embodiment of the present disclosure. DETAILED DESCRIPTION
[0019] The following is a detailed description of the embodiments of the present disclosure in conjunction with the accompanying drawings. Those skilled in the art can understand the advantages of the embodiments of the present disclosure based on this specification. Obviously, the embodiments described are not all embodiments. Other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without creative work are all within the scope of protection of this patent.
[0020] The embodiment of the present disclosure provides a plaintext encoding method, which is applied to data protection in Internet scenarios.
[0021] See also Figure 1 , is a flow chart of a plaintext encoding method provided by an embodiment of the present disclosure. Figure 1 As shown, the method mainly comprises the following steps:
[0022] Step 1: For an odd prime number p, an irreducible d-degree integer coefficient polynomial f(x)=x in the field of rational numbers d +a1x d-1 +...+a d-1 x+a d The root δ and number field In finite fields The algebraic integer ring over Let L equal p d -1 binary digits, M is equal to the integer part of (L-1) / 8, N = 8M;
[0023] Before step 1, the method further comprises:
[0024] Select a polynomial of degree d with integer coefficients f(x) = x d +a d-1 x d-1 +...+a1x+a0 makes f(x) in the field of rational numbers Irreducible on the d-order domain The number of classes is not equal to 1, where d ≥ 2, and δ is the root of the polynomial f(x);
[0025] Select the security level Security_Level;
[0026] choose The algebraic integer γ and the odd prime number p are such that In finite fields The algebraic integer ring over The order Q of the multiplicative subgroup <γ> of is an odd prime number, and p and Q can ensure that the cryptographic system based on the group <γ> has a given security level Security_Level, where Q|(p d -1), The elements of are represented by the algebraic integers λ0+λ1δ+λ2δ 2 +...+λ d-1 δ d-1 , a non-negative integer λ k (k∈{0,1,...,d-1}) is Elements of
[0027] Step 2: Convert the packet data into a non-negative integer plaintext P with a binary digit number N, and express P as P = λ0+λ1p+λ2p 2 +...+λ d-1 p d-1 , so that (λ d-1 ...λ2λ1λ0) p is the p-ary representation of P, where λ i Represents the p-base digit of the plaintext P, i∈{0,1,...,d-1};
[0028] Step 3, according to Encode the plaintext P into an algebraic integer λ0+λ1δ+λ2δ 2 +...+λ d-1 δ d-1 , that is, P is encoded as elements.
[0029] The security of the system is based on the assumption that discrete logarithms are difficult to solve. The elliptic curve cryptosystem relies on the elliptic curve group E Q (a,b), where a and b are elliptic curve v 2 =u3 The parameters of +au + b, where Q is an odd prime. The GLGAMAL cryptosystem relies on a finite field and a primitive root r of q, where q is an odd prime. This invention relies on the ring of algebraic integers and its multiplicative subgroup <γ> of order Q, where δ is a root of the integral coefficient polynomial f(x) = x d + a1x d-1 +... + a d-1 x + a d of degree d, and the polynomial f(x) is irreducible over the rational number field and the class number of the number field of degree d is not equal to 1, p and Q are odd primes, and Q|(p d - 1). The (known) attack algorithms for cryptosystems based on the difficulty assumption of solving discrete logarithms are the Shanks discrete logarithm algorithm and the index calculus discrete logarithm algorithm. The elliptic curve cryptosystem has to resist the Shanks discrete logarithm algorithm with a time complexity of and the GLGAMAL cryptosystem has to resist (mainly) the index calculus discrete logarithm algorithm with a time complexity of . Let n = p d - 1. For the algebraic integer cryptosystem, select d, p, and the multiplicative subgroup <γ> such that the order Q of <γ> is a prime number and Q divides n. Based on and <γ>, establish a cryptosystem. Then the time complexity of the Shanks discrete logarithm attack algorithm is and the time complexity of the index calculus discrete logarithm attack algorithm is . Appropriately select p and <γ> such that is comparable to . Taking d = 3 as an example, at the same security level (where the minimum time complexity of the attack algorithm is comparable), the encryption and decryption speed of the algebraic integer cryptosystem is more than 30 times that of the elliptic curve cryptosystem. The reason why the algebraic integer cryptosystem is superior to the elliptic curve cryptosystem at the same security level is that the order of <γ> is comparable to the order of E Q (a, b), but the group operation of <γ> is more efficient than the elliptic curve group operation; the reason why the algebraic integer cryptosystem is superior to the GL GAMAL cryptosystem is: (1) n is comparable to the q of the finite field of the GL GAMAL cryptosystem , but the order Q of <γ> is less than the order q - 1 of r modulo q, thus reducing the number of main encryption and decryption loops; (2) the data of size n in the algebraic integer cryptosystem is divided into d data of size p (p < q), and processing d small data is more efficient than processing one large data.
[0030] Agreement and represent "for any" and "there exists" respectively, and represent the set of integers and the set of rational numbers respectively, represents the set of non - negative integers, \(A\setminus B\) represents the difference set of two sets, and \(a|b\) means \(a\) divides \(b\). For an integer \(t(t\neq0)\) and a positive integer \(n(2\leq n)\), it is agreed that the order \(ord\) n (t) represents the smallest positive integer \(k\) such that \(t\) k \(\equiv1(\bmod n)\). It is agreed that \((t\bmod n)\) represents the integer \(s\) that satisfies the conditions \(0\leq s\lt n\) and \(s\equiv t(\bmod n)\), and it is agreed that \((t\) -1 \(\bmod n)\) represents the inverse of \(t\) modulo \(n\).
[0031] Let be an ordered ring of integers, \(d(d\geq2)\) be a positive integer, and the polynomial with integer coefficients \(f(x)=x\) d \(+a_1x\) d-1 \(+\cdots +a\) d-1 \(x + a\) d is irreducible over , \(\delta\) is a root of the polynomial \(f(x)\), the class number of is not equal to \(1\) (thus the ring of algebraic integers d is not a principal ideal domain), \(p\) and \(Q\) are large prime numbers, \(Q|(p\) \(- 1)\), \(\langle\gamma\rangle\) is the multiplicative subgroup of order \(Q\) of 2 , \(\cdots,\delta\) d-1} is a basis of as a linear space over the field , so the elements of 2 (and thus \(\langle\gamma\rangle\)) are represented as linear combinations \(\lambda_0+\lambda_1\delta+\lambda_2\delta\) d-1 \(+\cdots+\lambda\) d-1 \(\delta\) x , where the combination coefficients are elements of . Let \(x\in\{1,2,\cdots,Q - 1\}\), and
[0032] \(y\equiv\gamma\) k \((\bmod p)\). (1)
[0033] For and let
[0034] \(a = (\gamma\) k \(\bmod p)\), (2)
[0035] \(b=(P\cdot y\) x \(\bmod p)\), (3)
[0036] \(C=(a,b)\), then
[0037] (a x ) -1 b≡(γ kx ) -1 (P·y k )≡P(modp). (4)
[0038] The components a and b of C and P are expressed as λ0+λ1δ+λ2δ 2 +...+λ d-1 δ d-1 The algebraic integers, where the combination coefficients are The non-negative integerized plaintext (block) P is represented as an algebraic integer, and the ciphertext (block) C is represented as an algebraic integer pair.
[0039] In the embodiment, d=3 is taken, and the polynomial is x 3 +αx+β, the non-negative integer plaintext (block) P is encoded as λ0+λ1δ+λ2δ 2 . (Thus, the multiplication operation of <γ>) implicitly uses α and β. With (p,Q,α,β,γ,y) as the public key (referred to as y as the public key), the data sender randomly selects k∈{1,2,...,Q-1} and encrypts the plaintext P according to formulas (2) and (3) to obtain the ciphertext C. With (p,Q,α,β,x) as the private key (referred to as x as the private key), the data receiver restores C to P according to formula (4).
[0040] Ensuring system security is the primary goal of cryptographic systems. Algebraic integer cryptographic systems are based on the assumption that discrete logarithms are difficult to solve. The attack algorithms for such systems include the Shanks discrete logarithm algorithm and the index screening discrete logarithm algorithm. The order Q of <γ> determines the time complexity of the Shanks discrete logarithm algorithm O(Q 1 / 2 log2Q). Let B = {p1, p2, ..., p m} is an integer factorization basis. For y∈<γ> and y≡γ x (modp) The basic idea of the index screening discrete logarithm algorithm for solving x is:
[0041] Filter positive integer x i (1≤i≤m) such that The norm N(g i ) can be decomposed into
[0042]
[0043] And the following congruence equations (about the unknown quantity log N(γ) p j )
[0044]
[0045] (2) Select a positive integer x such that The norm N(g0) of can be decomposed into
[0046]
[0047] Right now
[0048]
[0049] because
[0050] N(y)=N x (γ),
[0051] so
[0052] x=log N(γ) N(y).
[0053] exist Decomposition N(g i )(0≤i≤m) instead of Direct decomposition of g i Because is not a principal ideal integer ring. Is it possible to design discrete logarithm algorithms with different indices for principal ideal rings? This is similar to the case of decomposing RSA integers. When is the principal ideal ring, the special number field sieve method is used to decompose the RSA integer. When it is not a principal ideal domain, the universal number field sieve method (of decomposition norm) is used to decompose the RSA integer. Let n = p d -1. Make sure is not a principal ideal integer ring to prevent attackers from Direct decomposition of g i , this is to ensure that the time complexity of the index screening discrete logarithm attack algorithm for the algebraic integer cryptosystem is not less than
[0054] Definition 1: is an ordered ring of integers, right If all prime factors of I are less than or equal to B, then I is called a B-smooth integer.
[0055] Definition 2: is an ordered ring of integers, If there are h integers in the real number interval [1,I] that are B-smooth integers, then h / I is called the B-smooth probability of a random integer k in the interval [1,I].
[0056] Remember L x[u, v] = exp(v(ln x) u (ln ln x) 1-u ). For if s < r ≤ 1, then the random integer in the real number interval [1, L x [r, a]] is L x [s, b]-smooth integer is L x [r - s, -(r - s)a / b + o(1)] (x → ∞), where o(1) represents a small quantity whose absolute value is much less than 1. [-n, n] is the range of the norm N(g i )(0 ≤ i ≤ m), and n represents the scale of the integer to be factored. For the index calculus discrete logarithm algorithm, only r = a = 1 can be taken. Therefore, the random integer in the interval [-n, n] is L n [s, b]-smooth integer is L n [1 - s, -(1 - s) / b + o(1)]. The time complexity of the index calculus discrete logarithm algorithm is L n [s, b]L x [1 - s, (1 - s) / b + o(1)]. The optimal value of s is 1 / 2. Therefore, the time complexity of the algorithm is L n [1 / 2, b + 1 / (2b) + o(1)]. The optimal value of b is Therefore, the time complexity of the algorithm is That is not the time complexity described in many literature materials The time complexities of the quadratic sieve method and Dixon sieve method for integer factorization are respectively and These two time complexities can both be expressed as However, the actual performances of these two algorithms are very different. is an inaccurate (upper bound) representation form of the time complexity of the index calculus discrete logarithm algorithm. For d = 3, it is easy to verify that:
[0057]
[0058]
[0059] The (binary) 160-bit p of the elliptic curve cryptosystem is against the Shanks discrete logarithm algorithm, and the index calculus discrete logarithm algorithm is not applicable to the elliptic curve cryptosystem. The 151-bit p of the cubic algebraic integer cryptosystem is against the index calculus discrete logarithm algorithm. Taking 151-bit p makes p 3If the number of (binary) digits of the prime factor Q of -1 is slightly greater than or equal to 160, then the security level of the cubic algebraic integer encryption system is EC160, and the system's ability to defend against the two attack algorithms is equivalent. The data listed in Table 1 are equivalent security evaluation data.
[0060]
[0061] Table 1
[0062] The security protection discussed above is passive security protection. There is also active security protection. Active security protection is mainly used in cloud storage, military and financial systems where system software is protected. Data encryption and decryption software is equivalent to a code book. If the data encryption and decryption software cannot be easily obtained (the code book is protected), then the software system can provide active security protection. For the active security protection cubic algebraic integer encryption system, the parameters p, Q, α and β are configured in the software system, and the public key and private key are represented as (γ, y) and x respectively. Obviously, it is impossible to derive x from (γ, y). Active security protection is reliable security protection, provided that the reliable security of the encryption and decryption software (code book) is ensured. (p, Q) and (α, β) are many-to-many relationships. (p, Q) and (α, β) of the cubic algebraic integer encryption system can be configured independently, that is, (p, Q, α, β) do not have to be assigned to the same administrator for configuration, thus enhancing the active security of the system. RSA, EL_GAMAL and elliptic curve cryptography systems do not have parameters (α, β), and their active security protection capabilities are relatively weak.
[0063] The present invention will be further described in conjunction with a specific embodiment. Represents input and output data, represents processing, → represents data flow, To express judgment, Indicates the beginning and the end. Figure 2 (a) shows the encryption process of the embodiment system. Figure 2 (b) shows the decryption process of the embodiment system.
[0064] The cubic algebraic integer encryption system takes d = 3 and the irreducible polynomial is x 3 +αx+β. The objective effects of the embodiments of the present invention include: (1) providing active security protection functions that the existing encryption system does not have, which is achieved by selecting (α, β) and independently configuring parameters (p, Q) and (α, β); (2) improving the encryption and decryption speed of the encryption system, which is achieved by correctly converting the binary length of the system parameters (see Table 1), controlling the order of the group <γ>, and dividing large data into small data. In order to achieve the predetermined goals, the embodiments of the present invention adopt the following technical solutions.
[0065] After configuring the parameters (p, Q) and (α, β), the private key and public key do not need to contain these parameter values. The private key is represented by x and the public key is represented by (γ, y). Under the premise of ensuring the security of (p, Q) and (α, β), the private key x cannot be derived from the public key (γ, y). According to the component a=(a1, a2, a3) of the ciphertext (a, b), k cannot be derived. The attacker has no way to attack the cryptographic system. The cubic algebraic integer encryption system provides three layers of protection: (1) active security protection provided by (p, Q); (2) active security protection provided by (α, β); (3) passive security protection provided by the difficulty of solving discrete logarithms. Active security protection is reliable security protection. Passive security protection based on the assumption of computational difficulty cannot ensure the reliable security of data. Passive security protection is aimed at people who may have access to (p, Q) and (α, β) at the same time. In the event that (p, Q) and (α, β) are leaked at the same time, the cubic algebraic integer encryption system still has passive security protection capabilities.
[0066] The order Q of <γ> is related to the size of the private key space and the time complexity of the Shanks discrete logarithm attack algorithm. The size of the private key space on the group <γ> is Q, and the time complexity of the Shanks discrete logarithm attack algorithm is O(Q 1 / 2 log2Q). In the embodiment, d=3. The time complexity of the discrete logarithm attack algorithm is selected by the correlation index d and p. Let n=p 3 -1. The time complexity of the indicator screening discrete logarithm attack algorithm is If p and Q are taken as shown in Tables 2 to 4, the time complexity of the two attack algorithms for the cubic algebraic integer encryption system is equivalent.
[0067] Password system Parameter (number of binary digits) Encryption and decryption relative time Cubic Algebraic Integers 151 p, 163 Q (1,1) Elliptic Curve 160 bit p (31.8,32.0)
[0068] Table 2
[0069] Password system parameter Encryption and decryption relative time Cubic Algebraic Integers 209 p, 205 Q (1,1) Elliptic Curve 192 bit p (32.9,33.9)
[0070] Table 3
[0071] Password system parameter Encryption and decryption relative time Cubic Algebraic Integers 321 p, 271 Q (1,1) Elliptic Curve 256-bit p (33.5,38.0)
[0072] Table 4
[0073] The key algorithms of the embodiment system are the public key generation algorithm, the encryption algorithm and the decryption algorithm. These algorithms are universal, applicable to different discrete logarithmic cryptographic systems and easy to implement. They are presented here to illustrate why the algebraic integer cryptographic system is superior to the existing system. For any array A[], it is agreed that A.length represents the length of the array A[]; it is agreed that the multiplication of the group <γ> implicitly uses the parameters (α, β). The process of generating the public key is as follows: Figure 3 The pseudo code for generating a public key is described as follows.
[0074] [Public Key Algorithm]
[0075] Input: Modulus p, group generator γ, binary bit array xBits[] of private key x (0 < x < Q)
[0076] Output: None
[0077] Return: Public key y
[0078] (1) Initialize i = 0, y = 1, g = γ;
[0079] (2) If i = xBits.length, go to (6);
[0080] (3) If xBits[i] = 0, go to (5);
[0081] (4) Let y = y * g, y = (y mod p);
[0082] (5) Let g = g * g, g = (g mod p), i = i + 1, go to (2);
[0083] (6) Return y, end.
[0084] The encryption process is as Figure 4 shown. The encryption pseudocode is described as follows.
[0085] [Encrypt Algorithm]
[0086] Input: Modulus p, group generator γ, binary bit array kBits[] of random number k (0 < k < Q), public key y, plaintext P (0 ≤ P < p d )
[0087] Output: None
[0088] Return: Ciphertext C = (a, b)
[0089] (1) Create an array C[] of length 2, initialize i = 0; Let a = 1, b = 1, g = γ, h = y;
[0090] (2) If i = kBits.length, go to (6);
[0091] (3) If kBits[i] = 0, go to (5);
[0092] (4) Let a = a * g, a = (a mod p), b = b * h, b = (b mod p);
[0093] (5) Let g = g * g, g = (g mod p), h = h * h, h = (h mod p), i = i + 1, go to (2);
[0094] (6) Let b = b*P, b = (b mod p);
[0095] (7) Let C[0] = a, C[1] = b;
[0096] (8) Return to C and end.
[0097] In the encryption algorithm, the choice of k is related to Q, which is related to the number of main loops of steps (2) to (5). The corresponding number of loops in the EL GAMAL cryptosystem depends on the order q-1 of the primitive root r modulo q. At the same security level, the number of binary digits of q is approximately three times the number of binary digits of Q. This is one of the reasons why the encryption speed of the cubic algebraic integer cryptosystem is faster than that of the EL GAMAL cryptosystem. The second reason is that the algorithm design can be optimized so that the processing speed of three small integers in the cubic algebraic integer cryptosystem is faster than the processing speed of one large integer in the EL GAMAL cryptosystem. Let P1 = (x1, y1), P2 = (x2, y2) and P3 = (x3, y3) belong to the elliptic curve group E Q (a, b), P3=P1+P2, and
[0098]
[0099] So
[0100]
[0101] Elliptic curve group operations require the calculation of λ, so it is necessary to calculate the inverse of the integer modulus Q (division operation), which is an operation with a time complexity of O(log2Q). It is precisely because of this operation that the encryption speed of the elliptic curve cryptosystem is slower than that of the cubic algebraic integer cryptosystem at the same security level. The decryption process is as follows Figure 5 The decryption pseudo code is described as follows.
[0102] [Decrypt algorithm]
[0103] Input: modulus p, binary bit array xBits[] of private key x, ciphertext C[]
[0104] Output: None
[0105] Return: Plain text P
[0106] (1) Initialize i=0, set P=1, g=C[0];
[0107] (2) If i = xBits.length, go to (6);
[0108] (3) If xBits[i] = 0, go to (5);
[0109] (4) Let P = P*g, P = (P mod p);
[0110] (5) Let g = g*g, g = (g mod p), i = i + 1, and go to (2);
[0111] (6) Let P = (P -1 mod p);
[0112] (7) Let P = P*C[1], P = (P mod p);
[0113] (8) Return to P, ending.
[0114] The decryption speed of the algebraic integer cryptosystem is faster than that of the EL GAML and elliptic curve cryptosystems, for similar reasons to the encryption case. The reason why this embodiment improves the efficiency of encryption and decryption is that: the order Q of <γ> satisfies Q <p d -1 makes the number of encryption and decryption main loops log2Q less than log2(p d -1); it is more efficient to process d smaller integers than to process one larger integer.
[0115] The parameter values (p, Q, α, β, γ) of the cubic algebraic integer encryption system are selected for different security levels EC160, EC192 and EC256 respectively.
[0116] p 151 =1427247692872123397942199517345565079708319021,
[0117] Q 163 =8113252553370230630362781008071553730223172355389,
[0118] (α,β)=(-7,4),
[0119] γ=
[0120] (1328304477256976237080719722600425972451736474,59167443709453633785766166059298322739500171,498886090422825031398248655518554508396065586),
[0121] p 209=617064208995452265808113444422045670964312738847243861068445899,
[0122] Q 205 =34281344944191792544895191356779751653306161834001771524599721,
[0123] (a,b)=(-2,5),
[0124] c=
[0125] (538945521781056328420192252247995515047199583337287043527168318,493407260541159104058092742042774343635056673459624937012216135,281387825509533015376001512329480857499087143782980156782638938),
[0126] p 321 =
[0127] 2135987036169571700599915027247243238677179068998193488711688480636292011849459391013762582149231,
[0128] Q 271 =
[0129] 2267527659580285979443117251859444657678612062868192230050365845612740148405394981,
[0130] (a,b)=(-2,3),
[0131] c=
[0132] (1257368831343662276654381068910472534449832521764891679117413025794593762168375794485353136739580,189884331730706994640058766263481080399005221831 1168618874539636324863023247500399152699863141994,690894048933506741590123215472707038620027781528419719318758497388855566193549191778592960206461).
[0133] For (α, β)∈{(-7,4),(-2,5),(-2,3)}, for the polynomial x 3 +αx+β root δ, The number of classes is not equal to 1, the algebraic integer ring is not a principal ideal integral, so It is not a unique factored integral. The (relative) time cost of encryption and decryption obtained according to different values of system parameters (p, Q, α, β, γ) is shown in Tables 2 to 4. The plaintext length shown in Table 5 is set according to the encoding scheme. Taking security level EC160 as an example, because p = p 151 , p 3 The number of binary digits of -1 is L = 451, so the binary length of the plaintext P is 56 × 8 = 448, that is, [(L-1) / 8] × 8, where [] means rounding down. It is easy to implement the public key generation, plaintext encryption and ciphertext decryption algorithms based on the above parameter values (p, Q, α, β, γ), so the examples of these algorithms are skipped.
[0134] Security Level p <![CDATA[p 3 -1 binary number]]> Number of plaintext P bytes EC160 <![CDATA[p 151 ]]> 451 56 EC192 <![CDATA[p 209 ]]> 626 78 EC256 <![CDATA[p 321 ]]> 961 120
[0135] Table 5
[0136] Compared with the prior art, the beneficial effects of this embodiment are: providing active security protection function when the software is protected, improving data security; the encryption and decryption speed of the cubic algebraic integer is 30 times faster than that of the elliptic curve encryption system at the same (passive) security level. The experimental data listed in Tables 2 to 4 reflect the (encryption and decryption) speed advantage of the cubic algebraic integer encryption system over the elliptic curve data encryption system. At the same (passive) security level, the encryption and decryption speed of the cubic algebraic integer is 30 times faster than that of the elliptic curve encryption system, and this gap continues to widen as the security level increases.
[0137] It should be understood that various parts of the disclosed system may be implemented in hardware, software, firmware, or a combination thereof.
[0138] The above is only a specific implementation of the disclosed system, and the protection scope of the disclosed system is not limited thereto. Changes or substitutions obtained by those skilled in the art based on this embodiment are within the protection scope. The protection scope of the disclosed system shall be subject to the protection scope of the claims.
Claims
1. A plaintext encoding method, characterized in that: include: Step 1: For an odd prime number p, an irreducible d-degree integer coefficient polynomial f(x)=x in the field of rational numbers d +a1x d-1 +...+a d-1 x+a d The root δ and number field In finite fields The algebraic integer ring over Let L equal p d -1 binary digits, M is equal to the integer part of (L-1) / 8, N = 8M; Step 2: Convert the packet data into a non-negative integer plaintext P with a binary digit number N, and express P as P = λ0+λ1p+λ2p 2 +...+λ d-1 p d-1 , so that (λ d-1 ...λ2λ1λ0) p is the p-ary representation of P, where λ i Represents the p-base digit of the plaintext P, i∈{0,1,...,d-1}; Step 3, according to Encode the plaintext P into an algebraic integer λ0+λ1δ+λ2δ 2 +...+λ d-1 δ d-1 , that is, P is encoded as elements.
2. The method according to claim 1, characterized in that , the step 1 also includes the following steps: Select a polynomial of degree d with integer coefficients f(x) = x d +a d-1 x d-1 +...<+a1x+a0 makes f(x) in the field of rational numbers Irreducible on the d-order domain The number of classes is not equal to 1, where d ≥ 2, and δ is the root of the polynomial f(x); Select the security level Security_Level; choose The algebraic integer γ and the odd prime number p are such that In finite fields The algebraic integer ring over The order Q of the multiplicative subgroup <γ> of is an odd prime number, and p and Q can ensure that the cryptographic system based on the group >γ> has a given security level Security_Level, where Q|(p d -1), The elements of are represented by the algebraic integers λ0+λ1δ+λ2δ 2 +...+λ d-1 δ d-1 , a non-negative integer λ k (k∈{0,1,...,d-1}) is elements.
Citation Information
Cited By
System and method for verifying data transmission integrity based on whole ring
CN120281480A
A data transmission integrity verification system and method based on a complete ring
CN120281480B
