Information transmission method and device, electronic equipment and computer readable storage medium
By generating a target random number and generating a target session key and a target encryption vector based on the target master key and target time information, the information is transmitted in encrypted form. This solves the security problem caused by the inability of the key management center to update in a timely manner and improves the security of information transmission.
Patent Information
- Application Number
- CN202211465640.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-22
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-11-22
AI Technical Summary
Existing key management centers cannot update the keys between two communicating parties in a timely manner, making the communicating parties vulnerable to replay attacks, brute-force attacks, and dictionary attacks, resulting in poor data transmission security.
The sending end generates a target random number and, based on the target master key, target time information, and target random number, generates a target session key and a target encryption vector to encrypt the information. The sending end then transmits the target encrypted information, target random number, and target time information to the receiving end, which decrypts the information based on the target random number, target time information, and target master key.
By leveraging the variability of the target random number and target time information, the generated target session key and target encryption vector become variable, making them less susceptible to attack and cracking, thus improving the security of information transmission and enhancing overall security.
Smart Images

Figure CN115913541B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of information security technology, and more specifically, to information transmission methods, apparatus, electronic devices, and computer-readable storage media. Background Technology
[0002] Currently, in order to ensure secure information transmission during the process of two communicating parties, they can use keys generated by a key management center to encrypt and decrypt the transmitted information, thereby ensuring that the information sender can securely transmit the information to the information receiver.
[0003] However, existing key management centers cannot update the keys between two communicating parties in a timely manner. This causes the two communicating parties to use a fixed key for communication for a long time, which makes them extremely vulnerable to replay attacks, brute-force attacks, dictionary attacks, etc., resulting in poor data transmission security.
[0004] In conclusion, improving the security of information transmission is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this disclosure is to provide an information transmission method that can, to a certain extent, solve the technical problem of how to improve the security of information transmission. This disclosure also provides an information transmission apparatus, an electronic device, and a computer-readable storage medium.
[0006] According to a first aspect of the present disclosure, an information transmission method is provided, applied at an information sending end, comprising:
[0007] Obtain the target information to be transmitted;
[0008] Obtain the target master key sent by the key management center, and obtain the target time information;
[0009] Generate the target random number;
[0010] Based on the target master key, the target time information, and the target random number, generate the target session key and the target encryption vector;
[0011] The target information is encrypted based on the target session key and the target encryption vector to obtain the target encrypted information;
[0012] The target encrypted information, the target random number, and the target time information are transmitted to the information receiving end, so that the information receiving end can decrypt the target encrypted information based on the target random number, the target time information, and the target master key to obtain the target information.
[0013] Preferably, the step of generating the target session key and the target encryption vector based on the target master key, the target time information, and the target random number includes:
[0014] A temporary key is generated based on the target master key, the target time information, and the target random number;
[0015] The target session key and target encryption vector are generated based on the temporary key.
[0016] Preferably, the step of generating a temporary key based on the target master key, the target time information, and the target random number includes:
[0017] The temporary key is generated by performing SM3 operations on the target master key, the target time information, and the target random number.
[0018] Preferably, the step of performing SM3 operation on the target master key, the target time information, and the target random number includes:
[0019] The target master key, the target time information, and the target random number are subjected to SM3 operation using the first calculation formula.
[0020] The first calculation formula includes:
[0021] TK AB =HMAC(RND||TIME, MK) AB );
[0022] Among them, TK AB The temporary key is represented by A, the information sender by B, and the information receiver by HMAC. HMAC represents the SM3 algorithm, RND represents the target random number, and TIME represents the target time information. AB represents the target master key; || represents concatenation.
[0023] Preferably, the step of generating the target session key and the target encryption vector based on the temporary key includes:
[0024] Use the first half of the temporary key as the first key data;
[0025] Use the latter half of the temporary key as the second key data;
[0026] The target session key is obtained by performing an XOR operation on the first key data and the second key data.
[0027] The first key data and the second key data are XORed to obtain the target encryption vector.
[0028] Preferably, the target random number includes a 16-byte random number, and the temporary key includes a 32-byte key.
[0029] According to a second aspect of the present disclosure, an information transmission method is provided, applied at an information receiving end, comprising:
[0030] Obtain the target encrypted information, target random number, and target time information transmitted by the information sender;
[0031] Obtain the target master key sent by the key management center;
[0032] Based on the target master key, the target time information, and the target random number, generate the target session key and the target encryption vector;
[0033] Based on the target session key and the target encryption vector, the target encrypted information is decrypted to obtain the target information;
[0034] The target encrypted information includes information obtained by encrypting the target information using the target session key and the target encryption vector generated by the information sending end itself.
[0035] According to a third aspect of the present disclosure, an information transmission apparatus is provided, applied at an information sending end, comprising:
[0036] The first acquisition module is used to acquire the target information to be transmitted;
[0037] The second acquisition module is used to acquire the target master key sent by the key management center and to acquire the target time information;
[0038] The first generation module is used to generate the target random number;
[0039] The second generation module is used to generate a target session key and a target encryption vector based on the target master key, the target time information, and the target random number.
[0040] The first encryption module is used to encrypt the target information based on the target session key and the target encryption vector to obtain target encrypted information;
[0041] The first transmission module is used to transmit the target encrypted information, the target random number, and the target time information to the information receiving end, so that the information receiving end can decrypt the target encrypted information based on the target random number, the target time information, and the target master key to obtain the target information.
[0042] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising:
[0043] Memory, used to store computer programs;
[0044] A processor for executing the computer program in the memory to implement the steps of any of the methods described above.
[0045] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0046] This disclosure provides an information transmission method applied at an information sending end, which involves: acquiring target information to be transmitted; acquiring a target master key sent by a key management center and target time information; generating a target random number; generating a target session key and a target encryption vector based on the target master key, target time information, and target random number; encrypting the target information based on the target session key and target encryption vector to obtain target encrypted information; and transmitting the target encrypted information, target random number, and target time information to an information receiving end, so that the information receiving end can decrypt the target encrypted information based on the target random number, target time information, and target master key to obtain the target information. In this disclosure, because the target random number and target time information are variable, the target session key and target encryption vector generated by the information sending end based on them are also variable, making them difficult to attack and crack, thus making the target encrypted information difficult to attack and crack, and improving the security of information transmission. This disclosure also provides an information transmission device, electronic device, and computer-readable storage medium that solves the corresponding technical problems.
[0047] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this disclosure. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0049] Figure 1 This is a first flowchart illustrating an information transmission method according to an exemplary embodiment;
[0050] Figure 2 This is a second flowchart illustrating an information transmission method according to an exemplary embodiment;
[0051] Figure 3 This is a third flowchart illustrating an information transmission method according to an exemplary embodiment;
[0052] Figure 4 This is a schematic diagram illustrating the structure of an information transmission device according to an exemplary embodiment;
[0053] Figure 5 This is a block diagram illustrating an electronic device 900 according to an exemplary embodiment. Detailed Implementation
[0054] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this disclosure.
[0055] Please see Figure 1 , Figure 1 This is a first flowchart illustrating an information transmission method according to an exemplary embodiment.
[0056] This disclosure relates to an information transmission method applied at an information sending end, which may include the following steps:
[0057] Step S101: Obtain the target information to be transmitted.
[0058] It is understood that the type of target information to be transmitted can be determined according to the application scenario. For example, the target information can be voice information, video information, image information, etc. This disclosure does not make any specific limitations.
[0059] Step S102: Obtain the target master key sent by the key management center and obtain the target time information.
[0060] Understandably, the key management center needs to generate the target master key for the information sender. This can be done by using a preset key generation algorithm, such as the identifiers of the information sender and receiver. Furthermore, the target time information can be the time the target information was acquired, a preset transmission time, or the current time, etc. This disclosure does not impose any specific limitations on this.
[0061] It should be noted that the target master key obtained by the information sending end can be a master key generated in real time by the key management center, or a master key generated by the key management center before going offline and stored locally on the information sending end.
[0062] Step S103: Generate the target random number.
[0063] Understandably, the information sender also needs to generate a target random number, such as by using a random number generator.
[0064] Step S104: Generate the target session key and the target encryption vector based on the target master key, target time information, and target random number.
[0065] Step S105: Encrypt the target information based on the target session key and the target encryption vector to obtain the target encrypted information.
[0066] Understandably, after obtaining the target master key, target time information, target random number, and target information, the information sending end can generate the target session key and target encryption vector based on the target master key, target time information, and target random number, and encrypt the target information based on the target session key and target encryption vector to obtain the target encrypted information. The encryption method can be determined according to the application scenario, such as symmetric encryption method, SM2 encryption method, etc.
[0067] Step S106: Transmit the target encrypted information, target random number, and target time information to the information receiving end, so that the information receiving end can decrypt the target encrypted information based on the target random number, target time information, and target master key to obtain the target information.
[0068] Understandably, after encrypting the target information based on the target session key and the target encryption vector, the sending end can transmit the target encrypted information, the target random number, and the target time information to the receiving end. The receiving end can then decrypt the target encrypted information based on the target random number, the target time information, and the target master key to obtain the target information. During this process, the receiving end can obtain the target master key sent by the key management center, generate the target session key and the target encryption vector based on the target master key, the target time information, and the target random number, and decrypt the target encrypted information based on the target session key and the target encryption vector to obtain the target information.
[0069] This disclosure provides an information transmission method applied at an information sending end. The method involves: acquiring target information to be transmitted; acquiring the target master key sent by a key management center and the target time information; generating a target random number; generating a target session key and a target encryption vector based on the target master key, target time information, and target random number; encrypting the target information based on the target session key and target encryption vector to obtain encrypted target information; and transmitting the encrypted target information, target random number, and target time information to an information receiving end, so that the information receiving end can decrypt the encrypted target information based on the target random number, target time information, and target master key to obtain the target information. In this disclosure, because the target random number and target time information are variable, the target session key and target encryption vector generated by the information sending end based on them are also variable, making them difficult to attack and crack. Furthermore, only the random number, time factor, and ciphertext are exposed in the network during the entire encryption and decryption process, eliminating the risk of key exposure. This makes the encrypted target information difficult to attack and crack, improving the security of information transmission. Moreover, the key can be changed even when the key management center is offline, further increasing the overall security of the method.
[0070] Please see Figure 2 , Figure 2 This is a second flowchart illustrating an information transmission method according to an exemplary embodiment.
[0071] This disclosure relates to an information transmission method applied at an information sending end, which may include the following steps:
[0072] Step S201: Obtain the target information to be transmitted.
[0073] Step S202: Obtain the target master key sent by the key management center and obtain the target time information.
[0074] Step S203: Generate the target random number.
[0075] Step S204: Generate a temporary key based on the target master key, target time information, and target random number.
[0076] Step S205: Generate the target session key and target encryption vector based on the temporary key.
[0077] It is understandable that in the process of generating the target session key and the target encryption vector based on the target master key, target time information, and target random number, a temporary key can be generated first based on the target master key, target time information, and target random number; and then the target session key and the target encryption vector can be generated based on the temporary key.
[0078] Understandably, in some application scenarios, during the process of generating a temporary key based on the target master key, target time information, and target random number, the target master key, target time information, and target random number can be subjected to SM3 operation to generate a temporary key. For example, the first operation formula can be used to perform SM3 operation on the target master key, target time information, and target random number to generate a temporary key.
[0079] The first operational formula includes:
[0080] TK AB =HMAC(RND||TIME, MK) AB );
[0081] Among them, TK AB This represents the temporary key; A represents the message sender; B represents the message receiver; HMAC represents the SM3 algorithm; RND represents the target random number; TIME represents the target time information; MK AB || indicates the target master key; || indicates concatenation.
[0082] Understandably, in some application scenarios, during the process of generating the target session key and the target encryption vector based on the temporary key, the first half of the temporary key can be used as the first key data; the second half of the temporary key can be used as the second key data; the first key data and the second key data can be XORed to obtain the target session key; and the first key data and the second key data can be XORed to obtain the target encryption vector.
[0083] Understandably, in some application scenarios, the size of the target random number and the temporary key can be flexibly determined as needed. For example, the target random number may include a 16-byte random number, and the temporary key may include a 32-byte key.
[0084] Step S206: Encrypt the target information based on the target session key and the target encryption vector to obtain the target encrypted information.
[0085] Step S207: Transmit the target encrypted information, target random number, and target time information to the information receiving end, so that the information receiving end can decrypt the target encrypted information based on the target random number, target time information, and target master key to obtain the target information.
[0086] Please see Figure 3 , Figure 3 This is a third flowchart illustrating an information transmission method according to an exemplary embodiment.
[0087] This disclosure relates to an information transmission method applied at an information receiving end, which may include the following steps:
[0088] Step S301: Obtain the target encrypted information, target random number, and target time information transmitted by the information sending end.
[0089] Step S302: Obtain the target master key sent by the key management center.
[0090] Step S303: Generate the target session key and the target encryption vector based on the target master key, target time information, and target random number.
[0091] Step S304: Decrypt the target encrypted information based on the target session key and the target encryption vector to obtain the target information. The target encrypted information includes the information obtained by the information sender encrypting the target information based on the target session key and the target encryption vector generated by itself.
[0092] The description of the corresponding steps in the information transmission method applied to the information receiving end involved in this disclosure can be found in the above embodiments, and will not be repeated here.
[0093] It should be noted that the information transmission method provided in this disclosure can be adapted and improved according to the application scenario. For example, in the power monitoring system illustrated in Example 4, which includes a production control area and a management information area, the information transmission between business systems may include the following steps:
[0094] Business system A obtains a symmetric key from key management center A to serve as the target master key. This symmetric key is the key generated by key management center for business system A and business system B.
[0095] Business system A sends the target master key and the target information to be transmitted to server cryptographic machine A;
[0096] Server cryptographic machine A generates the target random number and generates a temporary key based on the target random number, target time information, and target master key;
[0097] Server cryptographic machine A uses the first half of the temporary key as the first key data; uses the second half of the temporary key as the second key data; performs an XOR operation on the first key data and the second key data to obtain the target session key; and performs an XNOR operation on the first key data and the second key data to obtain the target encryption vector.
[0098] Server cryptographic machine A encrypts the target information based on the target session key and the target encryption vector, obtains the target encrypted information, and transmits it to business system A;
[0099] Business system A transmits the target encrypted information, target random number, and target time information to business system B;
[0100] Business system B obtains a symmetric key from key management center B to serve as the target master key;
[0101] Business system B sends the target master key, target encryption information, target random number, and target time information to server cryptographic machine B;
[0102] Server cryptographic machine B generates a temporary key based on the target random number, target time information, and target master key;
[0103] Server cryptographic machine B uses the first half of the temporary key as the first key data; uses the second half of the temporary key as the second key data; performs an XOR operation on the first key data and the second key data to obtain the target session key; and performs an XNOR operation on the first key data and the second key data to obtain the target encryption vector.
[0104] Server cryptographic machine B decrypts the target encrypted information based on the target session key and the target encryption vector, obtains the target information, and transmits it to business system B.
[0105] Please see Figure 4 , Figure 4 This is a schematic diagram illustrating the structure of an information transmission device according to an exemplary embodiment.
[0106] This disclosure relates to an information transmission device 400, applied at an information sending end, which may include:
[0107] The first acquisition module 410 is used to acquire the target information to be transmitted;
[0108] The second acquisition module 420 is used to acquire the target master key sent by the key management center and to acquire the target time information;
[0109] The first generation module 430 is used to generate the target random number;
[0110] The second generation module 440 is used to generate a target session key and a target encryption vector based on the target master key, target time information, and target random number.
[0111] The first encryption module 450 is used to encrypt the target information based on the target session key and the target encryption vector to obtain the target encrypted information;
[0112] The first transmission module 460 is used to transmit target encrypted information, target random number, and target time information to the information receiving end, so that the information receiving end can decrypt the target encrypted information based on the target random number, target time information, and target master key to obtain the target information.
[0113] This disclosure relates to an information transmission device 400, applied at an information sending end, wherein the second generation module may include:
[0114] The first generation unit is used to generate a temporary key based on the target master key, the target time information, and the target random number.
[0115] The second generation unit is used to generate the target session key and the target encryption vector based on the temporary key.
[0116] This disclosure relates to an information transmission device 400, which is applied to an information sending end. The first generation unit can be used to: perform SM3 operation on the target master key, target time information, and target random number to generate a temporary key.
[0117] This disclosure relates to an information transmission device 400, which is applied to an information sending end. The first generation unit can be used to: perform SM3 operation on the target master key, target time information, and target random number through a first calculation formula.
[0118] The first operational formula includes:
[0119] TK AB =HMAC(RND||TIME, MK) AB );
[0120] Among them, TK AB This represents the temporary key; A represents the message sender; B represents the message receiver; HMAC represents the SM3 algorithm; RND represents the target random number; TIME represents the target time information; MK AB || indicates the target master key; || indicates concatenation.
[0121] This disclosure relates to an information transmission device 400, applied at an information sending end. The second generation unit can be used to: use the first half of the temporary key as first key data; use the second half of the temporary key as second key data; perform an XOR operation on the first key data and the second key data to obtain a target session key; and perform an XNOR operation on the first key data and the second key data to obtain a target encryption vector.
[0122] This disclosure relates to an information transmission device 400, which is applied to an information sending end. The target random number includes a 16-byte random number, and the temporary key includes a 32-byte key.
[0123] This disclosure relates to an information transmission device 400, applied at an information receiving end, which may include:
[0124] The third acquisition module is used to acquire the target encrypted information, target random number, and target time information transmitted by the information sending end.
[0125] The fourth acquisition module is used to acquire the target master key sent by the key management center;
[0126] The third generation module is used to generate the target session key and the target encryption vector based on the target master key, target time information, and target random number.
[0127] The first decryption module is used to decrypt the target encrypted information based on the target session key and the target encryption vector to obtain the target information;
[0128] The target encrypted information includes the information obtained by encrypting the target information using the target session key and the target encryption vector generated by the information sending end.
[0129] Figure 5 This is a block diagram illustrating an electronic device 900 according to an exemplary embodiment. Figure 5 As shown, the electronic device 900 may include a processor 901 and a memory 902. The electronic device 900 may also include one or more of a multimedia component 903, an input / output (I / O) interface 904, and a communication component 905.
[0130] The processor 901 controls the overall operation of the electronic device 900 to complete all or part of the steps in the aforementioned information transmission method. The memory 902 stores various types of data to support the operation of the electronic device 900. This data may include, for example, instructions for any application or method operating on the electronic device 900, and application-related data such as contact data, sent and received messages, pictures, audio, video, etc. The memory 902 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 903 may include a screen and audio components. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory 902 or transmitted via communication component 905. The audio component also includes at least one speaker for outputting audio signals. I / O interface 904 provides an interface between processor 901 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical buttons. Communication component 905 is used for wired or wireless communication between the electronic device 900 and other devices. Wireless communication may include Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of these. Therefore, the corresponding communication component 905 may include a Wi-Fi module, a Bluetooth module, or an NFC module.
[0131] In an exemplary embodiment, the electronic device 900 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the information transmission method described above.
[0132] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the above-described information transmission method. For example, the computer-readable storage medium may be the memory 902 including program instructions, which may be executed by the processor 901 of the electronic device 900 to complete the above-described information transmission method.
[0133] For descriptions of relevant parts in the information transmission apparatus, electronic device, and computer-readable storage medium provided in this disclosure, please refer to the detailed description of the corresponding parts in the information transmission method provided in this disclosure, which will not be repeated here. Furthermore, parts of the technical solutions provided in this disclosure that are consistent with the implementation principles of corresponding technical solutions in the prior art have not been described in detail to avoid excessive elaboration.
[0134] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0135] The above description of the disclosed embodiments enables those skilled in the art to make or use this disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An information transmission method, characterized in that, Applied to the information sending end, including: Obtain the target information to be transmitted; Obtain the target master key sent by the key management center, and obtain the target time information; Generate the target random number; Based on the target master key, the target time information, and the target random number, generate the target session key and the target encryption vector; The target information is encrypted based on the target session key and the target encryption vector to obtain the target encrypted information; The target encrypted information, the target random number, and the target time information are transmitted to the information receiving end, so that the information receiving end can decrypt the target encrypted information based on the target random number, the target time information, and the target master key to obtain the target information; The step of generating the target session key and the target encryption vector based on the target master key, the target time information, and the target random number includes: Using the first calculation formula, an SM3 operation is performed on the target master key, the target time information, and the target random number to generate a temporary key; Use the first half of the temporary key as the first key data; Use the latter half of the temporary key as the second key data; The target session key is obtained by performing an XOR operation on the first key data and the second key data. Perform an XOR operation on the first key data and the second key data to obtain the target encryption vector; The first calculation formula includes: ; in, This refers to the temporary key. This refers to the information sending end; This refers to the information receiving end; This refers to the SM3 algorithm; Represents the target random number; This indicates the target time information; This refers to the target master key; Indicates splicing.
2. The method according to claim 1, characterized in that, The target random number consists of a 16-byte random number, and the temporary key consists of a 32-byte key.
3. An information transmission method, characterized in that, Applied to the information receiving end, including: Obtain the target encrypted information, target random number, and target time information transmitted by the information sender; Obtain the target master key sent by the key management center; Based on the target master key, the target time information, and the target random number, generate the target session key and the target encryption vector; Based on the target session key and the target encryption vector, the target encrypted information is decrypted to obtain the target information; The target encrypted information includes information obtained by encrypting the target information using the target session key and the target encryption vector generated by the information sending end itself. The step of generating the target session key and the target encryption vector based on the target master key, the target time information, and the target random number includes: Using the first calculation formula, an SM3 operation is performed on the target master key, the target time information, and the target random number to generate a temporary key; Use the first half of the temporary key as the first key data; Use the latter half of the temporary key as the second key data; The target session key is obtained by performing an XOR operation on the first key data and the second key data. Perform an XOR operation on the first key data and the second key data to obtain the target encryption vector; The first calculation formula includes: ; in, This refers to the temporary key. This refers to the information sending end; This refers to the information receiving end; This represents the SM3 algorithm; Represents the target random number; This indicates the target time information; This refers to the target master key; Indicates splicing.
4. An information transmission device, characterized in that, Applied to the information sending end, including: The first acquisition module is used to acquire the target information to be transmitted; The second acquisition module is used to acquire the target master key sent by the key management center and to acquire the target time information; The first generation module is used to generate the target random number; The second generation module is used to generate a target session key and a target encryption vector based on the target master key, the target time information, and the target random number. The first encryption module is used to encrypt the target information based on the target session key and the target encryption vector to obtain target encrypted information; The first transmission module is used to transmit the target encrypted information, the target random number, and the target time information to the information receiving end, so that the information receiving end can decrypt the target encrypted information based on the target random number, the target time information, and the target master key to obtain the target information; The second generation module includes: The first generation unit is used to perform SM3 operation on the target master key, the target time information, and the target random number using a first calculation formula to generate a temporary key; The second generation unit is configured to use the first half of the temporary key as first key data; use the second half of the temporary key as second key data; perform an XOR operation on the first key data and the second key data to obtain the target session key; and perform an XNOR operation on the first key data and the second key data to obtain the target encryption vector. The first calculation formula includes: ; in, This refers to the temporary key. This refers to the information sending end; This refers to the information receiving end; This refers to the SM3 algorithm; Represents the target random number; This indicates the target time information; This refers to the target master key; Indicates splicing.
5. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program in the memory to implement the steps of the method according to any one of claims 1 to 3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Message processing method and device
CN107566335A
An SV message encryption and decryption method based on IEC 61850 standard
CN109040120A