CN115037511A - Data processing method, device, equipment and medium - Google Patents

Data processing method, device, equipment and medium Download PDF

Info

Publication number
CN115037511A
CN115037511A CN202210454365.6A CN202210454365A CN115037511A CN 115037511 A CN115037511 A CN 115037511A CN 202210454365 A CN202210454365 A CN 202210454365A CN 115037511 A CN115037511 A CN 115037511A
Authority
CN
China
Prior art keywords
check code
encrypted
data
message
encryption
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210454365.6A
Other languages
Chinese (zh)
Inventor
孙操
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202210454365.6A priority Critical patent/CN115037511A/en
Publication of CN115037511A publication Critical patent/CN115037511A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

The application provides a data processing method, a data processing device, data processing equipment and a data processing medium, and relates to the technical field of data processing. The method comprises the following steps: acquiring a message to be encrypted; analyzing data to be encrypted and a first check code from the message to be encrypted; determining an encryption factor corresponding to the first check code according to the obtained mapping relation between the check code and the encryption factor; encrypting the data to be encrypted by using the encryption factor to obtain first ciphertext data; packaging the first ciphertext data and the first check code into a first encrypted message; and sending the first encrypted message. Therefore, the encryption of the data to be encrypted in the message to be encrypted is realized, and a physical transmission key is not required.

Description

Data processing method, device, equipment and medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data processing method, apparatus, device, and medium.
Background
The data transmitted in the network may be plaintext or ciphertext. Data directly transmitted by adopting a plaintext is directly obtained by others once being illegally obtained. For the security of transmission of sensitive data such as secret data, encryption technology is usually adopted to convert plaintext into ciphertext for network transmission. Common classes of encryption techniques include symmetric encryption, asymmetric encryption. Asymmetric encryption can achieve a stronger encryption effect, but is slower. Compared with an asymmetric encryption mode, the symmetric encryption mode has the advantages of high speed, small calculated amount, high encryption efficiency and the like, and is commonly used for encrypting a large amount of data. Symmetric encryption is an encryption technique in which both the sending and receiving sides of data use the same key for encryption and decryption.
The key point of symmetric encryption is the generation and distribution of keys, and the key distribution is mainly realized by physical transmission or by introducing a third party for key transmission. The limitation of the physical transfer key is strong, and the physical transfer key is not suitable for large-batch data transmission, while the process of the third-party key transfer is complex, and more resources are consumed due to the introduction of the third party.
Therefore, how to perform encrypted transmission of data without physically transferring a key is one of the considerable technical problems.
Disclosure of Invention
In view of the foregoing, the present application provides a data processing method, apparatus, device and medium for encrypted transmission of data without physical transfer of a key.
Specifically, the method is realized through the following technical scheme:
according to a first aspect of the present application, there is provided a data processing method comprising:
acquiring a message to be encrypted;
analyzing data to be encrypted and a first check code from the message to be encrypted;
determining an encryption factor corresponding to the first check code according to the obtained mapping relation between the check code and the encryption factor;
encrypting the data to be encrypted by using the encryption factor to obtain first ciphertext data;
packaging the first ciphertext data and the first check code into a first ciphertext;
and sending the first encrypted message.
Optionally, the data processing method provided in this embodiment further includes:
receiving a second encrypted message;
analyzing second ciphertext data and a second check code from the second encryption message;
determining a decryption factor corresponding to the second check code by using the acquired mapping relation between the check code and the decryption factor;
and decrypting the second ciphertext data by using the decryption factor to obtain decrypted data.
Optionally, the first check code is determined based on the data to be encrypted and a set polynomial.
Optionally, the mapping relationship between the check code and the encryption factor is obtained from a mapping relationship distribution center; and the mapping relation between the check code and the decryption factor is obtained from a mapping relation distribution center.
According to a second aspect of the present application, there is provided a data processing apparatus, including an obtaining module, configured to obtain a message to be encrypted;
the first analysis module is used for analyzing the data to be encrypted and the first check code from the message to be encrypted;
the first determining module is used for determining an encryption factor corresponding to the first check code according to the acquired mapping relation between the check code and the encryption factor;
the encryption module is used for encrypting the data to be encrypted by using the encryption factor to obtain first ciphertext data;
the encapsulation module is used for encapsulating the first ciphertext data and the first check code into a first encryption message;
and the sending module is used for sending the first encrypted message.
Optionally, the data processing apparatus provided in this embodiment further includes:
the receiving module is used for receiving the second encrypted message;
the second analysis module is used for analyzing second ciphertext data and a second check code from the second encrypted message;
the second determining module is used for determining a decryption factor corresponding to the second check code by using the acquired mapping relation between the check code and the decryption factor;
and the decryption module is used for decrypting the second ciphertext data by using the decryption factor to obtain decrypted data.
Optionally, the first check code is determined based on the data to be encrypted and a set polynomial.
Optionally, the mapping relationship between the check code and the encryption factor is obtained from a mapping relationship distribution center; and the mapping relation between the check code and the decryption factor is obtained from a mapping relation distribution center.
According to a third aspect of the present application, there is provided an electronic device, comprising a processor and a machine-readable storage medium, the machine-readable storage medium storing a computer program capable of being executed by the processor, the processor being caused by the computer program to perform the method provided by the first aspect of the embodiments of the present application.
According to a fourth aspect of the present application, there is provided a machine-readable storage medium storing a computer program which, when invoked and executed by a processor, causes the processor to perform the method provided by the first aspect of the embodiments of the present application.
The beneficial effects of the embodiment of the application are as follows:
according to the data processing method and device provided by the embodiment of the application, after the message to be encrypted is obtained, the data to be encrypted and a first check code are analyzed from the message to be encrypted; then determining an encryption factor corresponding to the first check code according to the obtained mapping relation between the check code and the encryption factor; encrypting the data to be encrypted by using the encryption factor to obtain first ciphertext data; and then packaging the first ciphertext data and the first check code into a first encryption message, and sending the first encryption message. Therefore, the encryption of the data to be encrypted in the message to be encrypted is realized, and a physical transmission key is not required; in addition, the encryption factor used for encrypting the data to be encrypted is obtained by utilizing the check code, so that the security of the encrypted data is ensured.
Drawings
Fig. 1 is a schematic flowchart of a data processing method provided in an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram of another data processing method provided in the embodiments of the present application;
FIG. 3 is a schematic diagram of data processing logic provided by an embodiment of the present application;
fig. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic hardware structure diagram of an electronic device implementing a data processing method according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with aspects such as the present application.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the corresponding listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The data processing method provided in the present application is explained in detail below.
Referring to fig. 1, fig. 1 is a flowchart of a data processing method provided in the present application, and is applied to a local electronic device, where the local electronic device may be, but is not limited to, a network device that needs to perform message encryption, and when the local electronic device implements the data processing method, the method may include the following steps:
s101, obtaining a message to be encrypted.
In this step, when the local-end electronic device needs to send a message to the outside, the message to be sent is obtained first, and in order to ensure the security of data in the message sending process, the encryption processing flow is executed on the message to be sent, that is, the message to be encrypted, and the following steps are referred to for description.
S102, analyzing the data to be encrypted and the first check code from the message to be encrypted.
In this step, in order to encrypt the load data in the message to be encrypted, which is also referred to as valid data, this embodiment proposes that the data to be encrypted is first parsed from the message to be encrypted, for example, the data to be encrypted may be the load data, and a check code in the message to be encrypted is also parsed and is marked as a first check code.
It should be noted that the "first" in the first check code does not have a practical meaning, but is only used for distinguishing the check code in the second encryption message to be referred to later.
S103, determining an encryption factor corresponding to the first check code according to the obtained mapping relation between the check code and the encryption factor.
In this step, the local electronic device obtains the mapping relationship between the check code and the encryption factor, and thus, after the first check code is analyzed from the message to be encrypted, the encryption factor corresponding to the first check code is determined based on the mapping relationship.
Optionally, the mapping relationship between the check code and the encryption factor is obtained from a mapping relationship distribution center.
Specifically, the local electronic device may actively obtain the mapping relationship from the mapping relationship distribution center in real time or periodically, or may wait to receive the mapping relationship issued by the mapping relationship distribution center.
In an embodiment, the mapping relationship may be a mapping relationship formed by specific values of the check code and the encryption factor, that is, the mapping relationship distribution center may configure the encryption factor for each check code in advance according to experience, and then write the mapping relationship between the check code and the encryption factor into the mapping relationship list and issue the mapping relationship to the local electronic device. Therefore, after the home terminal electronic equipment analyzes the first check code from the message to be encrypted, the home terminal electronic equipment can query the encryption factor corresponding to the first check code by utilizing the first check code to query the mapping relation list.
In another embodiment, since the check code itself is calculated based on the valid data in the message, and the check codes calculated based on different valid data are different, the mapping relation distribution center exhausts a large amount of workload required for each check code. For example, the mapping relation is B ═ g (a), where a is the check code, B is the encryption factor, and g () is the mapping function. Therefore, the mapping relation distribution center can issue the currently used mapping relation to the local-end electronic equipment, and then the local-end electronic equipment locally stores the mapping relation. Furthermore, after the local electronic device analyzes the first check code, the first check code can be used as a in the mapping relation, and then the encryption factor B is obtained through calculation, so that the encryption factor corresponding to the first check code is obtained. Therefore, not only the storage resource of the mapping relation distribution center is saved, but also the storage resource of the local electronic equipment for storing the mapping relation is saved. In addition, in this embodiment, the mapping relation is issued by the mapping relation distribution center, and unlike the way of transmitting the key by a third party in the prior art, only the encryption factor needs to be generated in the local electronic device, so that the security of the key is greatly improved, the security of encrypting the data to be encrypted by using the encryption factor is further improved, and the security of subsequently transmitting the encrypted data is ensured.
Alternatively, the mapping function may be implemented by, but is not limited to, a standard algorithm, such as the SHA-1 secure hash algorithm.
It should be noted that the mapping relationship may be dynamically updated, and when the mapping relationship is changed in the mapping relationship distribution center, the latest mapping relationship is issued to the local electronic device.
Optionally, the mapping relationship distribution center may send the mapping relationship in an encrypted form when issuing the mapping relationship to the local electronic device, specifically, the mapping relationship distribution center encrypts the mapping relationship, and then issues the encrypted mapping relationship to the local electronic device, so as to improve the security of the mapping relationship, and further improve the security of subsequently encrypting the data to be encrypted by using the encryption factor in the mapping relationship.
S104, encrypting the data to be encrypted by using the encryption factor to obtain first ciphertext data.
In this step, after the encryption factor is obtained based on step S103, the data to be encrypted may be encrypted by using the encryption factor, so that corresponding ciphertext data may be obtained and recorded as the first ciphertext data.
When encrypting data to be encrypted by using the encryption factor, an existing encryption algorithm, such as a symmetric or asymmetric encryption algorithm, may be used.
S105, packaging the first ciphertext data and the first check code into a first encryption message.
And S106, sending the first encrypted message.
In step S105 and step S106, in order to transmit the first ciphertext data to the peer end, the local electronic device encapsulates the first ciphertext data and the first check code according to a protocol between the local electronic device and the peer end device, so as to obtain the first encryption packet, so that the first encryption packet including the first ciphertext data may be sent to the peer end device.
Optionally, the first check code is determined based on the data to be encrypted and a set polynomial.
Specifically, the first check code may be a cyclic redundancy check code (CRC), on the basis that the CRC is related to a selected polynomial and data (to-be-encrypted data) itself, any one of the selected polynomial and the data is different, the obtained CRC check codes are different, the CRC check code of the to-be-encrypted data may be regarded as a random number, and in the case of a 4-byte check code, for example, there are more than 42 hundred million code values. The logical calculation of the CRC check code can be represented by:
A=f(n,k)
wherein, A is the obtained CRC code, n is the data to be encrypted, k is the selected polynomial, and f represents the logical processing relation of the modulo-2 division. Thus, the CRC check code for each data to be encrypted can be calculated based on the above formula.
By implementing the data processing method provided by the application, after the message to be encrypted is obtained, the data to be encrypted and the first check code are analyzed from the message to be encrypted; then determining an encryption factor corresponding to the first check code according to the obtained mapping relation between the check code and the encryption factor; encrypting the data to be encrypted by using the encryption factor to obtain first ciphertext data; and then packaging the first ciphertext data and the first check code into a first encryption message, and sending the first encryption message. Therefore, the encryption of the data to be encrypted in the message to be encrypted is realized, a physical transmission key is not required, and the encryption factor for encrypting the data to be encrypted is obtained by utilizing the check code, so that the security of the encrypted data is ensured.
Optionally, based on the foregoing embodiment, in this embodiment, the local electronic device may further receive an encrypted message sent by another electronic device, and on this basis, the local electronic device may implement a decryption process according to the process shown in fig. 2, including the following steps:
s201, receiving a second encrypted message.
In this step, after the electronic device at the opposite end performs encryption processing on the message that needs to be sent to the electronic device at the home end according to the flow shown in fig. 1, a second encrypted message is obtained, and then the second encrypted message is sent to the electronic device at the home end. That is, the opposite-end electronic device also stores the mapping relationship between the check code and the encryption factor, and the obtaining manner of the opposite-end electronic device may refer to the obtaining manner of the local-end electronic device, which is not described in detail herein.
S202, second cipher text data and a second check code are analyzed from the second encrypted message.
In this step, after receiving the second encrypted message, the home-end electronic device may parse the second ciphertext data and the second check code from the second encrypted message according to the format of the message.
S203, determining a decryption factor corresponding to the second check code by using the acquired mapping relationship between the check code and the decryption factor.
In this step, the local electronic device obtains a mapping relationship between the check code and the decryption factor after parsing the second check code and the second ciphertext data, and then determines the encryption factor corresponding to the second check code based on the mapping relationship.
Optionally, the mapping relationship between the check code and the decryption factor may also be obtained from a mapping relationship distribution center.
Specifically, the local electronic device may actively obtain the mapping relationship between the check code and the decryption factor from the mapping relationship distribution center in real time or periodically, or may wait to receive the mapping relationship issued by the mapping relationship distribution center.
In an embodiment, the mapping relationship may be a mapping relationship formed by specific values of the check code and the decryption factor, that is, the mapping relationship distribution center may configure the decryption factor for each check code in advance according to experience, and then write the mapping relationship between the check code and the decryption factor into the mapping relationship list and issue the mapping relationship to the local electronic device. Therefore, after the home terminal electronic device analyzes the second check code from the second encrypted message, the mapping relation list can be queried by using the second check code, so as to query the decryption factor corresponding to the second check code.
In another embodiment, since the check code itself is calculated based on the valid data in the message, and the check codes calculated based on different valid data are different, the mapping relation distribution center exhausts a large amount of workload required for each check code. For example, the mapping relation is B '═ h (a), where a is the check code, B' is the decryption factor, and h () is the mapping function. Therefore, the mapping relation distribution center can issue the currently used mapping relation to the local electronic equipment, and then the local electronic equipment locally stores the mapping relation. Furthermore, after the local electronic device analyzes the second check code, the second check code can be used as a in the mapping relation, and then the decryption factor B' is calculated, so that the decryption factor corresponding to the second check code is obtained. Therefore, not only the storage resource of the mapping relation distribution center is saved, but also the storage resource of the local electronic equipment for storing the mapping relation is saved. Moreover, in this embodiment, the mapping relation distribution center issues the mapping relation for decryption, and unlike the way of directly transmitting the key by a third party in the prior art, only the decryption factor needs to be generated in the local electronic device, so that the security of the key is greatly improved, and the security of decrypting data by using the decryption factor is further improved.
Alternatively, the mapping function may be implemented by, but not limited to, a standard algorithm, such as the SHA-1 secure hash algorithm, which corresponds to the mapping function used to generate the encryption factor.
It should be noted that the mapping relationship between the check code and the decryption factor may be dynamically updated, and when the mapping relationship is changed in the mapping relationship distribution center, the latest mapping relationship is issued to the local electronic device, so that the local electronic device synchronizes to the latest mapping relationship between the check code and the decryption factor.
Optionally, the mapping relationship distribution center may send the mapping relationship to the local electronic device in an encrypted form when issuing the mapping relationship to the local electronic device, and specifically, the mapping relationship distribution center encrypts the mapping relationship between the check code and the decryption factor, and then issues the encrypted mapping relationship to the local electronic device, so that the security of the mapping relationship is improved, and further, the security of subsequently decrypting data by using the decryption factor in the mapping relationship is improved.
S204, decrypting the second ciphertext data by using the decryption factor to obtain decrypted data.
In this step, after determining the decryption factor based on step S203, the local electronic device may perform decryption processing on the second ciphertext data by using the decryption factor, so as to obtain decrypted data, that is, effective data in the second ciphertext message, and may perform a subsequent process based on the effective data.
It should be noted that, the generation process of the second check code may refer to the generation process of the first check code, and is not described in detail here.
It should be noted that, after the local electronic device sends the first encrypted message to the outside, and after the opposite electronic device receives the first encrypted message, the opposite electronic device also stores the mapping relationship between the check code and the decryption factor, so that the opposite electronic device can execute a data decryption process according to the process shown in fig. 2, which is not described in detail herein. Moreover, the method for the opposite-end electronic device to obtain the mapping relationship between the check code and the decryption factor may refer to the obtaining manner of the local-end electronic device, and is not described in detail here.
For better understanding of the data processing method provided by the present application, the encryption and decryption processing logic shown in fig. 3 is taken as an example for description, and since the encryption algorithm adopted in fig. 3 is a symmetric encryption algorithm, the mapping relationship between the check code and the encryption factor and the mapping relationship between the check code and the decryption factor are the same. The mapping relationship distribution center will issue the dynamically established mapping relationship B ═ g (a) to the local electronic device and the opposite electronic device, optionally, the mapping relationship may be transferred in an encryption manner.
On this basis, when the local electronic device desires to send the valid data N, the valid data N and the selected polynomial are first input into a ═ f (N, k), so that the CRC check code a can be obtained, the local electronic device obtains the mapping relation B ═ g (a) distributed by the mapping relation distribution center from the local, then inputs the generated CRC check code a into B ═ g (a), so that the encryption factor B corresponding to the CRC check code a can be obtained, then the valid data N can be encrypted by using the encryption factor B, so that the ciphertext data N is obtained, and then the ciphertext data N and the CRC check code a are encapsulated in an encrypted message and sent to the opposite electronic device. After receiving the encrypted message, the opposite-end electronic device may parse a CRC check code a from the encrypted message, determine a decryption factor B corresponding to the CRC check code a based on a mapping relation formula B ═ g (a) locally obtained from a mapping relation distribution center, and then decrypt ciphertext data N in the encrypted message by using the decryption factor, thereby decrypting effective data N that the local-end electronic device is to send to the opposite-end electronic device. Therefore, the mapping relation is established by using the CRC technology commonly adopted in data transmission and the original CRC codes, the effective data is encrypted by using the encryption factors obtained after mapping, and then the effective data is transmitted, so that the encryption and the transmission of the effective data are completed. In addition, extra key generation processing is not added, the encryption factor and the decryption factor can be generated by directly utilizing the necessary CRC code value in the data transmission process, additional key data transmission is not needed, the process of additionally generating a large number of keys is avoided in the flow of large data transmission amount and frequent data sending processing, the equipment performance is saved, and meanwhile, a better encryption effect is generated by flexibly changing the mapping relation.
Based on the same inventive concept, the application also provides a data processing device corresponding to the data processing method. The data processing apparatus may be implemented by referring to the above description of the data processing method, which is not discussed herein.
Referring to fig. 4, fig. 4 is a data processing apparatus according to an exemplary embodiment of the present application, including:
an obtaining module 401, configured to obtain a message to be encrypted;
a first parsing module 402, configured to parse the to-be-encrypted data and the first check code from the to-be-encrypted packet;
a first determining module 403, configured to determine, according to an obtained mapping relationship between a check code and an encryption factor, an encryption factor corresponding to the first check code;
an encryption module 404, configured to encrypt the data to be encrypted by using the encryption factor to obtain first ciphertext data;
a packaging module 405, configured to package the first ciphertext data and the first check code into a first encrypted message;
a sending module 406, configured to send the first encrypted packet.
Optionally, based on the foregoing embodiment, the data processing apparatus provided in this embodiment further includes:
a receiving module (not shown in the figure) for receiving the second encrypted message;
a second parsing module (not shown in the figure), configured to parse the second ciphertext data and the second check code from the second encrypted message;
a second determining module (not shown in the figure), configured to determine, by using an obtained mapping relationship between the check code and the decryption factor, a decryption factor corresponding to the second check code;
and a decryption module (not shown in the figure) configured to decrypt the second ciphertext data by using the decryption factor to obtain decrypted data.
Optionally, based on any one of the above embodiments, the first check code in this embodiment is determined based on the data to be encrypted and a set polynomial.
Optionally, based on the foregoing embodiment, the mapping relationship between the check code and the encryption factor in this embodiment is obtained from a mapping relationship distribution center; and the mapping relation between the check code and the decryption factor is obtained from a mapping relation distribution center.
In the data processing apparatus provided in any embodiment of the present application, after a message to be encrypted is obtained, data to be encrypted and a first check code are analyzed from the message to be encrypted; then determining an encryption factor corresponding to the first check code according to the obtained mapping relation between the check code and the encryption factor; encrypting the data to be encrypted by using the encryption factor to obtain first ciphertext data; and then packaging the first ciphertext data and the first check code into a first encryption message, and sending the first encryption message. Therefore, the encryption of the data to be encrypted in the message to be encrypted is realized, a key does not need to be physically transmitted, and the encryption factor for encrypting the data to be encrypted is obtained by utilizing the check code, so that the security of the encrypted data is ensured.
Based on the same inventive concept, embodiments of the present application provide an electronic device, which may be, but is not limited to, the local terminal electronic device or the peer terminal electronic device. As shown in fig. 5, the electronic device includes a processor 501 and a machine-readable storage medium 502, where the machine-readable storage medium 502 stores a computer program capable of being executed by the processor 501, and the processor 501 is caused by the computer program to execute the data processing method provided in any embodiment of the present application. In addition, the electronic device further comprises a communication interface 503 and a communication bus 504, wherein the processor 501, the communication interface 503 and the machine-readable storage medium 502 are communicated with each other through the communication bus 504.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The machine-readable storage medium 502 may be a Memory, which may include a Random Access Memory (RAM), a DDR SRAM (Double Data Rate Synchronous Dynamic Random Access Memory), and a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
As for the embodiments of the electronic device and the machine-readable storage medium, since the contents of the related methods are substantially similar to those of the foregoing method embodiments, the description is relatively simple, and reference may be made to the partial description of the method embodiments for relevant points.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The implementation process of the functions and actions of each unit/module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the units/modules described as separate parts may or may not be physically separate, and the parts displayed as units/modules may or may not be physical units/modules, may be located in one place, or may be distributed on a plurality of network units/modules. Some or all of the units/modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A data processing method, comprising:
acquiring a message to be encrypted;
analyzing data to be encrypted and a first check code from the message to be encrypted;
determining an encryption factor corresponding to the first check code according to the obtained mapping relation between the check code and the encryption factor;
encrypting the data to be encrypted by using the encryption factor to obtain first ciphertext data;
packaging the first ciphertext data and the first check code into a first encrypted message;
and sending the first encrypted message.
2. The method of claim 1, further comprising:
receiving a second encrypted message;
analyzing second ciphertext data and a second check code from the second encryption message;
determining a decryption factor corresponding to the second check code by using the acquired mapping relation between the check code and the decryption factor;
and decrypting the second ciphertext data by using the decryption factor to obtain decrypted data.
3. The method of claim 1, wherein the first check code is determined based on the data to be encrypted and a set polynomial.
4. The method according to claim 2, wherein the mapping relationship between the check code and the encryption factor is obtained from a mapping relationship distribution center; and the mapping relation between the check code and the decryption factor is obtained from a mapping relation distribution center.
5. A data processing apparatus, comprising:
the acquisition module is used for acquiring a message to be encrypted;
the first analysis module is used for analyzing the data to be encrypted and the first check code from the message to be encrypted;
the first determining module is used for determining an encryption factor corresponding to the first check code according to the mapping relation between the acquired check code and the encryption factor;
the encryption module is used for encrypting the data to be encrypted by using the encryption factor to obtain first ciphertext data;
the encapsulation module is used for encapsulating the first ciphertext data and the first check code into a first encryption message;
and the sending module is used for sending the first encrypted message.
6. The apparatus of claim 5, further comprising:
the receiving module is used for receiving the second encrypted message;
the second analysis module is used for analyzing second ciphertext data and a second check code from the second encrypted message;
the second determining module is used for determining a decryption factor corresponding to the second check code by using the acquired mapping relation between the check code and the decryption factor;
and the decryption module is used for decrypting the second ciphertext data by using the decryption factor to obtain decrypted data.
7. The apparatus of claim 5, wherein the first check code is determined based on the data to be encrypted and a set polynomial.
8. The apparatus according to claim 6, wherein the mapping relationship between the check code and the encryption factor is obtained from a mapping relationship distribution center; and the mapping relation between the check code and the decryption factor is obtained from a mapping relation distribution center.
9. An electronic device comprising a processor and a machine-readable storage medium, the machine-readable storage medium storing a computer program executable by the processor, the processor being caused by the computer program to perform the method of any of claims 1-4.
10. A machine readable storage medium, having stored thereon a computer program which, when invoked and executed by a processor, causes the processor to perform the method of any of claims 1-4.
CN202210454365.6A 2022-04-27 2022-04-27 Data processing method, device, equipment and medium Pending CN115037511A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210454365.6A CN115037511A (en) 2022-04-27 2022-04-27 Data processing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210454365.6A CN115037511A (en) 2022-04-27 2022-04-27 Data processing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN115037511A true CN115037511A (en) 2022-09-09

Family

ID=83119476

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210454365.6A Pending CN115037511A (en) 2022-04-27 2022-04-27 Data processing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115037511A (en)

Similar Documents

Publication Publication Date Title
Hasan et al. Lightweight cryptographic algorithms for guessing attack protection in complex internet of things applications
Aljawarneh et al. A resource-efficient encryption algorithm for multimedia big data
CN110460439A (en) Information transferring method, device, client, server-side and storage medium
CN111131278B (en) Data processing method and device, computer storage medium and electronic equipment
US20160006570A1 (en) Generating a key derived from a cryptographic key using a physically unclonable function
EP3157225A1 (en) Encrypted ccnx
WO2021022794A1 (en) Rdma-based data transmission method, network card, server and medium
CN115516454B (en) Hardware security module and system
Szalachowski et al. CMAC, CCM and GCM/GMAC: Advanced modes of operation of symmetric block ciphers in wireless sensor networks
US6549622B1 (en) System and method for a fast hardware implementation of RC4
CN111639108A (en) Data query method and device, electronic equipment and computer readable storage medium
CN111464564A (en) Data high-speed encryption and decryption method and device based on symmetric cryptographic algorithm
WO2016068942A1 (en) Encryption for transactions in a memory fabric
CN113452527A (en) Robust state synchronization for stateful hash-based signatures
CN112948867A (en) Method and device for generating and decrypting encrypted message and electronic equipment
KR20220000537A (en) System and method for transmitting and receiving data based on vehicle network
JP7229778B2 (en) Key management system and method
CN112947967B (en) Software updating method, blockchain application store and software uploading terminal
CN114172719A (en) Encryption and decryption method, device, equipment and computer readable storage medium
KR101812311B1 (en) User terminal and data sharing method of user terminal based on attributed re-encryption
CN116614266A (en) Data transmission method, device, equipment and storage medium
CN115225258B (en) Block chain-based cross-domain trusted data security management method and system
CN104301102A (en) Widget communication method, device and system
CN116527358A (en) Time sensitive access control method and device based on CP-ABE edge calculation
Ooi et al. A flexible and reliable internet-of-things solution for real-time production tracking with high performance and secure communication

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination