In-vivo analyte monitoring system data encryption protection method, equipment and medium
By exchanging random number streams and data streams to generate keys in the in vivo analyte monitoring system, the problems of key cracking and encrypted data leakage in the prior art are solved, and the security of the system is improved.
Patent Information
- Application Number
- CN202411893519.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-11
AI Technical Summary
The data encryption of existing in vivo analyte monitoring systems cannot effectively prevent key cracking and encrypted data leakage, resulting in insufficient system security.
By using the first electronic device in the in vivo analyte monitoring system to generate a first random number stream and generate a first data stream, the second electronic device generates a second random number stream and generates a second data stream, the second electronic device generates a first key based on the first data stream and the second random number stream, the first electronic device generates a second key based on the second data stream and the first random number stream, and then exchanges the random number stream and the data stream and then generates the corresponding key to avoid the key being cracked.
Effectively avoid key cracking, further avoid key encryption data leakage, and improve the security of data encryption in the in vivo analyte monitoring system.
Smart Images

Figure CN119814291A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology, and in particular to a method, device and medium for data encryption protection of an in vivo analyte monitoring system. Background Art
[0002] CGM (Continuous Glucose Monitoring) is an in vivo analyte monitoring system used to continuously monitor blood glucose levels in real time. In actual use, the CGM electronic system needs to be encrypted to protect the patient's blood glucose monitoring data from being accessed, tampered with or leaked by unauthorized personnel, ensuring the accuracy and security of the data.
[0003] In the existing technical solutions, during the key transfer stage, the encrypted data will be leaked during the key cracking process after the in vivo analyte monitoring system data is maliciously intercepted, threatening data security, resulting in insufficient system security and difficulty in meeting actual application needs. Summary of the invention
[0004] The embodiments of the present application provide a method, device and medium for data encryption protection of an in vivo analyte monitoring system, which solves the problem that the existing data encryption of an in vivo analyte monitoring system cannot meet security requirements.
[0005] In a first aspect, an embodiment of the present application provides a method for data encryption protection of an in vivo analyte monitoring system, wherein the in vivo analyte monitoring system includes a first electronic device and a second electronic device, and the method includes: generating a first random number stream by the first electronic device, and generating a first data stream based on the first random number stream; generating a second random number stream by the second electronic device, and generating a second data stream based on the second random number stream; the second electronic device generates a first key based on the first data stream and the second random number stream; and the first electronic device generates a second key based on the second data stream and the first random number stream.
[0006] In one implementation of the present application, generating a first data stream based on a first random number stream includes: determining a modulus length based on a preset encryption requirement, and performing data stream conversion on the first random number stream according to the modulus length to obtain the first data stream; the data stream conversion formula of the first random number stream is: Among them, S A and G is the first random number stream, 2 L is the modulus length, L is the quadratic exponent of the modulus length, E A is the first data stream, E A (x) is the value of the integer position x of the first data stream, x∈[0,n-1], and n is the data length of the first random number stream.
[0007] In one implementation of the present application, generating a second data stream based on a second random number stream includes: determining a modulus length based on a preset encryption requirement, and performing data stream conversion on the second random number stream according to the modulus length to obtain a second data stream; the data stream conversion formula of the second random number stream is: Among them, S B and G is the second random number stream, 2 L is the modulus length, L is the quadratic exponent of the modulus length, E B is the second data stream, E B (x) is the value of the second data stream at the integer position x, x∈[0,n-1], and n is the data length of the second random number stream.
[0008] In one implementation of the present application, the second electronic device generates a first key based on the first data stream and the second random number stream, including: the second electronic device performs data preprocessing on the first data stream and the second random number stream to obtain first preprocessed data, and performs a logical encryption operation on the first preprocessed data to generate the first key.
[0009] In one implementation of the present application, the data preprocessing formula for the first data stream and the second random number stream is: Among them, K B is the first preprocessed data, K B (x) is the value of the first preprocessed data at the integer position x, x∈[0,n-1], n is the data length of the second random number stream, S B is the second random number stream, E A is the first data stream, 2 L is the modulus length, and L is the quadratic exponent of the modulus length; performing a logical encryption operation on the first preprocessed data to generate a first key, including: performing a first XOR operator encryption operation on the first preprocessed data to obtain the first key, and the first XOR operator encryption formula is: Among them, key_B is the first key, K B (x) is the value of the first preprocessed data at the integer position x, x∈[0,n-1], and n is the data length of the second random number stream.
[0010] In one implementation of the present application, a first electronic device generates a second key based on a second data stream and a first random number stream, including: the first electronic device performs data preprocessing on the second data stream and the first random number stream to obtain second preprocessed data, and performs a logical encryption operation on the second preprocessed data to generate a second key.
[0011] In one implementation of the present application, the data preprocessing formula for the second data stream and the first random number stream is: Among them, K A is the second preprocessed data, K A(x) is the value of the second preprocessed data at the integer position x, x∈[0,n-1], n is the data length of the first random number stream, S A is the first random number stream, E B For the second data stream, 2 L is the modulus length, and L is the quadratic exponent of the modulus length; performing a logical encryption operation on the second preprocessed data to generate a second key, including: performing a second XOR operator encryption on the second preprocessed data to obtain a second key, and the second XOR operator encryption formula is: Among them, key_A is the second key, K A (x) is the value of the second preprocessed data at the integer position x.
[0012] In one implementation of the present application, after the second preprocessed data is encrypted by a second XOR operator to obtain a second key, the method further includes: performing a double-end key consistency analysis on the first key and the second key to determine the key consistency of the first key and the second key.
[0013] In a second aspect, an embodiment of the present application also provides an in vivo analyte monitoring system data encryption protection device, characterized in that the device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a data encryption protection method for an in vivo analyte monitoring system such as any one of the above items.
[0014] In a third aspect, an embodiment of the present application further provides a non-volatile computer storage medium storing computer executable instructions, characterized in that when the computer executes the executable instructions, it implements a data encryption protection method for an in vivo analyte monitoring system as described above.
[0015] The embodiments of the present application provide a method, device and medium for data encryption protection of an in vivo analyte monitoring system. In each stage of key transmission in the in vivo analyte monitoring system, a first random number stream is generated by a first electronic device, and a first data stream is generated based on the first random number stream. A second random number stream is generated by a second electronic device, and a second data stream is generated based on the second random number stream. The second electronic device generates a first key using the first data stream and the second random number stream, and the first electronic device generates a second key using the second data stream and the first random number stream. The above-mentioned exchange of random number streams and data streams and then generating corresponding keys prevents the keys from being cracked, further prevents the leakage of key-encrypted data, and improves the security of data encryption of the in vivo analyte monitoring system. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0017] Figure 1 A flow chart of a data encryption protection method for an in vivo analyte monitoring system provided in an embodiment of the present application;
[0018] Figure 2 A schematic diagram of generating a first data stream provided in an embodiment of the present application;
[0019] Figure 3 A schematic diagram of generating a first key provided in an embodiment of the present application;
[0020] Figure 4 A schematic diagram of generating a second key provided in an embodiment of the present application;
[0021] Figure 5 A schematic diagram of a data encryption protection method for an in vivo analyte monitoring system based on a power multiplication algorithm provided in an embodiment of the present application;
[0022] Figure 6 A schematic diagram of the internal structure of a data encryption protection device for an in vivo analyte monitoring system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0024] The embodiments of the present application provide a method, device and medium for data encryption protection of an in vivo analyte monitoring system. In each stage of key transmission in the in vivo analyte monitoring system, a first random number stream is generated by a first electronic device, and a first data stream is generated based on the first random number stream. A second random number stream is generated by a second electronic device, and a second data stream is generated based on the second random number stream. The second electronic device generates a first key using the first data stream and the second random number stream, and the first electronic device generates a second key using the second data stream and the first random number stream. The above-mentioned exchange of random number streams and data streams and then generating corresponding keys prevents the keys from being cracked, further prevents the leakage of key-encrypted data, and improves the security of data encryption of the in vivo analyte monitoring system.
[0025] It should be noted that the in vivo analysis and monitoring system includes: blood glucose monitoring system, electrophysiological sign analysis system, etc., and specifically can include CGM electronic system.
[0026] The technical solution proposed in the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0027] Figure 1 This is a flow chart of a data encryption protection method for an in vivo analyte monitoring system provided in an embodiment of the present application. Figure 1 As shown, the embodiment of the present application provides a method for encrypting and protecting data of an in vivo analyte monitoring system, which specifically includes the following steps:
[0028] Step 101: Generate a first random number stream by a first electronic device, and generate a first data stream based on the first random number stream.
[0029] Specifically, it includes: determining the modulus length based on the preset encryption requirement, and performing data stream conversion on the first random number stream according to the modulus length to obtain the first data stream; the data stream conversion formula of the first random number stream is:
[0030]
[0031] Among them, S A and G is the first random number stream, 2 L is the modulus length, L is the quadratic exponent of the modulus length, E A is the first data stream, E A (x) is the value of the integer position x of the first data stream, x∈[0,n-1], and n is the data length of the first random number stream.
[0032] The present application determines the first data stream by performing convolution operation and modular operation on the random number stream generated at one end in the key transfer stage, thereby realizing the first data stream operation in the key transfer stage of the CGM electronic system.
[0033] Figure 2 A schematic diagram of generating a first data stream is provided for an embodiment of the present application. In the embodiment of the present application, it is explained in detail through the following Example 1.
[0034] Example 1: In the CGM electronic system, the key transfer needs to be generated and sent at the transmitting end and the receiving end respectively.
[0035] According to the encryption requirement, the first electronic device, i.e., one of the transmitting end or the receiving end, determines the modulus length and generates a random integer stream S of length n. A and G.
[0036] In the data encryption of CGM electronic system, convolution algorithm and modular operation are irreversible and highly secure. In addition, the computational difficulty of convolution algorithm is low, which is more suitable for the actual computing power of CGM electronic system.
[0037] In this application, by random integer stream S A Perform convolution and modular operations with G to convert the random integer stream into the first data stream E of length n A The data stream conversion of the first random number stream is achieved by the following formula:
[0038]
[0039] Among them, S A and G is the first random number stream, 2 L is the modulus length, L is the quadratic exponent of the modulus length, and L is selected according to different system encryption requirements. For example, for a 32-bit computer system, the maximum value of L is 32;
[0040] E A is the first data stream, E A (x) is the value of the integer position x of the first data stream, x∈[0,n-1], and n is the data length of the first random number stream;
[0041] mod(a,b) is the modulus function, conv(a 1 ,a 2 ,…,a n ,len) is the convolution function.
[0042] By performing convolution algorithm operations and modular operations on a random integer stream randomly generated by a first electronic device, the random integer stream is converted into a data stream. Due to the irreversibility of the convolution algorithm operations and modular operations and the low computational complexity of the convolution algorithm operations, the security of the data stream is improved and the computational complexity is reduced.
[0043] Step 102: Generate a second random number stream through a second electronic device, and generate a second data stream based on the second random number stream.
[0044] Specifically, the method includes: determining a modulus length based on a preset encryption requirement, and performing data stream conversion on the second random number stream according to the modulus length to obtain a second data stream; the data stream conversion formula of the second random number stream is:
[0045] Among them, S B and G is the second random number stream, 2 L is the modulus length, L is the quadratic exponent of the modulus length, E B is the second data stream, E B(x) is the value of the second data stream at the integer position x, x∈[0,n-1], and n is the data length of the second random number stream.
[0046] The present application determines the second data stream by performing convolution operation and modular operation on the random number stream generated at the other end in the key transfer stage, thereby realizing the second data stream operation in the key transfer stage of the CGM electronic system.
[0047] In the examples of the present application, detailed explanation is given by the following Example 2.
[0048] Example 2: The second electronic device is the other end of the transmitting end and the receiving end. When the first electronic device is the key transmitting end, the second electronic device is the key receiving end, and vice versa.
[0049] The second electronic device determines the modulo length and generates a random integer stream S of length n. B , and transform the random integer stream S through convolution and modular operations B Transformed into a data stream E of length n B The data stream conversion of the first random number stream is achieved by the following formula:
[0050]
[0051] Among them, S B and G is the second random number stream, 2 L is the modulus length, L is the quadratic exponent of the modulus length;
[0052] E B is the second data stream, E B (x) is the value of the second data stream at the integer position x, x∈[0,n-1], and n is the data length of the second random number stream.
[0053] By performing convolution algorithm operations and modular operations on the random integer stream randomly generated by the second electronic device, the random integer stream is converted into a data stream. Due to the irreversibility of the convolution algorithm operations and modular operations and the low computational complexity of the convolution operation, the security of the data stream is improved and the computational complexity is reduced.
[0054] Step 103: The second electronic device generates a first key based on the first data stream and the second random number stream.
[0055] Specifically, the method includes: the second electronic device performs data preprocessing on the first data stream and the second random number stream to obtain first preprocessed data, and performs a logical encryption operation on the first preprocessed data to generate a first key.
[0056] The data preprocessing formula for the first data stream and the second random number stream is:
[0057]
[0058] Among them, K B is the first preprocessed data, K B (x) is the value of the first preprocessed data at the integer position x, x∈[0,n-1], n is the data length of the second random number stream, S B is the second random number stream, E A is the first data stream, 2 L is the modulus length, L is the quadratic exponent of the modulus length;
[0059] Performing a logical encryption operation on the first preprocessed data to generate a first key includes:
[0060] A first XOR operator encryption operation is performed on the first preprocessed data to obtain a first key. The first XOR operator encryption formula is:
[0061]
[0062] Among them, key_B is the first key, K B (x) is the value of the first preprocessed data at the integer position x, x∈[0,n-1], and n is the data length of the second random number stream.
[0063] The present application uses an XOR operator to logically encrypt the first preprocessed data, thereby realizing the generation of keys in the key transfer phase of the CGM electronic system, improving the security of the keys generated by the second electronic device, and reducing the complexity of the algorithm.
[0064] It should be noted that in the present application, the first key can also be used to logically encrypt the first preprocessed data through the XOR operator to realize the generation of the key in the key transfer phase of the CGM electronic system, improve the security of the key generated by the second electronic device, and reduce the complexity of the algorithm.
[0065] Figure 3 A first key generation schematic diagram is provided for an embodiment of the present application. In the embodiment of the present application, it is explained in detail through the following Example 3.
[0066] Example 3: During the key transfer phase of the CGM electronic system, after determining the data streams at both ends (ie, the transmitting end and the receiving end), the corresponding key data is generated.
[0067] First, according to the first data stream and the second random number stream, the first preprocessed data, i.e., the key stream, is obtained through data preprocessing. The data preprocessing still uses convolution operation and modular operation, which is implemented by the following formula:
[0068]
[0069] Among them, K Bis the first preprocessed data, K B (x) is the value of the first preprocessed data at the integer position x, x∈[0,n-1];
[0070] n is the data length of the second random number stream, S B is the second random number stream;
[0071] E A is the first data stream, 2 L is the modulus length, and L is the quadratic exponent of the modulus length.
[0072] Since the XOR algorithm can further reduce the complexity of the encryption algorithm and improve the encryption data processing efficiency of the CGM electronic system, the present application encrypts the first pre-processed data through the XOR operator, which is implemented by the following formula:
[0073]
[0074] Among them, key_B is the first key;
[0075] K B (x) is the value of the first preprocessed data at the integer position x, x∈[0,n-1];
[0076] n is the data length of the second random number stream.
[0077] The first preprocessed data is generated through convolution operation and modular operation, and then the first preprocessed data is encrypted by XOR algorithm, which reduces the computing power requirement for key generation of the CGM electronic system and is more in line with the actual usage requirements of the CGM electronic system. At the same time, the use of irreversible algorithm ensures the security of key generation.
[0078] Step 104: The first electronic device generates a second key based on the second data stream and the first random number stream.
[0079] Specifically, the method includes: the first electronic device performs data preprocessing on the second data stream and the first random number stream to obtain second preprocessed data, and performs a logical encryption operation on the second preprocessed data to generate a second key.
[0080] The data preprocessing formula for the second data stream and the first random number stream is:
[0081]
[0082] Among them, K A is the second preprocessed data, K A (x) is the value of the second preprocessed data at the integer position x, x∈[0,n-1], n is the data length of the first random number stream, S A is the first random number stream, E BFor the second data stream, 2 L is the modulus length, L is the quadratic exponent of the modulus length;
[0083] Performing a logical encryption operation on the second preprocessed data to generate a second key includes:
[0084] The second preprocessed data is encrypted using a second XOR operator to obtain a second key. The second XOR operator encryption formula is:
[0085]
[0086] Among them, key_A is the second key, K A (x) is the value of the second preprocessed data at the integer position x.
[0087] After the second preprocessed data is encrypted by a second XOR operator to obtain a second key, the method further includes: performing a double-end key consistency analysis on the first key and the second key to determine the key consistency of the first key and the second key.
[0088] The present application uses an XOR operator to perform logical encryption on the second preprocessed data, thereby realizing the generation of keys in the key transfer phase of the CGM electronic system, improving the security of the keys generated by the first electronic device, and reducing the complexity of the algorithm.
[0089] It should be noted that in the present application, the second key can also be used to logically encrypt the second preprocessed data through the XOR operator to realize the generation of the key in the key transfer phase of the CGM electronic system, improve the security of the key generated by the first electronic device, and reduce the complexity of the algorithm.
[0090] Figure 4 A schematic diagram of generating a second key is provided for an embodiment of the present application. In the embodiment of the present application, it is explained in detail through the following Example 4.
[0091] Example 4: During the key transfer phase of the CGM electronic system, after one end generates a key, the other end also needs to generate a corresponding key.
[0092] First, the second data stream and the first random number stream are preprocessed by the first electronic device (ie, the end corresponding to the second electronic device) to obtain second preprocessed data, ie, another key stream.
[0093] The data preprocessing of the second data stream and the first random number stream is achieved by the following formula:
[0094]
[0095] Among them, K A is the second preprocessed data, K A(x) is the value of the second preprocessed data at the integer position x, x∈[0,n-1];
[0096] n is the data length of the first random number stream, S A is the first random number stream;
[0097] E B For the second data stream, 2 L is the modulus length, and L is the quadratic exponent of the modulus length.
[0098] Since the XOR algorithm can further reduce the complexity of the encryption algorithm and improve the encryption data processing efficiency of the CGM electronic system, the present application encrypts the second pre-processed data through the XOR operator, which is implemented by the following formula:
[0099]
[0100] Among them, key_A is the second key;
[0101] K A (x) is the value of the second preprocessed data at the integer position x.
[0102] The second preprocessed data is generated through convolution operation and modular operation, and then the second preprocessed data is encrypted by XOR algorithm, which reduces the computing power requirement for key generation of the CGM electronic system and is more in line with the actual usage requirements of the CGM electronic system. At the same time, the use of irreversible algorithm ensures the security of key generation.
[0103] After determining the second key, the keys at both ends of the key transmission have all been generated. Since the modulo function has no effect on the calculation result of the data within the extraction length, and the convolution function satisfies the associative law and the commutative law, the first key and the second key should be equal.
[0104] The key consistency of the first key and the second key is determined by performing a double-end key consistency analysis on the first key and the second key, which is explained by the following formula:
[0105] mpd(conv(S A ,S B ,G,x),L)=mpd(conv(S B ,S A ,G,x),L) (7)
[0106] mod(conv(S A ,S B ,G,x),L)=mod(conv(S A ,conv(S B ,G,x),x),L)=mod(conv(S A ,EB ,x),L) (8)
[0107] mod(conv(S B ,S A ,G,x),L)=mod(conv(S B ,conv(S A ,G,x),x),L)=mod(conv(S B ,E A ,x),L) (9)
[0108] Therefore, K A =K B , that is, key_A=key_B.
[0109] The embodiment of the present application generates the corresponding key after exchanging the random number stream and the data stream, which can prevent the key from being maliciously cracked, further prevent the leakage of key-encrypted data, and improve the security of data encryption in the in vivo analyte monitoring system.
[0110] In addition to the above-mentioned method for encrypting and protecting data of an in vivo analyte monitoring system by combining a convolution algorithm, a modular operation and an XOR algorithm, the present application also provides a method for encrypting and protecting data of an in vivo analyte monitoring system based on a power multiplication algorithm. Figure 5 A schematic diagram of a data encryption protection method for an in vivo analyte monitoring system based on a power multiplication algorithm is provided in an embodiment of the present application. In the embodiment of the present application, it is explained in detail through the following Example 5.
[0111] Example 5: Key transfer: The two ends (first electronic device and second electronic device) establish a connection, and the first electronic device generates a random positive integer S A and G, and calculate the third data stream E through the power multiplication algorithm and modular operation A , the calculation method of the third data stream is implemented by the following formula:
[0112]
[0113] Among them, power(a 1 ,a 2 ,…,a n ,len) is a power multiplication function, and the remaining letters or formulas are consistent with those described in the above technical content.
[0114] The first electronic device (transmitter) sends a random positive integer S A and G are transmitted to the second electronic device (receiving end), and the second electronic device generates a random positive integer S B , the fourth data stream E is calculated by the power multiplication algorithm and modular operation B , the fourth data stream E BThe calculation method is realized by the following formula:
[0115]
[0116] Then, the second electronic device performs S B and E A The power multiplication algorithm and the modular operation are performed to calculate the key key_C. The calculation method of the key key_C is implemented by the following formula:
[0117]
[0118] The second electronic device transmits the fourth data stream E B The first electronic device transmits the S A and E B The power multiplication algorithm and the modular operation are performed to calculate the key key_D. The calculation method of the key key_D is implemented by the following formula:
[0119]
[0120] The above is an embodiment of the method proposed in this application. Based on the same inventive concept, this application embodiment also provides a data encryption protection device for an in vivo analyte monitoring system, the structure of which is as follows: Figure 6 shown.
[0121] Figure 6 This is a schematic diagram of the internal structure of a data encryption protection device for an in vivo analyte monitoring system provided in an embodiment of the present application. Figure 6 As shown, the device includes:
[0122] at least one processor 601;
[0123] and, a memory 602 communicatively connected to the at least one processor;
[0124] The memory 602 stores instructions executable by at least one processor, and the instructions are executed by at least one processor 601 so that the at least one processor 601 can execute any of the above-mentioned methods for encrypting and protecting data of an in vivo analyte monitoring system.
[0125] Some embodiments of the present application provide corresponding Figure 1 A non-volatile computer storage medium for data encryption protection of an in vivo analyte monitoring system stores computer executable instructions. When the computer executes the executable instructions, the computer implements any of the above-mentioned methods for data encryption protection of an in vivo analyte monitoring system.
[0126] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the IoT device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0127] The system and medium provided in the embodiments of the present application correspond one-to-one to the method. Therefore, the system and medium also have similar beneficial technical effects to the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the system and medium will not be repeated here.
[0128] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0129] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0130] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0131] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0132] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0133] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0134] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0135] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0136] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for encrypting and protecting data in an in vivo analyte monitoring system, wherein the in vivo analyte monitoring system comprises a first electronic device and a second electronic device, wherein: The method comprises: Generate a first random number stream by the first electronic device, and generate a first data stream based on the first random number stream; Generate a second random number stream by the second electronic device, and generate a second data stream based on the second random number stream; The second electronic device generates a first key based on the first data stream and the second random number stream; and the first electronic device generates a second key based on the second data stream and the first random number stream.
2. The method for data encryption protection of an in vivo analyte monitoring system according to claim 1, characterized in that: Generating a first data stream based on the first random number stream includes: Based on a preset encryption requirement, determine a modulus length, and perform data stream conversion on the first random number stream according to the modulus length to obtain the first data stream; The data stream conversion formula of the first random number stream is: Among them, S A and G is the first random number stream, 2 L is the modulus length, L is the quadratic exponent of the modulus length, E A is the first data stream, E A (x) is the value of the integer position x of the first data stream, x∈[0, n-1], and n is the data length of the first random number stream.
3. The method for data encryption protection of an in vivo analyte monitoring system according to claim 1, characterized in that: Generating a second data stream based on the second random number stream includes: Based on a preset encryption requirement, determine a modulus length, and perform data stream conversion on the second random number stream according to the modulus length to obtain the second data stream; The data stream conversion formula of the second random number stream is: Among them, S B and G is the second random number stream, 2 L is the modulus length, L is the quadratic exponent of the modulus length, E B For the second data stream, E B (x) is the value of the integer position x of the second data stream, x∈[0, n-1], and n is the data length of the second random number stream.
4. The method for data encryption protection of an in vivo analyte monitoring system according to claim 1, characterized in that: The second electronic device generates a first key based on the first data stream and the second random number stream, including: The second electronic device performs data preprocessing on the first data stream and the second random number stream to obtain first preprocessed data, and performs a logical encryption operation on the first preprocessed data to generate a first key.
5. The method for data encryption protection of an in vivo analyte monitoring system according to claim 4, characterized in that: The data preprocessing formula for the first data stream and the second random number stream is: Among them, K B is the first preprocessed data, K B (x) is the value of the first preprocessed data at the integer position x, x∈[0, n-1], n is the data length of the second random number stream, S B For the second random number stream, E A For the first data stream, 2 L is the modulo length, and L is the quadratic exponent of the modulo length; The performing a logical encryption operation on the first pre-processed data to generate a first key includes: A first XOR operator encryption operation is performed on the first preprocessed data to obtain a first key, and the first XOR operator encryption formula is: Among them, key_B is the first key, K B (x) is the value of the first preprocessed data at the integer position x, x∈[0, n-1], and n is the data length of the second random number stream.
6. The method for data encryption protection of an in vivo analyte monitoring system according to claim 1, characterized in that: The first electronic device generates a second key based on the second data stream and the first random number stream, including: The first electronic device performs data preprocessing on the second data stream and the first random number stream to obtain second preprocessed data, and performs a logical encryption operation on the second preprocessed data to generate a second key.
7. The method for data encryption protection of an in vivo analyte monitoring system according to claim 6, characterized in that: The data preprocessing formula for the second data stream and the first random number stream is: Among them, K A For the second preprocessed data, K A (x) is the value of the second preprocessed data at the integer position x, x∈[0, n-1], n is the data length of the first random number stream, S A is the first random number stream, E B For the second data stream, 2 L is the modulo length, and L is the quadratic exponent of the modulo length; The performing a logical encryption operation on the second pre-processed data to generate a second key includes: The second preprocessed data is encrypted using a second XOR operator to obtain a second key, wherein the second XOR operator encryption formula is: Among them, key_A is the second key, K A (x) is the value of the second pre-processed data at the integer position x.
8. The method for data encryption protection of an in vivo analyte monitoring system according to claim 1, characterized in that: After the second preprocessed data is encrypted by a second XOR operator to obtain a second key, the method further includes: A double-end key consistency analysis is performed on the first key and the second key to determine key consistency between the first key and the second key.
9. A data encryption protection device for an in vivo analyte monitoring system, characterized in that: The device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 8.
10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions are configured as follows: a method as claimed in any one of claims 1 to 8.