Building Elliptic Curve Cryptography With Public Key To Encrypt Vietnamese Text

—Today, Elliptic Curve Cryptography (ECC) has many practical applications. ECC was a direction in lightweight primitive cryptography. This paper is based on the arithmetic idea of an Elliptic curve. Elliptic curve arithmetic can be used to develop Elliptic curve encryption schemes such as key exchange, encryption, and digital signature. Compared with traditional cryptosystems with the same level of security, Elliptic curve cryptography has a smaller key size, reducing processing costs. To encode the Vietnamese text, we are based on the sound of Vietnamese characters to make a table of these characters’ order. In the present paper, we apply a new encryption algorithm with a public key using an Elliptic curve over finite fields on our proposed Elliptic curve equation.


I. INTRODUCTION
The elliptic curve cipher systems (ECC) invented by Neal Koblitz [1] and Victor Miller [2] in 1985 can be considered as elliptic curves of discrete logarithmic cryptographic systems, in which the group * is replaced by the group of points on an elliptic curve over a finite field. The mathematical basis for the security of elliptic curve cryptographic systems is the computational computation of the discrete elliptic logarithm problem (ECDLP).
In recent years in Vietnam, the Elliptic curve has played an important role, according to The Elliptic curve cryptography system is used in dynamic secure routing link detection [3], in an effective and secure RFID authentication [4], as well as in wireless sensor networks using the number-theoretic to transform [5]. In the paper [6], the authors presented the implementation of ECC by first converting the message into an affine point on the Elliptic curve, then applying the knapsack algorithm on the ECC encrypted message over the finite field GF(p). They will illustrate encryption/decryption involving the embedding system m → Pm, which imbeds the characters constituting the message and then subjected it.

CRYPTOSYSTEMRSYMBOLS AND ABBREVIATIONS
Elliptic curve E over a finite field GF(p) where p is a prime number, a set of points (x, y) satisfying the following equation: E: y 2 = x 3 + ax + b (1) Where a, b are integers modulo p, satisfying: 4a 3 + 27b 2 ≠ 0 which is an Elliptic curve. That is, no point of a curve has two or more distinct tangent lines. And includes a point ∞ called infinity. Forgiven values of a and b, the graph consists of positive and negative values of y for each value of x. Hence this curve is symmetrical with the x-axis.
We also illustrate the implementation of a cryptographic system based on an Elliptic curve with a public key that corresponds to the chosen Elliptic curve equation: For equation (2) then a = 18, b = 29, we have 4 *(18) 3 + 27*(29) 2 = 46035 ≠ 0. Therefore, equation (2) is an Elliptic curve equation.

C. Addition formula
There is a rule, called the chordand -tangent rule, for adding two points on an elliptic curve E(Fp) to give a third elliptic curve point. Together with this addition operation, the set of points E(Fp) forms a group with ∞ serving as its identity. It is this group that is used in the construction of elliptic curve cryptosystems. The addition rule is best explained geometrically. Let P = (x 1 , y 1 ) and Q = (x 2 , y 2 ) be two distinct points on an elliptic curve E. If x 1 = x 2 and y 1 = -y 2 then we define P + Q = ∞. Otherwise, P + Q = (x 3 , y 3 )  E where x 3 =  2 -x 1 x 2 , y 3 = (x 1x 3 )y 1 , with:  = { (y 2 − y 1 )/(x 2 − x 1 ), khi P ≠ Q (3x 1 2 + a) /(2y 1 ), khi P = Q So if P ≠ Q means x1 ≠ x2, we have: If P = Q means x1 = x2, we have: Note that the points (x 3 , y 3 ), (x 3 , -y 3 ) are also on the E curve and geometrically, the points (x 1 , y 1 ), (x 2 , y 2 ), (x 3 , -y 3 ) ) are also on a straight line. Besides, define an infinite plus point by itself. P + ∞ = ∞ + P = P [9]. If P is a point on an elliptic curve and k is a positive integer, kP denotes P + P + · · · + P (with k summands). If k < 0, then kP = (-P) + (-P) + · · · + (-P), with |k| summands. To compute kP for a large integer k, it is inefficient to add P to it repeatedly. It is much faster to use successive doubling. For example, to compute 19P, we compute 2P, 4P = 2P+2P, 8P = 4P + 4P, 16P = 8P + 8P, 19P = 16P + 2P + P. This method allows us to compute kP for very large k, say of several hundred digits, very quickly. The only difficulty is that the size of the coordinates of the points increases rapidly if we are working over the rational numbers. However, when we are working over a finite field, for example Fp, this is not a problem because we can continually reduce mod p and keep the numbers involved relatively small. It should be noted that the associative law allows us to make these computations without worrying about what order we use to combine the summands [8].
When the sum of the points P and Q on the elliptic curve E is shown in Figure 1. The result is determined that the point S is obtained by reversing the sign of the y coordinate of the point R, where R is the intersection point of E and the line through P and Q. If P and Q are in the same position, the line is the tangent of E at P. In addition, the sum of the points at infinity and the point P is determined to be exactly the point P as Figure 2.

III. DESCRIPTION OF THE ALGORITHM
When two communicating parties Alice and Bob want to transmit the messages, they agree upon to use an elliptic curve Ep(a, b) where p is a prime number and a random point C on the elliptic curve. Alice chooses a great random number α which is less than the order of Ep(a, b) and a point A on the elliptic curve. Alice computes A1 = α(C + A) and A2 = αA. She keeps the random number α and the point A as her private keys and publishes A1 and A2 as her general public keys. Similarly, Bob selects a large random number β and a point B on the elliptic curve. He computes B1 = β(C+B) and B2 = βB. He keeps the random number β and point B as his private keys and publishes B1 and B2 as his general public keys. After publishing the public keys, the communicating parties again calculate the following quantities and publish them as their specific public keys of each other.
Alice calculates AB = αB2 and publishes it as her specific public key for Bob calculates BA = βA2 and publishes it as his specific public key for Alice Alice's private key 1 = α, a large random number less than the order of the generator.

A. Encryption
If Bob wants to communicate the message M then all the characters of the Vietnamese text are coded to the points on the elliptic curve using the code table which is agreed upon by the communicating parties Alice and Bob. Then each message point is encrypted to a pair of cipher points E1, E2. He uses a random number γ which is different for the encryption of different message points.
After encrypting all the characters of the message Bob converts the pair of points of each message point into the text characters using the code table. Then he communicates the ciphertext to Alice in a public channel.

B. Decryption
After receiving the ciphertext, Alice converts the ciphertext into the points on the elliptic curve and recognizes the points E1 and E2 of each character. Then she decrypts the message as follows. M = E2 -(αE1 +αB1 + BA) In this method a group of communicating parties A, B, C, D…can communicate with one another securely, non-repudiatively in an authentic manner. Here each communicating party say X publishes two general public keys X1, X2. X also publishes a specific public key XY to be used by the communicating party Y for communication with Y. When Y wants to communicate with X, Y uses the general public keys of X (X1, X2), the specific public key published by X for Y (XY) and Y's secret key y. To decrypt the message X uses Y's general public keys (Y1, Y2), the specific public key published by Y for X (YX) and X's secret key x. Here X creates specific public key XY for Y using Y's public keys and X's secret key. So, this method of encryption using elliptic curves over finite fields is highly suitable for communication between groups of corporate/ government institutions.

ENCRYPTION OF THE ABOVE ALGORITHM.
Alice sends Bod a plaintext (input document) as "VIỆT NAM". To ensure the confidentiality of the transmission process, Alice will encrypt the plaintext before sending it on the channel. The encoding process is presented as follows: Determine the total number of points on an elliptic curve, and find P as a point generator.
For curve E at "(1)" we have 131 points on the curve including the infinity. We find the point P = (7, 9). Using the formula "(4)" and formula "(5)" calculates points on the curve as the set of points below. He keeps the random number β = 5 and the point B on the elliptic curve as his secret keys and publishes B1 and B2 as his public keys.

A. Encryption
When Bob wants to communicate the message 'Việt Nam' to Alice, Bob converts all the text characters of the message into the points on the elliptic curves using the agreed-upon code table.  Bob communicates { í, ]; t, ê; ), ỉ; ẹ, p; ỗ, ử; ẩ, ă; x, ệ; ^, ị}as the ciphertext to Alice in public channel.

V. CONCLUSION
We have presented above, that the communicating parties agree upon to use an elliptic curve and a point C on the elliptic curve. With the Elliptic curve equation to be proposed, it has a sufficient number of points to contain the number of characters in the Vietnamese string. The elliptic curve parameters for cryptographic schemes should be carefully chosen to resist all known attacks of the Elliptic Curve Discrete Logarithmic Problem (ECDLP). Each message point is encrypted as a pair of points on the elliptic curve. Here a random number γ is used in the encryption of each message point and γ is different for the encryption of different message points. That is why the same characters in the message space are encrypted to different characters in the cipher space. The difference between the characters of the plain text is not the same as the difference between the characters of the ciphertext. Due to this, the linear cryptanalysis is highly difficult. In addition to this each character of the message is coded to the point on the elliptic curve using the code table which is agreed upon by the communicating parties and each message point is encrypted to a pair of points on the elliptic curve. Hence, the method of encryption proposed here provides sufficient security against cryptanalysis at a relatively low computational overhead. Moreover, the security of the Elliptic Curve Cryptography depends on the difficulty of finding the value of k, given kP where k is a large number and P is a random point on the elliptic curve. This is the Elliptic Curve Discrete Logarithmic Problem. The straightforward use of public key encryption provides confidentiality, but not authentication. Each communicating party publishes a specific public key for the communication with a specific communicator. With this, the receiver is assured that the cipher was constructed by the sender only because the sender uses the receiver's general public keys, the receiver's specific public key published for the sender alone, and the sender's private key for constructing the cipher. This ensures that the sender has "digitally signed" the message by using the specific public key published for him alone by the receiver. Hence, the cipher has achieved the qualities of confidentiality, authentication, and non-repudiation.