System to secure encoding and mapping on elliptic curve cryptography (ECC)
11502818 · 2022-11-15
Inventors
Cpc classification
H04L9/3066
ELECTRICITY
International classification
H04L9/00
ELECTRICITY
Abstract
A system in Elliptic Curve Cryptography (ECC) that offers secure encoding and mapping of a message to the curve E against encryption attacks, such as Chosen Plaintext Attack (CPA) and Ciphertext Only Attack (COA). The system includes, a method to convert the text message to numerical values with manipulation using Initial Vector IV. In addition, the system provides, a method to revert the manipulated values to their original value.
Claims
1. A method for securing encoding and mapping in Elliptic Curve Cryptography (ECC) that is secured against several encryption attacks including chosen plaintext attack (CPA) and ciphertext only attack (COA), the method comprising: obtaining a plaintext message; dividing the plaintext message into a set of s characters, wherein a block size and a number of blocks is obtained from s; dividing the message to a set of blocks; encoding and manipulating each block with an initial vector (IV) to secure each block to obtain encoded and manipulated blocks; mapping the encoded and manipulated block to an elliptic curve (E) to obtain a first mapped point; XORing the next block with the first mapped point to obtain a next encoded and manipulated block then map it to the elliptic curve (E); repeating the XORing procedure between the next mapped points and the next encoded and manipulated blocks until all blocks have been secured and manipulated; encrypting the mapped points using a secret key to obtain encrypted points; decrypting the encrypted points using the secret key to obtain the mapped points; decoding the first mapped point by performing an XOR operation between the first block and the initial vector (IV); repeating the XORing procedure between the secured and manipulated block and each corresponding mapped point to produce the original nonmanipulated mapped points; converting the mapped points to binary values; and converting the binary values and grouping 8 bits of these values to convert to its corresponding character, wherein the plaintext message is all characters grouped in one set.
2. The method of claim 1, wherein dividing the message to the set of blocks comprises steps including: obtaining a size of prime number p in bit using an equation used for obtaining a block size (Bs), wherein the equation is BS=[(p−8)/8]; obtaining the block size based on the size of the prime number p; obtaining a the number of blocks based on the block size and the value of s; and grouping each set of characters presented in binary values to the set of blocks.
3. The method of claim 2, wherein the initial vector (IV) is obtained with the same size of the prime number p.
4. The method of claim 1, wherein mapping the encoded and manipulated blocks to the elliptic curve (E) includes converting the binary values to decimal values and mapping it to the elliptic curve (E) to obtain the mapped point.
5. The method of claim 1, wherein the mapped points are encrypted by performing an addition operation between the mapped points and the secret key.
6. The method of claim 1, wherein the encrypted points are decrypted by performing a subtraction operation between the encrypted points and the secret key.
7. A system to secure encoding and mapping in Elliptic Curve Cryptography (ECC) that is secured against several encryption attacks including chosen plaintext attack (CPA) and ciphertext only attack (COA), the system comprising: circuitry configured to: obtaining a plaintext message; dividing the plaintext message into a set of s characters, wherein a block size and a number of blocks is obtained from s; dividing the message to a set of blocks; encoding and manipulating each block with an initial vector (IV) to secure each block to obtain encoded and manipulated blocks; mapping the encoded and manipulated blocks to an elliptic curve (E) to obtain a first mapped points; XORing the next block with the first mapped point to obtain a next encoded and manipulated block then map it to the elliptic curve (E); repeating the XORing procedure between the next mapped points and the next encoded and manipulated blocks until all blocks have been secured and manipulated; encrypting the mapped points using a secret key to obtain encrypted points; decrypting the encrypted points by using the secret key to obtain the mapped points; decoding the first mapped point by performing an XOR operation between the first block and the initial vector (IV); repeating the XORing procedure between the secured and manipulated block and each corresponding mapped point to produce the original nonmanipulated mapped points; converting the mapped points to binary values; and converting the binary values and grouping 8 bits of these values to convert to its corresponding character, wherein the plaintext message is all characters grouped in one set.
8. The system of claim 7, wherein the circuitry is further configured to: obtain a size of prime number p in bit using an equation used for obtaining a block size (Bs), wherein the equation is BS=[(p−8)/8]; obtain the block size based on the size of the prime number p; obtain number of blocks based on the block size and the value of s; and group each set of characters presented in binary values to the set of blocks.
9. The system of claim 8, wherein the initial vector (IV) is obtained with the same size of the prime number p.
10. The system of claim 7, wherein the circuitry is further configured to convert the binary values to decimal values and map it to the elliptic curve (E) to obtain the mapped points.
11. The system of claim 7, wherein the circuitry is further configured to encrypt the mapped points by performing an addition operation between the mapped points and the secret key.
12. The system of claim 7, wherein the circuitry is further configured to decrypt the encrypted points by performing a subtraction operation between the encrypted points and the secret key.
Description
BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
DETAILED DESCRIPTION OF THE INVENTION
(9) The inventor provides a secure encoding and mapping step in the ECC to enable the ciphertext to resist encryption attacks such as CPA and COA attacks. The present invention is described in enabling detail in the following examples, which may represent more than one embodiment of the present invention.
(10)
(11) Step 106: The process of converting the blocks {B′.sub.1, B′.sub.2, . . . , B′.sub.n} to numerical values as ECC deals only with numbers. Thus, these blocks converted to numerical values to map them to ECC and secure them. Each numerical value is assigned to x.sub.i and then mapped to EC by finding the value of y.sub.i that satisfy the EC equation. The mapping to EC may need more than one rounds, therefore x.sub.i is multiplied by 31 to increase the number of rounds to 32. These steps are described in details in
(12) Step 110: shows the decryption process which is the reverse way of encryption. The step to decrypt the received points (C.sub.xi, C.sub.yi) is by subtract it from the shared S.sub.key. The result is the mapped points (x.sub.i, y.sub.i) that used to decode the message. These steps are described in details in
(13)
(14)
and the number of blocks n that used to group the set of characters B.sub.s is calculated by
(15)
Step 208: Group each set of characters (presented in binary values) {c.sub.1, c.sub.2, . . . , c.sub.B.sub.
(16)
(17) TABLE-US-00001 Algorithm 1: Encoding message with IV algorithm Input: Blocks retrieved (B.sub.i) from message M and IV Output: Encoded blocks (B′.sub.i) with IV 1 for i = 0; i < no of blocks; i + +; 2 let B′.sub.i = B.sub.i ⊕ IV; 3 let B.sub.i.sup.m = map(B′.sub.i); 4 let IV = B.sub.i.sup.m; 5 Encoded message ← the set of B′.sub.i;
(18)
(19)
(20)
(21)
(22) TABLE-US-00002 Algorithm 2: Decoding mapped points to message algorithm Input: Mapped points (B.sub.i.sup.m) and IV Output: Binary blocks of message 1 for i = 0; i < no of blocks; i + +; 2 let B′.sub.i = B.sub.i ⊕ IV; 3 let B.sub.i.sup.m = map(B′.sub.i); 4 let IV = B.sub.i.sup.m; 5 Encoded message ← the set of B′.sub.i;
(23)
(24) It will be apparent to one with skill in the art that the securing method of the encoding and the mapping on ECC of the invention may be provided using some or all of the mentioned features and components without departing from the spirit and scope of the present invention. It will also be apparent to the skilled artisan that the embodiments described above are specific examples of a single broader invention which may have greater scope than any of the singular descriptions taught. There may be many alterations made in the descriptions without departing from the spirit and scope of the present invention.