A lightweight public key cryptography calculation method for small IoT terminals
By storing and transmitting pre-computing tables in segments in edge computing servers, combined with terminal computing capabilities, the computing and storage limitations of small IoT terminals are solved, safe and efficient public key cryptography is achieved, and the security and computing efficiency of terminal devices are improved.
Patent Information
- Application Number
- CN202211616112.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-15
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-12-15
AI Technical Summary
Due to limited energy and computing power, small IoT terminals cannot effectively apply complex security authentication mechanisms. In addition, traditional precomputing tables have insufficient storage and computing, resulting in low computing efficiency of ECC encryption and inability to achieve secure transmission on resource-constrained terminal devices.
By storing pre-calculation tables in the edge computing server, and using segmented transmission and discarding unnecessary point-to-point values, combined with the terminal's computing power, lightweight public key cryptography is realized, reducing the calculation amount and storage usage.
It effectively solves the computing and storage limitations of small terminal devices, realizes the safe and efficient application of public key cryptography algorithms, and improves the security and computing efficiency of IoT terminals.
Smart Images

Figure CN116015638B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer security, and in particular relates to a lightweight public key cryptography calculation method applied to a small Internet of Things terminal. Background Art
[0002] In today's world, with the continuous development of society and the economy, people's demands for a higher quality of life are becoming increasingly higher. The Internet of Things (IoT) and smart products are playing an increasingly important role in our lives. With the development of technologies such as smart homes, digital healthcare, and the Internet of Vehicles (IoV), IoT applications are becoming increasingly popular, and their security issues are attracting increasing attention from researchers. Currently, research on IoT security is still in its infancy, and most research results cannot fully address the security issues facing the development of the IoT.
[0003] As the Internet evolves into the Internet of Things, the Internet of Things not only inherits the vulnerabilities of the existing information security system, but also introduces some new security issues due to its own characteristics: ① Due to energy and computing power limitations, terminal access devices such as sensor nodes are usually unable to use complex security authentication mechanisms, which can easily become the "short board" of the entire Internet of Things security system; ② The terminal nodes of the Internet of Things are often deployed in unmanned scenarios, and attackers can easily modify or replace these devices; ③ The number of terminal nodes in the Internet of Things is huge and the types are diverse. The massive data collected has obvious multi-source heterogeneity, making it difficult to provide a unified security protection system.
[0004] Since its emergence, public-key cryptography has played a significant role in information security and boasts broad application prospects. The theoretical foundation of public-key cryptography is computational complexity theory, which has been applied to a range of public-key cryptographic methods, including RSA, based on large number factorization; Rabin, based on the difficulty of square roots modulo N; and ECC, based on elliptic curve discrete logarithm cryptography. Encryption, decryption, signing, verification, and key agreement based on elliptic curve cryptography (ECC) are widely used due to their high security, minimal storage space, low computational complexity, and high processing speed. ECC encryption offers greater security due to its shorter key length. For example, a 160-bit ECC key is equivalent to a 1024-bit RSA key, making it suitable for small devices with limited storage and computing power. However, in the ECC public key cryptography algorithm, elliptic curve multiple point operations are the most critical and time-consuming calculations, which directly affect the implementation efficiency of various elliptic curve cryptographic systems. Small terminals (some small smart terminals with very limited memory and computing power) are still restricted and cannot implement ECC encryption methods well.
[0005] Currently, fast multiple point calculations can use pre-calculation tables to use a certain amount of storage space in exchange for less time. This is feasible in the current era of storage technology development. Pre-calculation tables include wNAF pre-calculation tables, i-point pre-calculation tables, and 2i-point pre-calculation tables. The generation of the pre-calculation tables itself is also a multiple point calculation, which requires a long generation time. However, once the pre-calculation table for a certain point is generated, it does not need to be modified. When calculating the multiple points related to the point, the user only needs to query the pre-calculation table to directly obtain the calculation results. This can save calculation time in the subsequent ECC operation process and greatly improve calculation efficiency. For example, patent application CN114510749A discloses a method for transmitting pre-calculated tables in public key cryptographic calculations. By using the PKI system, a certificate system is designed, and the pre-calculated table is packaged into a certificate and transmitted to the client for auxiliary calculation. Before calculation, the user needs to verify the received pre-calculated table to determine the credibility of the pre-calculated table. The pre-calculated table is distributed using a digital certificate issued by a CA (Certificate Authority). The CA receives the digital certificate application materials submitted by the certificate subject user, which include identity proof materials and the certificate subject user wishes to bind. The CA verifies the identity proof material, extracts the public key after the verification, calculates the corresponding pre-calculation table using the public key, and stores it in the digital certificate as an extension of the digital certificate. However, the pre-calculation table is calculated in an i-times-point manner and is put into the certificate for overall transmission, which will cause insufficient storage space on the edge device to store and perform the corresponding calculations. If the pre-calculation table is calculated in the form of NAF or 2^i-times-point, the size of the calculation table will be reduced, so that the edge device can store the corresponding pre-calculation table for calculation, but the computing overhead of the edge device will be increased accordingly, making it impossible for the device to complete the calculation.
[0006] In summary, the time taken to calculate scalar multiplication is greatly reduced by using a pre-calculated table in advance. However, the pre-calculated table occupies a relatively large amount of memory and is not well suited for small terminals with limited resources. That is, the terminal cannot simplify the calculation by directly using the pre-calculated table. Summary of the Invention
[0007] To solve the above problems, the present invention provides a lightweight public key cryptographic calculation method applied to small IoT terminals. By improving the function form of the pre-calculated table, it is used on small IoT terminals with limited computing power and memory, so that terminals that cannot perform public key point calculations can also perform calculations locally.
[0008] The lightweight public key cryptography calculation method for a small IoT terminal described in the present invention comprises the following steps:
[0009] The terminal generates a private key through a random number generator;
[0010] The terminal interacts with the edge computing server to obtain a pre-calculated table for scalar multiplication, where the pre-calculated table is an i-times point pre-calculated table stored in advance in the edge computing server or calculated in real time by the edge computing node.
[0011] The terminal obtains all the required multiplication point values and obtains the final public key password through multiplication point addition.
[0012] Furthermore, when the terminal interacts with the edge computing server at a fixed point, the specific steps are as follows:
[0013] Step a1: The edge computing server calculates the i-times point pre-calculation table of the fixed point P in advance and stores it in the edge computing server;
[0014] Step a2: The terminal sends a request to the edge computing server, and the edge computing server transmits the pre-calculated table to the terminal in segments through interaction;
[0015] Step a3: In each interaction, the terminal takes out the multiplication points required for calculation from each pre-calculated table and discards the remaining multiplication point values;
[0016] Step a4: After the terminal obtains all required doubling points, it obtains the final fixed point P scalar multiplication result through doubling point addition.
[0017] Furthermore, the calculation steps of the fixed point P are:
[0018] The terminal generates a private key through a random number generator;
[0019] The terminal sets the window size w, which is used to divide the scalar k and the size of each calculation table requested;
[0020] The terminal splits the scalar K into D blocks according to the window size w and obtains the required multiplication point value from the pre-computed table for each requested segment;
[0021] After obtaining all the required multiplication point values, the terminal calculates the point k*P through elliptic curve point addition to complete the fixed point calculation.
[0022] Furthermore, the steps to obtain the multiplier point value are as follows:
[0023] The terminal sends a network request to the edge computing server. The request parameters include the base point P, the window size w, and the index q. The index q corresponds to the location where the multiplier value is currently to be obtained.
[0024] The edge computing server obtains the terminal request parameters base point P, window size w, and index q, searches for and returns the corresponding sub-pre-calculation table S in the pre-calculation table corresponding to the pre-calculated base point P. q , the contents of the sub-pre-calculation table are qw*P, (qw+1)*P, (qw+2)*P...(qw+w-1)*P, and the length is w;
[0025] The terminal obtains the sub-pre-calculation table S q Then find the doubling point of the corresponding index and save the doubling point value. q The remaining unnecessary doubling points are discarded and the next round of iteration is performed until all the required doubling point values are obtained.
[0026] Furthermore, when the terminal interacts with edge computing at a non-fixed point, the specific steps are as follows:
[0027] Step b1: The terminal sends a request to the edge computing server, and the request parameter is the non-fixed point public key that needs to be calculated;
[0028] Step b2: After the edge node obtains the public key of the non-fixed point, it searches the i-times point pre-calculated table for the corresponding point;
[0029] If the edge computing server has a pre-calculated table for this point, the calculation is performed according to the fixed point method;
[0030] If the edge computing server does not have a pre-calculated table for the point, it calculates the i-times pre-calculated table for the point using a standardized cryptographic algorithm. The edge computing server completes the calculation of the i-times pre-calculated table for the point in real time.
[0031] Step b3: The pre-calculated table is stored in the edge computing server and an expiration time is set, and the terminal is notified that the pre-calculated table calculation is completed;
[0032] Step b4: After receiving the pre-calculation completion request, the terminal sends a request to the edge computing server to transmit the pre-calculation table of the point to the terminal;
[0033] Step b5: In each interaction, the terminal takes out the multiplication points required by the pre-calculation table and discards the remaining multiplication point values;
[0034] Step 6: After the terminal obtains all required doubling points, it obtains the final non-fixed point scalar multiplication result through doubling point addition.
[0035] Furthermore, the steps to obtain the multiplier point value are as follows:
[0036] The terminal sends a network request to the edge computing server. The request parameters include the base point P, the window size w, and the index q. The index q corresponds to the location where the multiplier value is currently to be obtained.
[0037] The edge computing server obtains the terminal request parameters base point P, window size w and index q, and returns the corresponding sub-pre-calculation table S in the pre-calculation table corresponding to the pre-calculated base point P. q , the contents of the sub-pre-calculation table are qw*P, (qw+1)*P, (qw+2)*P...(qw+w-1)*P, and the length is w;
[0038] The edge computing server obtains the sub-pre-calculated table S q Then find the double point of the corresponding index, and keep the double point value and store it in memory. q All other unnecessary points are discarded and the next round of iteration and request is carried out;
[0039] After all the required multiplication point values are obtained, the terminal calculates the final non-fixed point scalar multiplication result through universal elliptic curve point addition.
[0040] The beneficial effects described in the present invention are as follows: for an environment where IoT terminal resources are extremely limited, the cryptographic algorithm of the terminal is lightweight, and comprehensive consideration is given to issues such as cryptographic security, terminal computing power, and storage space. The present invention stores the estimated table in the edge computing server in advance, and adopts a segmented transmission method for the pre-calculated table of the fixed point to reduce its computational complexity, while discarding unnecessary multiple points in the sub-estimate table to reduce memory usage; for non-fixed points, if the estimated table of the point is stored in the edge computing server, the entire pre-calculated table content is returned. If it is not stored in the edge computing server, the pre-calculated table of the non-fixed point is calculated in real time and then returned, which greatly reduces the computational complexity. The method described in the present invention effectively solves the problem that the scalar multiplication calculation in the ECC encryption method consumes memory and computing power and cannot be well applied to small terminal devices with limited resources, so that these terminal devices can also be securely transmitted through the ECC public key cryptographic algorithm, ultimately solving the security problem that small terminal devices cannot apply more secure public key cryptographic algorithms. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a flow chart of the method of the present invention;
[0042] Figure 2 It is a calculation flow chart of fixed points;
[0043] Figure 3 It is a calculation flow chart of non-fixed points. DETAILED DESCRIPTION
[0044] In order to make the contents of the present invention more clearly understood, the present invention is further described in detail below based on specific embodiments in conjunction with the accompanying drawings.
[0045] like Figure 1 As shown in the figure, a lightweight public key cryptography calculation method applied to small IoT terminals mainly uses a pre-calculated table to simplify the calculation. The main calculation object is the core operation scalar multiplication of elliptic curve cryptography used in the public key system; specifically:
[0046] The terminal generates a private key through a random number generator;
[0047] The terminal and the edge computing node interact to obtain a pre-calculated table for scalar multiplication, where the pre-calculated table is an i-times point pre-calculated table stored in the edge computing node in advance or calculated in real time by the edge computing node;
[0048] The terminal obtains all the required multiplication point values and obtains the final public key password through multiplication point addition.
[0049] Take the implementation of Elliptic Curve Diffie-Hellman key exchange (ECDH) between two terminals through an edge computing server as an example.
[0050] On the one hand, for fixed-point scalar multiplication, such as Figure 2 As shown:
[0051] The edge computing server and the embedded terminal are set with the same encryption parameters;
[0052] The edge computing server pre-calculates the i-times point table of the fixed parameter point P (base point) in the curve in advance. The calculation method adopts a standardized cryptographic algorithm process, and the underlying finite field implementation can be optimized based on hardware.
[0053] Terminal A generates a large integer k through a random number generator A ;
[0054] Terminal A sets the window size w in advance A =2 i (i∈N + )(w A The size is mainly based on the storage capacity of the device) is used to divide the scalar k A and the size of the pre-computed table to be transferred;
[0055] Terminal A now needs to calculate k A The point value of P, that is, the public key point Q A ;
[0056] Terminal A according to w A Split the scalar, such as w A =2 4 ,k=10011000 10000010, expressed as k A =(2 15 +2 12 )+2 11 +2 7 +2 1 , so we only need to get (2 15 +2 12 )*P、2 11 *P, 2 7 *P, 2 1 *P The values of these multiple points can be added to complete k A *Calculation of P.
[0057] The method to obtain the multiplier value is as follows:
[0058] Terminal A sends a network request to the edge node, and the request parameters include the base point P, the window size w A and index q A (q A Corresponding to the current position where the doubling value is to be obtained, such as 2 in the above example 7 Index is 1, 2 11 Index is 2);
[0059] The edge server receives the terminal request parameters base point P and window size w A and index q A , find and return the corresponding sub-pre-calculation table S_P in the pre-calculation table corresponding to the pre-calculated base point P qA , the contents of the currently returned sub-precalculation table are qw*P, (qw+1)*P, (qw+2)*P...(qw+w-1)*P, and the length is w;
[0060] Terminal A obtains the sub-pre-calculation table S_P by transmitting qA Then, find the double point of the corresponding index and save the double point value. qA The remaining unnecessary points are discarded, and the remaining sub-precalculation tables are requested again;
[0061] After W_k A / w A (W_k A After a round of iteration (where the length of the private key is the length of the private key), the terminal can obtain the required multiplication point value, and then calculate the public key point k by adding the curve point. A The point value of P, completing the fixed point calculation.
[0062] The method is based on real-time continuous acquisition of sub-pre-calculation tables, accessing the required multiplication points, and then completing the calculation of scalar multiplication k*P by locally calculating elliptic curve point addition. It can be used to calculate fixed-point scalar multiplication of any IoT terminal.
[0063] Secondly, for scalar multiplication calculations of non-fixed public key points, such as Figure 3 As shown:
[0064] Terminal B generates a private key K through a random number generator B , calculate the public key point K in the same way B The value of P;
[0065] Terminals A and B obtain the public key point K respectively B P and K AAfter the value of P is determined, the public key points need to be doubled to generate the public key. At this time, the public key points obtained by both parties are non-fixed point values.
[0066] The steps for calculating the non-fixed point value are as follows: Terminal A sends a network request to the edge computing server, and the request parameter is the non-fixed point K that needs to be calculated. B P.
[0067] The edge computing server obtains point K B After P, look up the pre-computed table of corresponding points.
[0068] If the server has a pre-calculated table for this point, the calculation is performed using the fixed point method.
[0069] If the server does not have a pre-calculated table for the point, the computing server calculates an i-times pre-calculated table for the point based on a standardized cryptographic algorithm.
[0070] The computing server completes the calculation of the i-times point pre-calculation table of the point in real time. The pre-calculation table is stored locally on the server and an expiration time is set. A network request is sent to notify terminal A that the pre-calculation table calculation is completed.
[0071] After receiving the pre-calculation table completion request, terminal A sends a request to the edge node. The subsequent calculation steps are consistent with the fixed point calculation steps. Finally, terminal A can calculate the public key K A K B P.
[0072] The above description is only a preferred embodiment of the present invention and is not intended to further limit the present invention. All equivalent changes made using the contents of the present invention description and drawings are within the scope of protection of the present invention.
Claims
1. A lightweight public key cryptographic calculation method applied to small-scale Internet of Things terminals, characterized in that: The method steps are: The terminal generates a private key through a random number generator; The terminal interacts with the edge computing server to obtain a pre-calculated table for scalar multiplication, where the pre-calculated table is an i-times point pre-calculated table stored in advance in the edge computing server or calculated in real time by the edge computing server. The terminal obtains all the required multiplication point values and obtains the final public key password through elliptic curve point addition; Among them, what the terminal interacts with the edge computing server is the i-times point pre-calculation table of fixed points or non-fixed points in scalar multiplication; When the terminal interacts with the edge computing server using the i-times pre-calculated table of fixed points in scalar multiplication, the specific steps are as follows: Step a1: The edge computing server calculates the i-times point pre-calculation table of the fixed point P in advance and stores it in the edge computing server; Step a2: The terminal sends a request to the edge computing server, and the edge computing server transmits the pre-calculated table to the terminal in segments through interaction; Step a3: In each interaction, the terminal takes out the multiplication points required for calculation from each pre-calculated table and discards the remaining multiplication point values; Step a4: After the terminal obtains all required doubling points, it obtains the scalar multiplication result of the final fixed point P through elliptic curve point addition; The calculation steps of the i-times point pre-calculation table of the fixed point P are as follows: The terminal generates a private key through a random number generator; The terminal sets a window of size w, splits the private key, i.e., the scalar k, into D blocks according to the window size, and obtains the required multiplication point value from the pre-computed table for each requested segment; After obtaining all the required multiplication point values, the terminal calculates the point k*P through elliptic curve point addition to complete the fixed point calculation; When the terminal interacts with the edge computing server with a pre-calculated table of i-times points of non-fixed points in scalar multiplication, the specific steps are as follows: Step b1: The terminal sends a request to the edge computing server, and the request parameter is the non-fixed point public key that needs to be calculated; Step b2: After obtaining the public key of the non-fixed point, the edge computing server searches the i-times point pre-calculation table for the corresponding point; If the edge computing server has a pre-calculated table for this point, the calculation is performed according to the method of the i-times point pre-calculated table for the fixed point in scalar multiplication that is exchanged between the terminal and the edge computing server, that is, steps a2 to a4; If the edge computing server does not have a pre-calculated table for the point, it calculates the i-times pre-calculated table for the point using a standardized cryptographic algorithm. The edge computing server completes the calculation of the i-times pre-calculated table for the point in real time. Step b3: The pre-calculated table is stored in the edge computing server and an expiration time is set, and the terminal is notified that the pre-calculated table calculation is completed; Step b4: After receiving the pre-calculation completion request, the terminal sends a request to the edge computing server, and the edge server transmits the pre-calculation table of the point in segments to the terminal; Step b5: In each interaction, the terminal takes out the pre-calculated table for each segment to calculate the required multiplication points and discards the remaining multiplication point values; Step b6: After the terminal obtains all required doubling points, it obtains the final non-fixed point scalar multiplication result through elliptic curve point addition.
2. A lightweight public key cryptographic calculation method applied to a small-sized Internet of Things terminal according to claim 1, characterized in that: When the terminal interacts with the edge computing server using the i-times pre-calculated table of fixed points in scalar multiplication, the steps for obtaining the times value are as follows: The terminal sends a network request to the edge computing server. The request parameters include the fixed point P, the window size w, and the index q. The index q corresponds to the location where the multiplier value is currently to be obtained. The edge computing server obtains the terminal request parameters fixed point P, window size w and index q, searches and returns the corresponding sub-pre-calculation table S in the pre-calculation table corresponding to the pre-calculated fixed point P. q , the contents of the sub-pre-calculation table are qw*P, (qw+1)*P, (qw+2)*P... ... (qw+w-1)*P, and the length is w; The terminal obtains the sub-pre-calculation table S q Then find the doubling point of the corresponding index and save the doubling point value. q The remaining unnecessary doubling points are discarded and the next round of iteration is performed until all the required doubling point values are obtained.
3. The lightweight public key cryptography calculation method applied to a small-sized Internet of Things terminal according to claim 1 is characterized in that: When the terminal interacts with the edge computing server using the i-times pre-calculation table for non-fixed points in scalar multiplication, the steps for obtaining the times point value are as follows: The terminal sends a network request to the edge computing server. The request parameters include the non-fixed point P1, the window size w, and the index q. The index q corresponds to the location where the multiplier value is currently to be obtained. The edge computing server obtains the terminal request parameters non-fixed point P1, window size w and index d, and returns the corresponding sub-pre-calculation table S in the pre-calculation table corresponding to the pre-calculated non-fixed point P1. q , the contents of the sub-pre-calculation table are qw*P1, (qw+1)*P1, (qw+2)*P1… …(qw+w-1)*P1, and the length is w; The terminal obtains the sub-pre-calculation table S q Then find the double point of the corresponding index, and keep the double point value and store it in memory. q All other unnecessary points are discarded and the next round of iteration and request is carried out; After all the required multiplication point values are obtained, the terminal calculates the final non-fixed point scalar multiplication result through elliptic curve point addition.
Citation Information
Patent Citations
Method and system for transmitting pre-calculation table in elliptic curve public key cryptographic calculation
CN114510749A
Montgomery-based piecewise scalar multiplication calculation method
CN106712949A
System and method for dense, large scale scene reconstruction
US10339716B1