Method and device for constructing initial vector based on combined counter, medium and program product

By adopting the method of constructing initial vectors based on combined counters in the field of information security technology, the problem of over-erroring of nonvolatile memory of equipment is solved, and the effect of system secure communication and equipment life extension is achieved.

CN119519963AActive Publication Date: 2025-02-25NO 30 INST OF CHINA ELECTRONIC TECH GRP CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411660381.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-02-25
Estimated Expiration
2044-11-20

AI Technical Summary

Technical Problem

When constructing initial vectors, it is difficult for the prior art to avoid excessive rewritten nonvolatile memory of the device while ensuring safe communication of the system, resulting in a shortening of the service life of the device.

Method used

The method of constructing the initial vector based on a combined counter is adopted. Through the multiple combination of period counters and communication counters, combined with channel transmission resource requirements, the period counters and communication counters are reasonably calculated to reduce communication resource usage and reduce the equipment erase frequency.

Benefits of technology

Without damaging the service life of the equipment, one-time communication of system information is realized, which meets the system's secure communication requirements and saves channel transmission space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information security, and provides a method and device for constructing an initial vector based on a combined counter, a medium and a program product, and the method comprises the steps: two communication parties agree on a filling number in advance; and jointly forming an initial vector IV in the encryption and decryption process by adopting a combined counter and a filling number. The method provided by the invention is a special method based on multiple combined digital counters such as a period counter and a communication counter, the period counter and the communication counter are represented through reasonable calculation in combination with channel transmission resource requirements, and the service life of the system is not damaged under the condition of occupying less communication resources. One-time pad transmission of system information is ensured, and the safety communication requirement of the system is met. And particularly, the method has a relatively wide application prospect in the application of a wireless system with relatively tense channel transmission resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, and in particular to a method, device, medium and program product for constructing an initial vector based on a combination counter. Background Art

[0002] In 1949, Shannon proved that the "one-time pad" cryptographic system is theoretically unbreakable. In order to ensure the security of the system, during the key replacement cycle, the initial state used by the key sequence generator each time it expands the key sequence (i.e., the initial vector IV, which can be transmitted through the channel along with the ciphertext) needs to meet the uniqueness requirement or meet specific randomness requirements within the acceptable reuse range of the system. Based on the current scientific and technological level, there are two main construction methods for the initial vector (IV): random factor construction method and one-way factor construction method.

[0003] When using random factors to construct the initial vector, there is a certain probability of reuse because the data is randomly generated, and it is impossible to completely ensure the uniqueness of each data, which brings certain security risks to the system. Although increasing the length of the random number can reduce the probability of reuse, the data that needs to be transmitted to the receiver in the channel will also increase, which is not suitable for some wireless systems with limited channel resources.

[0004] When using a one-way factor to construct an initial vector, if there is one-way increasing or decreasing information in the system that can strictly ensure one-way non-repetition, such as time reference, angle change, spatial position, etc., or based on a pure digital counter, it can all be used as a one-way factor to construct and generate an initial vector. However, it is necessary to record the used initial vector each time encryption occurs and frequently erase the device's non-volatile memory, which may cause the device to fail and shorten the device's service life. Summary of the invention

[0005] Based on the traditional method of constructing the initial vector of a sequence cipher, the present invention proposes a method, device, medium and program product for constructing the initial vector based on a combination counter for the generation of one-way factors. The method is a special method based on multiple combination digital counters such as cycle counters and communication counters. In combination with the channel transmission resource requirements, the cycle counter and the communication counter are represented by reasonable calculations. Under the condition of occupying less communication resources, the system information transmission is guaranteed to be one-time and one-key, and the system security communication requirements are met without damaging the service life of the system. Especially in the wireless system application where the channel transmission resources are relatively tight, it has a relatively broad application prospect.

[0006] The present invention provides a method for constructing an initial vector based on a combination counter, comprising:

[0007] The communicating parties agree on the number of padding in advance;

[0008] The combined counter and padding number are used together to form the initial vector IV in the encryption and decryption process.

[0009] In some embodiments, the combined counter is comprised of a communication counter and a cycle counter.

[0010] In some embodiments, the cycle counter is stored in a non-volatile memory and the communication calculator is stored in a volatile memory.

[0011] In some embodiments, the cycle counter and the communication counter are initially set to zero.

[0012] In some embodiments, only the combination counter is transmitted in the channel during communication.

[0013] In some embodiments, the combination counter works as follows:

[0014] When the power is turned on, the cycle counter is incremented by 1 and written to the non-volatile memory;

[0015] During communication, each time a device sends a packet of ciphertext information through the channel, the communication counter increases by 1, and the cycle counter remains unchanged; when the communication counter accumulates to the maximum value and rolls over to 0, the cycle counter increases by 1 and is written into the non-volatile memory;

[0016] When shutting down, the communication counter is cleared to 0, and the cycle counter remains unchanged;

[0017] When the key is changed, the cycle counter and the communication counter are both set to 0, and the cycle counter is written to the non-volatile memory.

[0018] The present invention also provides an electronic device, comprising:

[0019] at least one processor; and a memory communicatively coupled to the at least one processor;

[0020] The memory stores instructions that can be executed by the at least one processor, and the at least one processor executes the above method by executing the instructions stored in the memory.

[0021] The present invention also provides a computer-readable storage medium, characterized in that the computer-readable storage medium is used to store instructions, and when the instructions are executed, the above method is implemented.

[0022] The present invention also provides a computer program product, which, when called by a computer, enables the computer to execute the above method.

[0023] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0024] 1. During the life of the device, the non-volatile memory that records the cycle counter value only needs to be erased when the device is turned on, the key is changed, and the communication counter is accumulated to the maximum value. Compared with erasing the non-volatile memory to record the counter change value every time a single digital counter changes, the probability of erasing the non-volatile memory is greatly reduced. At the same time, during the communication process, only the combined counter needs to be transmitted in the channel, which greatly saves channel transmission space compared to transmitting the entire initial vector.

[0025] 2. Evaluate the power-on and power-off frequency and packet sending frequency of the information sending device in the system, and reasonably set the representation range (bit length) of the communication counter and the cycle counter to ensure that the initial vector is not reused in each key replacement cycle in a system with limited channel transmission resources. At the same time, minimize the number of times the non-volatile memory of the device is erased and written, thereby extending the service life of the device. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 Schematic diagram of an initial vector constructed based on a combination counter in an embodiment of the present invention.

[0027] Figure 2 Schematic diagram of the change of the initial vector during the communication process in an embodiment of the present invention.

[0028] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0030] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] The embodiment of the present invention provides a method for constructing an initial vector based on a combination counter, including:

[0032] The communicating parties agree on the number of padding in advance;

[0033] The combined counter and padding number are used together to form the initial vector IV in the encryption and decryption process.

[0034] Through the initial vector IV constructed as above, only the combination counter needs to be transmitted in the channel during communication, so as to reduce the occupation of communication channel resources.

[0035] In the embodiment of the present invention, a single digital counter is abandoned and multiple digital counters are used to form a combination counter. The combination counter and the filler number form an initial vector for use by the cryptographic algorithm. The combination counter can be designed as a communication counter and a cycle counter. Figure 1 As shown, the design rules are: the cycle counter is stored in the non-volatile memory, and the communication calculator is stored in the volatile memory; the cycle counter and the communication calculator are both initially set to 0.

[0036] like Figure 2 As shown, the working method of the combination counter is as follows:

[0037] (1) When the power is turned on, the cycle counter is incremented by 1 and written to the non-volatile memory.

[0038] (2) During communication, each time a device sends a packet of ciphertext information through a channel, the communication counter increases by 1, and the cycle counter remains unchanged; when the communication counter accumulates to the maximum value and rolls over to 0, the cycle counter increases by 1 and is written into the non-volatile memory.

[0039] (3) When shutting down, the communication counter is cleared to 0 and the cycle counter remains unchanged.

[0040] (4) When the key is changed, the cycle counter and the communication counter are both set to 0, and the cycle counter is written to the non-volatile memory.

[0041] Based on the same technical concept, an embodiment of the present invention further provides an electronic device, which can implement the method flow of constructing an initial vector based on a combination counter provided in the above embodiment of the present invention. In one embodiment, the electronic device can be a server, or a terminal device or other electronic device. Figure 3 As shown, the electronic device may include:

[0042] At least one processor, and a memory connected to the at least one processor. The specific connection medium between the processor and the memory is not limited in the embodiment of the present invention. Figure 3 The example in this article is that the processor and memory are connected through a bus. Figure 3 The connections between other components are shown in bold lines, which are only for illustration and are not intended to be limiting. The bus can be divided into address bus, data bus, control bus, etc. Figure 3 In the diagram, only one thick line is used, but this does not mean that there is only one bus or only one type of bus. Alternatively, a processor can also be called a controller, and there is no limitation on the name.

[0043] In an embodiment of the present invention, the memory stores instructions that can be executed by at least one processor. The at least one processor can execute the method for constructing an initial vector based on a combination counter discussed above by executing the instructions stored in the memory. The processor can implement Figure 3 The functions of each module in the device shown.

[0044] Among them, the processor is the control center of the device, which can use various interfaces and lines to connect the various parts of the entire control device, and monitor the device as a whole by running or executing instructions stored in the memory and calling data stored in the memory, various functions of the device and processing data.

[0045] In an optional design, the processor may include one or more processing units, and the processor may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor. In some embodiments, the processor and the memory may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.

[0046] The processor may be a general-purpose processor, such as a CPU, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of a method for constructing an initial vector based on a combination counter disclosed in the embodiments of the present invention may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0047] As a non-volatile computer-readable storage medium, the memory can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory can include at least one type of storage medium, for example, it can include flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, disk, optical disk, etc. The memory is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this. The memory in the embodiment of the present invention can also be a circuit or any other device that can realize the storage function, which is used to store program instructions and / or data.

[0048] By designing and programming the processor, the code corresponding to the method for constructing an initial vector based on a combination counter described in the above embodiment can be fixed into the chip, so that the chip can perform the steps of the method for constructing an initial vector based on a combination counter in the above embodiment when running. How to design and program the processor is a technology well known to those skilled in the art and will not be described in detail here.

[0049] Based on the same inventive concept, an embodiment of the present invention further provides a storage medium storing computer instructions. When the computer instructions are executed on a computer, the computer executes the method for constructing an initial vector based on a combination counter discussed above.

[0050] In some optional embodiments, the present invention also provides various aspects of a method for constructing an initial vector based on a combination counter, which can also be implemented in the form of a program product, which includes program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of a method for constructing an initial vector based on a combination counter according to various exemplary embodiments of the present invention described above in this specification.

[0051] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of a unit described above can be further divided into multiple units to be embodied. In addition, although the operation of the method of the present invention is described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution.

[0052] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0053] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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 server, 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.

[0054] Program code for performing the operations of the present invention may be written using any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user equipment, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0055] Where a remote computing device is involved, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0056] 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.

[0057] 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 The steps for the functions specified in one or more boxes.

[0058] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for constructing an initial vector based on a combination counter, characterized in that: include: The communicating parties agree on the number of padding in advance; The combined counter and padding number are used together to form the initial vector IV in the encryption and decryption process.

2. The method for constructing an initial vector based on a combination counter according to claim 1, characterized in that: The combination counter is composed of a communication counter and a cycle counter.

3. The method for constructing an initial vector based on a combination counter according to claim 2, characterized in that: The cycle counter is stored in a non-volatile memory, and the communication calculator is stored in a volatile memory.

4. The method for constructing an initial vector based on a combination counter according to claim 3, characterized in that: The cycle counter and communication counter are initially set to 0.

5. The method for constructing an initial vector based on a combination counter according to any one of claims 1 to 4, characterized in that: During communication, only the combination counter is transmitted on the channel.

6. The method for constructing an initial vector based on a combination counter according to claim 5, characterized in that: The working method of the combination counter is as follows: When the power is turned on, the cycle counter is incremented by 1 and written to the non-volatile memory; During communication, each time a device sends a packet of encrypted information through the channel, the communication counter increases by 1, and the cycle counter remains unchanged; The communication counter accumulates to the maximum value and rolls over to 0, the cycle counter increases by 1 and is written into the non-volatile memory; When shutting down, the communication counter is cleared to 0, and the cycle counter remains unchanged; When the key is changed, the cycle counter and the communication counter are both set to 0, and the cycle counter is written to the non-volatile memory.

7. An electronic device, characterized in that: include: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the at least one processor executes the method as described in any one of claims 1 to 6 by executing the instructions stored in the memory.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store instructions, and when the instructions are executed, the method according to any one of claims 1 to 6 is implemented.

9. A computer program product, characterized in that When the computer program product is called by a computer, the computer executes the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Synchronizing method of initial vector IV in operating mode of packet cipher

    CN101286832A

  • Encrypting and decrypting methods and equipment

    CN103746814A

  • System early warning method and device and computer readable storage medium

    CN109522188A

  • Message freshness value updating method and device, computer equipment and storage medium

    CN117692468A

  • Integrity Protection for Data Storage

    US20160267024A1