Communication verification method, device and medium based on combined encryption algorithm

The communication verification method combining encryption algorithms solves the problem of insufficient data transmission security in the existing technology. The digest, sequence and key in the data packet are verified through group splitting and decryption to ensure the integrity and security of data transmission. .

CN118573490BActive Publication Date: 2024-10-01上海景瑞阳实业有限公司
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411063459.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-10-01
Estimated Expiration
2044-08-05

AI Technical Summary

Technical Problem

Existing communication methods allow data to be easily cracked and tampered with during transmission, resulting in insufficient communication security and the receiving end being unable to effectively verify the integrity of the data.

Method used

A communication verification method based on a combined encryption algorithm is adopted to ensure the security of data transmission by obtaining encrypted data groups, splitting the groups, decrypting and verifying the digest, sequence and key in the data packets.

Benefits of technology

It improves the security of data transmission, effectively verifies whether the transmitted data has been tampered with, greatly enhances the security of the communication process, and prevents data from being tampered without being discovered.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118573490B_ABST
    Figure CN118573490B_ABST
Patent Text Reader

Abstract

The present invention provides a communication verification method, device and medium based on a combined encryption algorithm, the method comprising: obtaining an encrypted encrypted data group; removing a verification summary, a verification sequence and a dynamic key, grouping and splitting the encrypted data packet to obtain a plurality of split encrypted data groups; combining a plurality of first summary data groups together to form a second summary data; extracting header information from each split decrypted data group, arranging the header information in order to establish a header sequence; comparing the second summary data with the verification summary to obtain first matching information, comparing the header sequence with the verification sequence to obtain second matching information, matching the dynamic key with the dynamic encryption function to obtain third matching information; verifying according to the matching information, and obtaining the original data after the verification is passed. The present invention encrypts and transmits communication data by combining encryption and verification, effectively improving the security of data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of communication technology, and in particular relates to a communication verification method, device and medium based on a combined encryption algorithm. Background Art

[0002] Nowadays, with the increasing importance of industrial field communications, the communication security of various fieldbus-based communication methods is becoming increasingly important. Some current communication methods have defects such as corresponding instructions and addresses are transmitted in plain text, so attackers can easily intercept and tamper with data information, thereby causing communication failures and endangering communication security.

[0003] Moreover, even if simple encryption is performed, there is still a risk of being cracked, and the receiving end cannot accurately verify after receiving the tampered information, resulting in huge security risks in the communication process. Summary of the invention

[0004] In view of the above-mentioned shortcomings of the prior art, the purpose of the present invention is to provide a communication verification method, device and medium based on a combined encryption algorithm, which is used to solve the problem in the prior art that communication data is easily cracked and tampered with, thereby affecting the security of communication.

[0005] To achieve the above-mentioned object and other related objects, the present invention provides a communication verification method based on a combined encryption algorithm, comprising the following steps:

[0006] Obtaining an encrypted data group, wherein the encrypted data group is data obtained after the original data is combined and encrypted, and the encrypted data group includes an encrypted data packet, a verification digest, a verification sequence, and a dynamic key;

[0007] After removing the verification summary, the verification sequence and the dynamic key, the encrypted data packet is grouped and split to obtain a plurality of split encrypted data groups;

[0008] Extracting first summary data of each of the split encrypted data groups respectively, and combining multiple groups of the first summary data together to form second summary data;

[0009] Decrypting each of the split encrypted data groups to obtain multiple split decrypted data groups, extracting header information from each of the split decrypted data groups, and arranging the header information in order to establish a header sequence;

[0010] Comparing the second summary data with the verification summary to obtain first matching information, comparing the header sequence with the verification sequence to obtain second matching information, and matching the dynamic key with the dynamic encryption function to obtain third matching information;

[0011] Verifying the first matching information, the second matching information and the third matching information, and after the verification is passed, sequentially integrating the multiple groups of split decrypted data groups to obtain the original data;

[0012] Among them, the verification summary, the verification sequence and the dynamic key are all embedded in the encrypted data packet in a preset order, the encrypted data packet is obtained by at least two encryption methods, the verification sequence and the dynamic key are both extracted by the sending end device based on the original data, the verification summary is obtained by the sending end device extracting key data based on the encrypted data packet, and the key data includes middle position data and last position data.

[0013] In one embodiment of the present invention, the process of combining and encrypting the original data to obtain the encrypted data group includes:

[0014] The sending end device obtains a first data length of the original data, generates a first random number according to the first data length, and selects a corresponding symmetric encryption algorithm according to the first random number and the data type to perform a first encryption to obtain first encrypted data;

[0015] Obtaining an encryption key of the symmetric encryption algorithm and a second data length of the first encrypted data, generating a second random number according to the second data length and the type of the first encrypted data, and selecting an asymmetric encryption algorithm according to the encryption key and the second random number to encrypt the first encrypted data to obtain second encrypted data;

[0016] Integrate the first random number and the second random number at both ends of the second encrypted data to obtain the encrypted data packet;

[0017] The first random number and the second random number are different integers, and both the sending end device and the receiving end device store an algorithm database containing a plurality of symmetric encryption algorithms and asymmetric encryption algorithms.

[0018] In one embodiment of the present invention, the step of removing the verification digest, the verification sequence, and the dynamic key and grouping and splitting the encrypted data packet to obtain a plurality of split encrypted data groups includes:

[0019] After removing the verification digest, the verification sequence, and the dynamic key, removing the first random number and the second random number at both ends of the encrypted data packet, and calculating the absolute value of the difference between the first random number and the second random number;

[0020] The second encrypted data is correspondingly divided into the same number of split encrypted data groups according to the numerical value of the absolute value of the difference.

[0021] In one embodiment of the present invention, respectively extracting the first summary data of each of the split encrypted data groups, and combining multiple groups of the first summary data together to form the second summary data, includes:

[0022] Extracting key data of each of the split encrypted data groups as first summary data;

[0023] The first summary data corresponding to each of the split encrypted data groups are integrated in the order of the split encrypted data groups to obtain the second summary data.

[0024] In one embodiment of the present invention, each of the split encrypted data groups is decrypted to obtain a plurality of split decrypted data groups, header information is extracted from each of the split decrypted data groups, and the header information is arranged in sequence to establish a header sequence;

[0025] Obtaining a corresponding decryption algorithm in an algorithm database according to the first random number and the second random number, and decrypting each of the split encrypted data groups according to the decryption algorithm to obtain multiple split decrypted data groups;

[0026] Extracting header information of each of the split decrypted data groups;

[0027] The header information is sorted according to the original order of each of the split encrypted data groups to establish the header sequence.

[0028] In one embodiment of the present invention, the comparing the second summary data with the verification summary to obtain first matching information, the comparing the header sequence with the verification sequence to obtain second matching information, and the matching the dynamic key with the dynamic encryption function to obtain third matching information include:

[0029] calling the verification summary, and calculating the similarity between the second summary data and the verification summary to obtain the first matching information;

[0030] calling the verification sequence, and calculating the similarity between the header sequence and the verification sequence to obtain the second matching information;

[0031] The dynamic key is called and input into the dynamic encryption function to output an encryption sequence, and the third matching information is obtained by calculation according to a corresponding relationship between the encryption sequence and the first random number and the second random number.

[0032] In one embodiment of the present invention, the encryption sequence includes a combination of first comparison information, second comparison information and an encryption algorithm, the first comparison information corresponds to the first random number, and the second comparison information corresponds to the second random number.

[0033] In one embodiment of the present invention, the verifying of the first matching information, the second matching information and the third matching information, and after the verification is passed, sequentially integrating the plurality of split decrypted data groups to obtain the original data, comprises:

[0034] After determining that the first matching information, the second matching information, and the third matching information all meet preset requirements, determining that the encryption verification is passed;

[0035] The plurality of split decrypted data groups are sequentially integrated together according to a preset order to obtain the original data.

[0036] The present invention provides a communication verification device based on a combined encryption algorithm, characterized in that it includes:

[0037] A data acquisition module, used to acquire an encrypted data group, wherein the encrypted data group is data obtained after the original data is combined and encrypted, and the encrypted data group includes an encrypted data packet, a verification summary, a verification sequence and a dynamic key;

[0038] A splitting module, used for grouping and splitting the encrypted data packet to obtain a plurality of split encrypted data groups;

[0039] A first extraction module, used for respectively extracting first summary data of each of the split encrypted data groups, and combining multiple groups of the first summary data together to form second summary data;

[0040] A second extraction module is used to decrypt each of the split encrypted data groups to obtain multiple split decrypted data groups, extract header information from each of the split decrypted data groups, and arrange the header information in order to establish a header sequence;

[0041] a calculation module, configured to compare the second summary data with the verification summary to obtain first matching information, compare the header sequence with the verification sequence to obtain second matching information, and match the dynamic key with the dynamic encryption function to obtain third matching information;

[0042] A verification module, used for verifying the first matching information, the second matching information and the third matching information, and after the verification is passed, sequentially integrating the multiple groups of split decrypted data groups to obtain the original data;

[0043] Among them, the verification summary, the verification sequence and the dynamic key are all embedded in the encrypted data packet in a preset order, the encrypted data packet is obtained by at least two encryption methods, the verification sequence and the dynamic key are both extracted by the sending end device based on the original data, the verification summary is obtained by the sending end device extracting key data based on the encrypted data packet, and the key data includes middle position data and last position data.

[0044] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the communication verification method based on the combined encryption algorithm is implemented.

[0045] As described above, the communication verification method, device and medium based on the combined encryption algorithm described in the present invention have the following beneficial effects:

[0046] The present invention encrypts the original data to be transmitted by a combined encryption method, thereby improving the security of data transmission. After the encrypted transmission, the corresponding encryption verification method is selected according to the encryption method to effectively verify whether the transmitted encrypted data has been tampered with, thereby greatly improving the security of data communication and effectively preventing data from being tampered with without being discovered. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 Shown is a flow chart of a communication authentication method based on a combined encryption algorithm of the present invention.

[0048] Figure 2 Shown is a structural block diagram of a communication verification device based on a combined encryption algorithm of the present invention. DETAILED DESCRIPTION

[0049] The following describes the embodiments of the present invention through specific embodiments, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0050] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention. The illustrations only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0051] The communication verification method, device and medium based on the combined encryption algorithm described in the present invention encrypt the original data to be transmitted by means of combined encryption, thereby improving the security of data transmission, and after the encrypted transmission, selects the corresponding encryption verification method according to the encryption method to effectively verify whether the transmitted encrypted data has been tampered with, thereby greatly improving the security of data communication and effectively preventing data from being tampered with without being discovered.

[0052] like Figure 1 As shown, in one embodiment, a communication verification method based on a combined encryption algorithm of the present invention, referring to Figure 1 , including the following steps:

[0053] S100. Obtain an encrypted encryption data group, wherein the encrypted data group is data obtained by combining and encrypting original data, the encrypted data group includes an encrypted data packet, a verification summary, a verification sequence, and a dynamic key, the encrypted data packet is obtained by at least two encryption methods, the verification summary, the verification sequence, and the dynamic key are all embedded in the encrypted data packet in a preset order, the verification sequence and the dynamic key are both extracted by a sending end device based on the original data, the verification summary is obtained by the sending end device extracting key data based on the encrypted data packet, and the key data includes middle position data and last position data.

[0054] In this embodiment, during the communication process, the original data is combined and encrypted by the sending device to obtain an encrypted data packet, and the sending device integrates the encrypted data packet, verification summary, verification sequence and dynamic key together to form an encrypted data group, so that even if the encrypted data packet is intercepted later, the original information therein cannot be easily cracked, which increases the difficulty of decryption and improves the security of the communication process. At the same time, the privacy of the verification summary, verification sequence and dynamic key is improved, making the verification summary, verification sequence and dynamic key not easily discovered and tampered with. Even if the original information is tampered with later, it can be quickly discovered by comparing the verification summary, verification sequence and dynamic key, further improving the security of the communication process.

[0055] Among them, the verification sequence and the dynamic key are both extracted by the sending device based on the original data, and are mainly used in the subsequent verification process. The dynamic key is determined based on the combined encryption method of the original data by the sending end, and the verification summary is obtained by the sending device extracting key data based on the encrypted data packet.

[0056] In some embodiments, the process of combining and encrypting the original data to obtain the encrypted data group includes:

[0057] The sending end device obtains a first data length of the original data, generates a first random number according to the first data length, and selects a corresponding symmetric encryption algorithm according to the first random number and the data type to perform a first encryption to obtain first encrypted data;

[0058] Obtaining an encryption key of the symmetric encryption algorithm and a second data length of the first encrypted data, generating a second random number according to the second data length and the type of the first encrypted data, and selecting an asymmetric encryption algorithm according to the encryption key and the second random number to encrypt the first encrypted data to obtain second encrypted data;

[0059] Integrate the first random number and the second random number at both ends of the second encrypted data to obtain the encrypted data packet;

[0060] The first random number and the second random number are different integers, and both the sending end device and the receiving end device store an algorithm database containing a plurality of symmetric encryption algorithms and asymmetric encryption algorithms.

[0061] Specifically, when it is necessary to encrypt the original data, first obtain the first data length of the original data, and generate a first random number according to the first data length, so as to select the corresponding symmetric encryption algorithm in the algorithm database according to the first random number and the type of the original data for the first encryption to obtain the first encrypted data, then obtain the encryption key of the symmetric encryption algorithm and the second data length of the first encrypted data, so as to generate a second random number according to the second data length and the type of the first encrypted data, then select an asymmetric algorithm in the algorithm database according to the encryption key and the second random number to encrypt the first encrypted data to obtain the second encrypted data, and then integrate the first random number and the second random number at both ends of the second encrypted data to obtain an encrypted data packet. By integrating the first random number and the second random number, the encrypted data packet contains not only the original data, but also the first random number and the second random number, so as to facilitate subsequent security verification, increase the probability of data being discovered after being tampered with, and increase the difficulty of data being cracked, thereby enhancing the security of data transmission.

[0062] Furthermore, after the original data is encrypted to obtain the second encrypted data, the first random number and the second random number are integrated at both ends of the second encrypted data to form an encrypted data packet, and the second encrypted data is divided into multiple groups according to the absolute value of the difference between the first random number and the second random number, and the key data of each group of data is calculated in turn, and the key data of each group of data is integrated together to obtain a subsequent verification summary for comparison, which is convenient for subsequent verification, and at the same time, the header information of each group of data is extracted, and the header information is arranged in sequence to establish a verification sequence, which is convenient for subsequent comparison.

[0063] S200, after removing the verification summary, the verification sequence and the dynamic key, the encrypted data packet is grouped and split to obtain a plurality of split encrypted data groups.

[0064] In some further embodiments, the step of grouping and splitting the encrypted data packet after removing the verification digest, the verification sequence, and the dynamic key to obtain a plurality of split encrypted data groups includes:

[0065] After removing the verification digest, the verification sequence, and the dynamic key, removing the first random number and the second random number at both ends of the encrypted data packet, and calculating the absolute value of the difference between the first random number and the second random number;

[0066] The second encrypted data is correspondingly divided into the same number of split encrypted data groups according to the numerical value of the absolute value of the difference.

[0067] Specifically, after the receiving device receives the encrypted data group, it extracts the encrypted data packet therein to obtain the first random number and the second random number in the encrypted data packet, and at the same time removes the first random number and the second random number at the beginning and the end of the encrypted data packet, and calculates the absolute value of the difference between the first random number and the second random number, and divides the second encrypted data into the same number of split encrypted data groups in sequence according to the numerical value of the absolute value of the difference, so as to facilitate subsequent separate decryption.

[0068] S300, extracting first summary data from each of the split encrypted data groups respectively, and combining multiple groups of the first summary data together to form second summary data.

[0069] In some embodiments, respectively extracting the first summary data of each of the split encrypted data groups, and combining multiple groups of the first summary data together to form the second summary data, comprises:

[0070] Extracting key data of each of the split encrypted data groups as first summary data;

[0071] The first summary data corresponding to each of the split encrypted data groups are integrated in the order of the split encrypted data groups to obtain the second summary data.

[0072] Specifically, after obtaining multiple groups of split encrypted data groups, the key data of each split encrypted data group is extracted as the first summary data, and then the multiple first summary data are integrated together according to the order of each split encrypted data group to obtain the second summary data, so as to facilitate the subsequent verification of the second summary data. In this embodiment, by extracting each split encrypted data group to obtain the second summary data of the entire encrypted data packet, it is convenient to compare the encrypted data later, so as to verify whether the encrypted data remains unchanged after transmission.

[0073] S400, decrypting each of the split encrypted data groups to obtain multiple split decrypted data groups, extracting header information from each of the split decrypted data groups, and arranging the header information in sequence to establish a header sequence.

[0074] In some other embodiments, decrypting each of the split encrypted data groups to obtain multiple split decrypted data groups, extracting header information from each of the split decrypted data groups, and arranging the header information in order to establish a header sequence includes:

[0075] Obtaining a corresponding decryption algorithm in an algorithm database according to the first random number and the second random number, and decrypting each of the split encrypted data groups according to the decryption algorithm to obtain multiple split decrypted data groups;

[0076] Extracting header information of each of the split decrypted data groups;

[0077] The header information is sorted according to the original order of each of the split encrypted data groups to establish the header sequence.

[0078] Specifically, the decryption algorithm corresponding to the encryption algorithm is obtained in the algorithm database according to the first random number and the second random number, and the split encrypted data group is decrypted according to the decryption algorithm to obtain multiple split decrypted data groups, and then the header information of each split decrypted data group is extracted, and each header information is sorted according to the original order of each split decrypted data group to obtain a header sequence. In order to verify the decrypted data according to the header information, the verification process of the encrypted data with the aforementioned second summary information is carried out to realize the double verification of the encrypted data and the decrypted data, thereby ensuring the security of the communication encryption transmission process and effectively preventing the encrypted data from being tampered with.

[0079] S500, compare the second summary data with the verification summary to obtain first matching information, compare the header sequence with the verification sequence to obtain second matching information, and match the dynamic key with the dynamic encryption function to obtain third matching information.

[0080] In some other embodiments, the comparing the second summary data with the verification summary to obtain first matching information, comparing the header sequence with the verification sequence to obtain second matching information, and matching the dynamic key with the dynamic encryption function to obtain third matching information includes:

[0081] calling the verification summary, and calculating the similarity between the second summary data and the verification summary to obtain the first matching information;

[0082] calling the verification sequence, and calculating the similarity between the header sequence and the verification sequence to obtain the second matching information;

[0083] The dynamic key is called and input into the dynamic encryption function to output an encryption sequence, and the third matching information is calculated based on the corresponding relationship between the encryption sequence and the first random number and the second random number.

[0084] In this embodiment, the first matching information is obtained by calculating the similarity between the second summary data and the verification summary, thereby determining whether the encrypted data received by the receiving device is the same as the encrypted data sent by the sending device; and the second matching information is obtained by calculating the similarity between the header sequence and the verification sequence, thereby determining whether the decrypted data obtained after decryption by the receiving device is the same as the original data sent by the sending end; and the encryption sequence corresponding to the dynamic encryption function is determined according to the dynamic key, and the encryption sequence includes a combination of first comparison information, second comparison information and an encryption algorithm, the first comparison information corresponds to the first random number, and the second comparison information corresponds to the second random number, so as to calculate the correspondence between the encryption sequence and the first random number and the second random number according to the first comparison information and the second comparison information to obtain the third matching information, thereby determining whether the encryption algorithms are the same, thereby achieving all-round verification of the data.

[0085] S600, verifying the first matching information, the second matching information and the third matching information, and after the verification is passed, integrating the multiple groups of split decrypted data groups in sequence to obtain the original data.

[0086] In some embodiments, the verifying the first matching information, the second matching information, and the third matching information, and after the verification is passed, sequentially integrating the multiple groups of split decrypted data groups to obtain the original data, includes:

[0087] After determining that the first matching information, the second matching information, and the third matching information all meet preset requirements, determining that the encryption verification is passed;

[0088] The plurality of split decrypted data groups are sequentially integrated together according to a preset order to obtain the original data.

[0089] Specifically, by judging whether the first matching information, the second matching information and the third matching information meet the requirements, it is determined whether the verification is passed. When the verification is passed, the multiple groups of split decryption groups can be integrated in order to obtain the original data, thereby completing the encryption transmission and decryption verification of the data and ensuring the security of data transmission. Compared with the data communication process in the prior art that only uses simple encryption but lacks effective verification means, the present application scheme can effectively improve the data. When the verification fails, it is determined that the data has been tampered with during transmission, so the data is determined to be invalid and the entire communication line is checked.

[0090] It should be noted that the protection scope of the method described in the present invention is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present invention are included in the protection scope of the present invention.

[0091] The present invention also provides a communication verification device based on a combined encryption algorithm, referring to Figure 2 ,include:

[0092] The data acquisition module 201 is used to acquire an encrypted data group, wherein the encrypted data group is data obtained after the original data is combined and encrypted, and the encrypted data group includes an encrypted data packet, a verification digest, a verification sequence and a dynamic key;

[0093] A splitting module 202, configured to split the encrypted data packet into groups to obtain a plurality of split encrypted data groups;

[0094] A first extraction module 203, used to extract first summary data of each of the split encrypted data groups, and combine multiple groups of the first summary data together to form second summary data;

[0095] A second extraction module 204 is used to decrypt each of the split encrypted data groups to obtain multiple split decrypted data groups, extract header information from each of the split decrypted data groups, and arrange the header information in order to establish a header sequence;

[0096] The calculation module 205 is used to compare the second summary data with the verification summary to obtain first matching information, compare the header sequence with the verification sequence to obtain second matching information, and match the dynamic key with the dynamic encryption function to obtain third matching information;

[0097] A verification module 206, configured to verify the first matching information, the second matching information and the third matching information, and after the verification is passed, sequentially integrate the multiple groups of split decrypted data groups to obtain the original data;

[0098] Among them, the verification summary, the verification sequence and the dynamic key are all embedded in the encrypted data packet in a preset order, the encrypted data packet is obtained by at least two encryption methods, the verification sequence and the dynamic key are both extracted by the sending end device based on the original data, the verification summary is obtained by the sending end device extracting key data based on the encrypted data packet, and the key data includes middle position data and last position data.

[0099] It should be noted that the structure and principle of the communication verification device based on the combined encryption algorithm correspond one to one with the steps in the above-mentioned communication verification method based on the combined encryption algorithm, so they will not be described in detail here.

[0100] It should be noted that it should be understood that the division of the various modules of the above system is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the x module can be a separately established processing element, or it can be integrated in a certain chip of the above system for implementation. In addition, it can also be stored in the memory of the above system in the form of program code, and called and executed by a certain processing element of the above system. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0101] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0102] It should be noted that the system of the present invention can implement the method of the present invention, but the implementation device of the method of the present invention includes but is not limited to the structure of the system listed in this embodiment, and all structural deformations and replacements of the prior art made according to the principles of the present invention are included in the protection scope of the present invention.

[0103] The present invention also provides a storage medium on which a computer program is stored, characterized in that the computer program implements the above method when executed by a processor.

[0104] The storage medium includes: Read-Only Memory (ROM), Random Access Memory (RAM), disk, USB flash drive, memory card or CD, etc., which can store program codes.

[0105] Any combination of one or more storage media may be used. The storage medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.

[0106] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0107] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0108] Computer program code for performing the operation of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, Smalltalk, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0109] In summary, the communication verification method, device and medium based on the combined encryption algorithm of the present invention perform combined encryption on the original data to be transmitted, thereby improving the security of data transmission, and after the encrypted transmission, the corresponding encryption verification method is selected according to the encryption method to effectively verify whether the transmitted encrypted data has been tampered with, thereby greatly improving the security of data communication and effectively preventing data from being tampered with without being discovered; therefore, the present invention effectively overcomes the various shortcomings of the prior art and has a high industrial utilization value.

[0110] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A communication verification method based on a combined encryption algorithm, It is characterized in that The following steps are involved: Obtaining an encrypted data group, wherein the encrypted data group is data obtained after the original data is combined and encrypted, and the encrypted data group includes an encrypted data packet, a verification digest, a verification sequence, and a dynamic key; After removing the verification summary, the verification sequence and the dynamic key, the encrypted data packet is grouped and split to obtain a plurality of split encrypted data groups; Extracting first summary data of each of the split encrypted data groups respectively, and combining multiple groups of the first summary data together to form second summary data; Decrypting each of the split encrypted data groups to obtain multiple split decrypted data groups, extracting header information from each of the split decrypted data groups, and arranging the header information in order to establish a header sequence; Comparing the second summary data with the verification summary to obtain first matching information, comparing the header sequence with the verification sequence to obtain second matching information, and matching the dynamic key with the dynamic encryption function to obtain third matching information; Verifying the first matching information, the second matching information and the third matching information, and after the verification is passed, sequentially integrating the multiple groups of split decrypted data groups to obtain the original data; Among them, the verification summary, the verification sequence and the dynamic key are all embedded in the encrypted data packet in a preset order, the encrypted data packet is obtained by at least two encryption methods, the verification sequence and the dynamic key are both extracted by the sending end device based on the original data, the verification summary is obtained by the sending end device extracting key data based on the encrypted data packet, and the key data includes middle position data and last position data.

2. The communication verification method based on the combined encryption algorithm according to claim 1, It is characterized in that The process of combining and encrypting the original data to obtain the encrypted data group includes: The sending end device obtains a first data length of the original data, generates a first random number according to the first data length, and selects a corresponding symmetric encryption algorithm according to the first random number and the data type to perform a first encryption to obtain first encrypted data; Obtaining an encryption key of the symmetric encryption algorithm and a second data length of the first encrypted data, generating a second random number according to the second data length and the type of the first encrypted data, and selecting an asymmetric encryption algorithm according to the encryption key and the second random number to encrypt the first encrypted data to obtain second encrypted data; Integrate the first random number and the second random number at both ends of the second encrypted data to obtain the encrypted data packet; The first random number and the second random number are different integers, and both the sending end device and the receiving end device store an algorithm database containing a plurality of symmetric encryption algorithms and asymmetric encryption algorithms.

3. The communication verification method based on the combined encryption algorithm according to claim 2, It is characterized in that The step of removing the verification summary, the verification sequence and the dynamic key and grouping and splitting the encrypted data packet to obtain a plurality of split encrypted data groups comprises: Remove the first random number and the second random number at both ends of the encrypted data packet, and calculate the absolute value of the difference between the first random number and the second random number; The second encrypted data is correspondingly divided into the same number of split encrypted data groups according to the numerical value of the absolute value of the difference.

4. The communication verification method based on the combined encryption algorithm according to claim 3, It is characterized in that The extracting the first summary data of each of the split encrypted data groups respectively, and combining multiple groups of the first summary data together to form the second summary data, comprises: respectively extracting key data of each of the split encrypted data groups as first summary data; The first summary data corresponding to each of the split encrypted data groups are integrated in the order of the split encrypted data groups to obtain the second summary data.

5. The communication verification method based on the combined encryption algorithm according to claim 3, It is characterized in that Decrypting each of the split encrypted data groups to obtain multiple split decrypted data groups, extracting header information from each of the split decrypted data groups, and arranging the header information in order to establish a header sequence; Obtaining a corresponding decryption algorithm in an algorithm database according to the first random number and the second random number, and decrypting each of the split encrypted data groups according to the decryption algorithm to obtain multiple split decrypted data groups; Extracting header information of each of the split decrypted data groups; The header information is sorted according to the original order of each of the split encrypted data groups to establish the header sequence.

6. The communication verification method based on the combined encryption algorithm according to claim 5, It is characterized in that The comparing the second summary data with the verification summary to obtain first matching information, comparing the header sequence with the verification sequence to obtain second matching information, and matching the dynamic key with the dynamic encryption function to obtain third matching information includes: calling the verification summary, and calculating the similarity between the second summary data and the verification summary to obtain the first matching information; calling the verification sequence, and calculating the similarity between the header sequence and the verification sequence to obtain the second matching information; The dynamic key is called and input into the dynamic encryption function to output an encryption sequence, and the third matching information is obtained by calculation according to a corresponding relationship between the encryption sequence and the first random number and the second random number.

7. The communication verification method based on the combined encryption algorithm according to claim 6, It is characterized in that The encryption sequence includes a combination of first comparison information, second comparison information and an encryption algorithm, the first comparison information corresponds to the first random number, and the second comparison information corresponds to the second random number.

8. The communication verification method based on the combined encryption algorithm according to claim 7, It is characterized in that The verifying of the first matching information, the second matching information and the third matching information, and after the verification is passed, sequentially integrating the multiple groups of split decrypted data groups to obtain the original data, comprises: After determining that the first matching information, the second matching information, and the third matching information all meet preset requirements, determining that the encryption verification is passed; The plurality of split decrypted data groups are sequentially integrated together according to a preset order to obtain the original data.

9. A communication verification device based on a combined encryption algorithm, It is characterized in that include: A data acquisition module acquires an encrypted encrypted data group, wherein the encrypted data group is data obtained after the original data is combined and encrypted, and the encrypted data group includes an encrypted data packet, a verification summary, a verification sequence, and a dynamic key; A splitting module, used for grouping and splitting the encrypted data packet to obtain a plurality of split encrypted data groups; A first extraction module, used for respectively extracting first summary data of each of the split encrypted data groups, and combining multiple groups of the first summary data together to form second summary data; A second extraction module is used to decrypt each of the split encrypted data groups to obtain multiple split decrypted data groups, extract header information from each of the split decrypted data groups, and arrange the header information in order to establish a header sequence; a calculation module, configured to compare the second summary data with the verification summary to obtain first matching information, compare the header sequence with the verification sequence to obtain second matching information, and match the dynamic key with the dynamic encryption function to obtain third matching information; A verification module, used for verifying the first matching information, the second matching information and the third matching information, and after the verification is passed, sequentially integrating the multiple groups of split decrypted data groups to obtain the original data; Among them, the verification summary, the verification sequence and the dynamic key are all embedded in the encrypted data packet in a preset order, the encrypted data packet is obtained by at least two encryption methods, the verification sequence and the dynamic key are both extracted by the sending end device based on the original data, the verification summary is obtained by the sending end device extracting key data based on the encrypted data packet, and the key data includes middle position data and last position data.

10. A storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Performing security functions on a message payload in a network element

    CN101088245A

  • Systems and methods for computer device authentication

    CN101114326A

  • Signature firmware verification method and device and computer readable medium

    CN114595460A

  • Firmware transmission authentication protection method and system based on national cryptographic algorithm

    CN116975875A

  • Hybrid encryption and decryption method and device for data integrity verification, equipment and medium

    CN118157946A