+

CN118158021B - A data transmission processing method and system based on Glink bus protocol - Google Patents

A data transmission processing method and system based on Glink bus protocol Download PDF

Info

Publication number
CN118158021B
CN118158021B CN202410440513.8A CN202410440513A CN118158021B CN 118158021 B CN118158021 B CN 118158021B CN 202410440513 A CN202410440513 A CN 202410440513A CN 118158021 B CN118158021 B CN 118158021B
Authority
CN
China
Prior art keywords
message
masks
data
masked
data messages
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.)
Active
Application number
CN202410440513.8A
Other languages
Chinese (zh)
Other versions
CN118158021A (en
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.)
Tianjin Ruisheng Electronic Technology Co ltd
Original Assignee
Tianjin Ruisheng Electronic Technology 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 Tianjin Ruisheng Electronic Technology Co ltd filed Critical Tianjin Ruisheng Electronic Technology Co ltd
Priority to CN202410440513.8A priority Critical patent/CN118158021B/en
Publication of CN118158021A publication Critical patent/CN118158021A/en
Application granted granted Critical
Publication of CN118158021B publication Critical patent/CN118158021B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • 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
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请提供一种基于Glink总线协议的数据传输处理方法及系统。其中,确定基于Glink总线协议下待发送的多个数据消息;针对每个所述数据消息,获取随机生成多个第一掩码以及通过预先设置的固定规则生成多个第二掩码;通过所述多个第一掩码和所述多个第二掩码,对每个所述数据消息进行掩盖,以生成掩盖消息;将掩盖消息进行加密后得到加密消息,并将所述加密消息发送至接收端,以供接收端对所述加密消息进行解密后得到掩盖消息,并通过所述多个第一掩码和所述多个第二掩码,对所述掩盖消息进行解码,以得到多个数据消息。本申请提供的技术方案能够提升数据传输过程的安全性。

The present application provides a data transmission processing method and system based on the Glink bus protocol. Among them, multiple data messages to be sent based on the Glink bus protocol are determined; for each of the data messages, multiple first masks are randomly generated and multiple second masks are generated by pre-set fixed rules; each of the data messages is masked by the multiple first masks and the multiple second masks to generate a masked message; the masked message is encrypted to obtain an encrypted message, and the encrypted message is sent to the receiving end, so that the receiving end can decrypt the encrypted message to obtain the masked message, and the masked message is decoded by the multiple first masks and the multiple second masks to obtain multiple data messages. The technical solution provided by the present application can improve the security of the data transmission process.

Description

Data transmission processing method and system based on Glink bus protocol
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a data transmission processing method and system based on Glink bus protocol.
Background
Glink bus protocol is a protocol for data transmission and is commonly used in embedded systems and communication devices. The protocol defines the transmission format, transmission rules and processing steps of the data to achieve reliable data communication.
Currently, in the process of data transmission using Glink bus protocol, symmetric encryption algorithm is generally used to ensure the security of data. The symmetric encryption algorithm uses the same key to encrypt and decrypt the data, so as to ensure that the data is not accessed or tampered by unauthorized personnel in the transmission process.
While symmetric encryption algorithms can provide a degree of data security, such schemes also present a risk of being hacked. Since the symmetric encryption algorithm uses the same key for encryption and decryption, once the key is compromised, the security of the data is compromised. Therefore, in order to further enhance the security of data transmission, new data transmission processing schemes are required, such as introducing more complex encryption algorithms, using multi-layer encryption techniques, or employing quantum cryptography to secure data.
Disclosure of Invention
The embodiment of the application provides a data transmission processing method and system based on Glink bus protocol, which are used for solving the problem of poor data transmission security in the prior art.
In a first aspect, an embodiment of the present application provides a data transmission processing method based on Glink bus protocol, which is applied to a transmitting end, and includes:
determining a plurality of data messages to be sent under Glink bus protocol;
For each data message, acquiring a plurality of first masks which are randomly generated and a plurality of second masks which are generated through preset fixed rules;
Masking each of the data messages by the plurality of first masks and the plurality of second masks to generate a masked message;
And encrypting the masked message to obtain an encrypted message, and sending the encrypted message to a receiving end so that the receiving end can decrypt the encrypted message to obtain the masked message, and decoding the masked message through the plurality of first masks and the plurality of second masks to obtain a plurality of data messages.
Optionally, the generating a plurality of second masks through a preset fixed rule includes:
randomly generating a first key and a second key, and initializing an confusion matrix;
Splitting each data message into a plurality of message blocks, and encrypting the message blocks by using the first key aiming at each message block to obtain a first encryption result;
Encrypting the first encryption result by using the second key to obtain a second encryption result;
applying a hash function to the second encryption result to obtain a hash value corresponding to each message block;
And performing exclusive OR operation on the hash values corresponding to the acquired message blocks and the confusion matrix to obtain a plurality of second masks.
Optionally, said masking each of said data messages by said plurality of first masks and said plurality of second masks to generate a masked message, including:
splitting each data message into a plurality of message blocks;
determining the generation time and the sending time of each data message;
Calculating a masking parameter of each data message corresponding to each message block by performing exclusive OR operation on the plurality of first masks, the generation time and the sending time of each data message according to a preset calculation mode, wherein the masking parameter is used for masking the data message;
according to the dividing sequence of the message blocks of each data message, respectively carrying out an alternative exclusive-or operation on the masking parameter of each data message corresponding to each message block, carrying out an exclusive-or operation on alternative exclusive-or operation results of a plurality of data messages, and calculating a first intermediate masking message;
Performing a cyclic left shift operation on the first intermediate masking message by a first preset bit number, performing a cyclic left shift operation on the plurality of second masks by a first preset bit number, and performing an exclusive or operation on a left shift result of the first intermediate masking message and a left shift result of the plurality of second masks to obtain a second intermediate masking message;
Performing cyclic left shift operation on the plurality of first masks by a second preset bit number, and performing exclusive OR operation on the left shift results of the plurality of first masks and the second intermediate masking message to obtain a third intermediate masking message;
And performing cyclic left shift operation on the plurality of second masks by a first preset bit number, and performing exclusive or transportation on the left shift results of the plurality of second masks and the third intermediate masking message to obtain the masking message.
Optionally, the plurality of data messages comprises m1, m2, & mn;
Each of the data messages mi is split into k message blocks, a plurality of message blocks including mi1, mi2,.. mik, where i=1, 2,..n;
the plurality of first masks includes p1, p2, pn;
the plurality of second masks includes S1, S2,;
The generation time of each data message comprises mi_t1, and the transmission time comprises mi_t2;
The calculating the masking parameter of each data message corresponding to each message block by performing exclusive-or operation on the plurality of first masks, the generation time and the sending time of each data message according to a preset calculation mode includes:
For each message block of each of the data messages, the data message is stored by the formula: mij= (mij = (mij + pi + mi_t1+ mi_t2) mod 2), and calculating masking parameters of each data message corresponding to each message block by performing exclusive-or operation on the plurality of first masks, the generation time and the transmission time of each data message according to a preset calculation mode;
where i=1, 2,..n, j=1, 2,..k.
Optionally, according to the dividing sequence of the message blocks of each data message, performing an alternate exclusive-or operation on the masking parameter of each data message corresponding to each message block, and performing an exclusive-or operation on the results of the alternate exclusive-or operation on a plurality of data messages, to calculate a first intermediate masking message, including:
By the formula: result1=m11.m21 @ m21 @ m12 @ mn 1@ m22 @ mn 2@ m1k @ m2k @ mnk, performing an alternate exclusive-or operation on the masking parameters of each data message corresponding to each message block according to the division order of the message blocks of each data message, and performing an exclusive-or operation on the results of the alternate exclusive-or operation on the plurality of data messages to calculate a first intermediate masking message.
Wherein result1 is denoted as a first intermediate masked message, m11, m21, mn1 represents a plurality of data messages m1, m2, mn, a first message block of mn, m12, m22, mn2 represents a plurality of data messages m1, m2, mn, a second message block of mn, m1k, m2k, mnk represents a plurality of data messages m1, m2, mn.
Optionally, the operation of circularly shifting the first intermediate masking message by a first preset number of bits left, the operation of circularly shifting the plurality of second masks by a first preset number of bits left, and the exclusive-or operation of the left shift result of the first intermediate masking message and the left shift result of the plurality of second masks, to obtain a second intermediate masking message, include:
By the formula: result 2= ((result 1< < w) ((S2 < < w) >) No.,) mod2n, with the first intermediate masking message being left-shifted by a first preset number of bits, the plurality of second masks being circularly left-shifted by a first preset number of bits, and the left-shifted result of the first intermediate masking message and the left-shifted result of the plurality of second masks being exclusive-ored to obtain a second intermediate masking message;
Wherein result2 is represented as a second intermediate masking message, and w is represented as a left shift by a first preset number of bits;
Performing cyclic left shift operation on the plurality of first masks by a second preset bit number, and performing exclusive or operation on the left shift results of the plurality of first masks and the second intermediate masking message to obtain a third intermediate masking message;
By the formula: the result 3=result 2 # (p 1< < (w+1)) # (p 2< < (w+1)) # (pn < (w+1)), performing cyclic left shift operation on the plurality of first masks by a first preset number of bits, and performing exclusive or operation on left shift results of the plurality of first masks and the second intermediate masking message to obtain a third intermediate masking message;
Wherein result3 is represented as a third intermediate mask message, (w+1) is represented as a left shift by a second preset number of bits;
The operation of circularly shifting the plurality of second masks left by a first preset bit number, and performing exclusive or transportation on the left shift results of the plurality of second masks and the third intermediate masking message to obtain a masking message, including:
By the formula: final _ result=result 3 _ (s1 < < w) ((S2 < < w) > a @ is a @ and @ is a (Sn < < w)), the plurality of second masks are subjected to a cyclic left-shift operation by a first preset number of bits, exclusive or transportation is carried out on the left shift results of the plurality of second masks and the third intermediate masking message, so that a masking message is obtained;
Wherein final_result is denoted as mask message, and w is denoted as left-shifted by a first preset number of bits.
Optionally, the plurality of first masks includes at least: a random binary number or a random string.
In a second aspect, an embodiment of the present application provides a data transmission processing system based on Glink bus protocol, including:
a determining module, configured to determine a plurality of data messages to be sent under Glink bus protocol;
An acquisition module, configured to acquire, for each of the data messages, a plurality of first masks generated randomly and a plurality of second masks generated by a preset fixed rule;
A generating module, configured to mask each of the data messages by using the plurality of first masks and the plurality of second masks, so as to generate a masked message;
And the sending module is used for encrypting the masked message to obtain an encrypted message, sending the encrypted message to the receiving end, enabling the receiving end to decrypt the encrypted message to obtain the masked message, and decoding the masked message through the plurality of first masks and the plurality of second masks to obtain a plurality of data messages.
In a third aspect, embodiments of the present application provide a computing device, comprising a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are configured to be invoked and executed by the processing component to implement the Glink bus protocol-based data transfer processing method according to the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer storage medium storing a computer program, where the computer program when executed by a computer implements a data transmission processing method based on Glink bus protocol as described in the first aspect
In the embodiment of the application, a plurality of data messages to be sent under Glink bus protocol are determined; for each data message, acquiring a plurality of first masks which are randomly generated and a plurality of second masks which are generated through preset fixed rules; masking each of the data messages by the plurality of first masks and the plurality of second masks to generate a masked message; and encrypting the masked message to obtain an encrypted message, and sending the encrypted message to a receiving end so that the receiving end can decrypt the encrypted message to obtain the masked message, and decoding the masked message through the plurality of first masks and the plurality of second masks to obtain a plurality of data messages.
The Glink bus protocol-based data transmission processing method has the beneficial effects that:
And (3) improving data security: by masking and encrypting each data message, the security of the data in the transmission process can be effectively protected. The generation rules of the first mask and the second mask are preset, so that the mask message has confusion, and the risk of unauthorized access or tampering of data is reduced.
Data privacy enhancement: the first mask generated randomly and the second mask generated through the fixed rule can be used for carrying out confusion processing on the data, so that the privacy of the data is improved. The original data information can be obtained only after decryption and decoding by the receiving end, so that the privacy of the data is effectively protected.
Data transmission reliability is improved: through the transmission of the encrypted message, the possibility that the data is interfered or destroyed in the transmission process can be effectively reduced, and the reliability of the data transmission is improved.
Data transmission efficiency optimization: through processing steps such as covering, encrypting and decoding, redundant information in the data transmission process can be effectively reduced, and the efficiency and speed of data transmission are improved.
In general, the method combines Glink bus protocol and masking and encrypting technologies, improves the safety, privacy, reliability and efficiency of data transmission, and is suitable for scenes with higher requirements on the safety of data transmission.
These and other aspects of the application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an embodiment of a data transmission processing method based on Glink bus protocol according to an embodiment of the present application;
FIG. 2 is a flowchart of another embodiment of a data transmission process based on Glink bus protocol according to one embodiment of the present application;
Fig. 3 is a schematic structural diagram of a data transmission processing system based on Glink bus protocol according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a computing device according to an embodiment of the present application.
Detailed Description
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present application with reference to the accompanying drawings.
In some of the flows described in the specification and claims of the present application and in the foregoing figures, a plurality of operations occurring in a particular order are included, but it should be understood that the operations may be performed out of order or performed in parallel, with the order of operations such as 101, 102, etc., being merely used to distinguish between the various operations, the order of the operations themselves not representing any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
The Glink bus protocol-based data transmission processing method provided by the embodiment of the application is applicable to the following applicable scenes:
Confidential data transmission: when confidential data transmission such as personal identification information, financial data and the like is involved, the security and privacy of the data can be effectively protected by adopting the method, and the data is prevented from being revealed and unauthorized access is prevented.
Data transmission between communication devices: when data transmission is carried out between communication devices, the reliability and the safety of the data transmission can be improved by adopting the method, and the data is ensured not to be tampered or lost in the transmission process.
Data transmission of the Internet of things: in the application of the Internet of things, data transmission and communication are needed between devices, and the method can encrypt and protect the transmitted data, prevent the data from being illegally accessed or tampered, and ensure the safety of the Internet of things system.
Financial transaction data transmission: for transaction data transmission in the financial industry, such as online payment, bank transfer and the like, the method can improve the safety and reliability of data transmission and protect financial information of a user from being stolen or tampered.
And (3) transmitting data in enterprises: in the data transmission and communication in enterprises, the method can protect the security of sensitive data and prevent data leakage and confidential information from being leaked to competitors.
In general, the data transmission processing method based on Glink bus protocol is suitable for the scene of needing to protect the data security and privacy, and has wide application prospect especially in the fields and industries with higher requirements on the data transmission security.
The invention researches find that at present, in the process of using Glink bus protocol to transmit data, a symmetric encryption algorithm is generally used to ensure the security of the data. The symmetric encryption algorithm uses the same key to encrypt and decrypt the data, so as to ensure that the data is not accessed or tampered by unauthorized personnel in the transmission process.
While symmetric encryption algorithms can provide a degree of data security, such schemes also present a risk of being hacked. Since the symmetric encryption algorithm uses the same key for encryption and decryption, once the key is compromised, the security of the data is compromised. Therefore, in order to further enhance the security of data transmission, new data transmission processing schemes are required, such as introducing more complex encryption algorithms, using multi-layer encryption techniques, or employing quantum cryptography to secure data.
In view of this, an embodiment of the present application provides a data transmission processing method based on Glink bus protocol, where the method is applied to a transmitting end, and the method includes: determining a plurality of data messages to be sent under Glink bus protocol; for each data message, acquiring a plurality of first masks which are randomly generated and a plurality of second masks which are generated through preset fixed rules; masking each of the data messages by the plurality of first masks and the plurality of second masks to generate a masked message; and encrypting the masked message to obtain an encrypted message, and sending the encrypted message to a receiving end so that the receiving end can decrypt the encrypted message to obtain the masked message, and decoding the masked message through the plurality of first masks and the plurality of second masks to obtain a plurality of data messages.
The method combines Glink bus protocol and masking and encrypting technologies, improves the safety, privacy, reliability and efficiency of data transmission, and is suitable for scenes with higher requirements on the safety of data transmission.
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
Fig. 1 is a flowchart of a data transmission processing method based on Glink bus protocol according to an embodiment of the present application, where the method is applied to a transmitting end as shown in fig. 1;
The method comprises the following steps:
s11, determining a plurality of data messages to be sent under Glink bus protocol;
In this step, a plurality of data messages to be sent under Glink bus protocol are determined: it is first necessary to determine a plurality of data messages, including information such as data content, data format, data size, etc., that need to be transmitted via Glink bus protocols. The data messages may be any information that needs to be transmitted and communicated.
In the embodiment of the present application, it is assumed that there is a system that needs to be transmitted through Glink bus protocols, where three data messages need to be sent: message 1 contains temperature sensor data, message 2 contains humidity sensor data, and message 3 contains illumination sensor data. The three data messages respectively include information of sensor type, sensor value, etc.
The data message is encoded and encapsulated as specified by Glink protocol: each data message is encoded and packaged according to the Glink protocol, including adding masking, encryption and other processes, so as to ensure the security and integrity of the data. Meanwhile, the encapsulation needs to be carried out according to the Glink bus protocol format, including information such as frame header, frame tail, check bit and the like.
The three data messages are encoded and encapsulated according to the Glink protocol, mask and encryption are added, and meanwhile encapsulation is carried out according to the Glink bus protocol format, wherein the information comprises that the frame head is 0xAA, the frame tail is 0xBB, the check bit is CRC check and the like.
Sending the encapsulated data message to Glink bus: the coded, encrypted and encapsulated data message is sent to Glink bus, and transmitted to the receiving end through bus, so as to ensure reliable transmission and reception of data.
And the three data messages processed and packaged by Glink protocol are respectively sent to Glink buses, and are transmitted to a receiving end through the buses, and the receiving end can decode, decrypt and analyze the data messages to obtain the sensor data information.
Through the steps, transmission and communication of a plurality of data messages to be sent under Glink bus protocol can be realized. The method can ensure the safety, the integrity and the reliability of the data and has wide application prospect in practical application.
S12, for each data message, acquiring a plurality of first masks which are randomly generated and a plurality of second masks which are generated through a preset fixed rule;
in this step, a plurality of first masks randomly generated are acquired: for each data message, a plurality of different first masks need to be generated. The first mask may be a randomly generated binary number or a random string for encrypting and confusing the data message, increasing the security and confidentiality of the data.
Generating a plurality of second masks through preset fixed rules: in addition to the randomly generated first mask, a plurality of second masks are also required to be generated according to preset fixed rules, wherein the second masks can be generated according to the fixed rules and used for encrypting and protecting the data message to ensure the integrity and the correctness of the data, and the fixed rules can be set according to requirements.
In the embodiment of the present application, for the aforementioned three data messages, a plurality of first masks and a plurality of second masks are generated, respectively.
Data message 1 (temperature sensor data):
a first mask: randomly generated binary numbers: 11001100;
A second mask: binary numbers generated by preset rules: 10101010;
data message 2 (humidity sensor data):
a first mask: randomly generated character strings: "abc123";
a second mask: character strings generated by preset rules: "xyz456";
data message 3 (light sensor data):
a first mask: randomly generated binary numbers: 10101010;
a second mask: binary numbers generated by preset rules: 11001100;
Through the above embodiment, a plurality of first masks and a plurality of second masks can be generated for each data message, and are used for encrypting and protecting the data, so that the safety and the integrity of the data are ensured. Thus, the security in the data transmission process can be enhanced, and the data is prevented from being accessed or tampered without authorization.
S13, masking each data message through the plurality of first masks and the plurality of second masks to generate a masking message;
in this step, the data message is masked by a plurality of first masks and a plurality of second masks: in this step, the first masks and the second masks generated previously are applied to the corresponding data messages, and the data are masked. This process may include exclusive-or, encryption, or other obfuscation of the data to generate a masked message.
Generating a masking message: and integrating the masked data message with the corresponding first mask and the second mask to generate a final masked message. The masking message contains encrypted, obfuscated data, and masking information for decrypting and restoring the data.
In the embodiment of the application, each data message is subjected to masking processing according to the first mask and the second mask which are generated before, so as to generate a masking message.
Data message 1 (temperature sensor data):
a first mask: 11001100;
a second mask: 10101010;
Temperature sensor data: 25 ℃;
masking treatment: and performing exclusive OR operation on the temperature sensor data and the first mask, and then performing encryption processing on the temperature sensor data and the second mask to generate a masked message.
Data message 2 (humidity sensor data):
a first mask: abc123;
a second mask: xyz456;
humidity sensor data: 50%;
Masking treatment: and encrypting the humidity sensor data with the first mask, and performing exclusive OR operation with the second mask to generate a masked message.
Data message 3 (light sensor data):
a first mask: 10101010;
a second mask: 11001100;
Illumination sensor data: 800lux;
masking treatment: and performing exclusive OR operation and encryption processing on the illumination sensor data and the first mask, and performing confusion processing on the illumination sensor data and the second mask to generate a masked message.
By the above embodiment, masking processing is performed by applying a plurality of first masks and a plurality of second masks to each data message, and a masked message is generated. Therefore, the security and confidentiality of the data can be enhanced, and the data is ensured not to be stolen or tampered in the transmission process.
S14, encrypting the masked message to obtain an encrypted message, and sending the encrypted message to a receiving end.
In this step, the mask message that has been generated is subjected to encryption processing to generate an encrypted message, and the encrypted message is transmitted to the receiving end. The receiving end can decrypt the received encrypted message to obtain an original covering message, then decode the covering message according to the first masks and the second masks, and finally obtain the original information of the data messages.
Encrypting the masked message: the generated masked message is encrypted using an encryption algorithm to generate an encrypted message. The encryption can adopt a symmetrical encryption algorithm or an asymmetrical encryption algorithm, so that the security of the data in the transmission process is ensured.
Sending the encrypted message to the receiving end: and sending the encrypted message to the receiving end so that the receiving end receives and decrypts the encrypted message.
The receiving end decrypts the encrypted message: after receiving the encrypted message, the receiving end uses a corresponding decryption algorithm to decrypt the encrypted message to obtain the original masked message.
Decoding the masked message: and decoding the decrypted masked message according to the first masks and the second masks to restore the original information of the data messages.
In the embodiment of the present application, it is assumed that a mask message has been generated and is the following example data:
masking message 1: the encrypted_message_1;
Masking message 2: the encrypted_message_2;
Masking message 3: the encrypted_message_3;
encrypting the masked message:
Encrypting masked message 1, generating encrypted message 1: the encrypted_message_1_encrypted;
Encrypting masked message 2, generating encrypted message 2: the encrypted_message_2_encrypted;
encrypting the masked message 3, generating an encrypted message 3: the encrypted_message_3_encrypted;
And sending the encrypted message to the receiving end.
The receiving end decrypts the encrypted message:
The receiving end receives the encrypted message 1, the encrypted message 2 and the encrypted message 3 and respectively carries out decryption operation.
Decoding the masked message:
and decoding the decrypted masked message according to the first masks and the second masks to obtain the original information of the data messages.
Through the embodiment, the process of encrypting the masked message and then sending the encrypted masked message to the receiving end, decrypting the encrypted masked message by the receiving end and then decoding the decrypted encrypted masked message to obtain the original data message can be realized, and the safety and the integrity of data transmission are ensured.
Optionally, in the embodiment of the present application, the process of acquiring "the plurality of second masks generated by the preset fixed rule" in S12 may include:
s121, randomly generating a first key and a second key, and initializing an confusion matrix;
in this step, for example, two keys are randomly generated: a first key K1 and a second key K2, and initializes the confusion matrix M.
S122, splitting each data message into a plurality of message blocks, and encrypting the message blocks by using the first key aiming at each message block to obtain a first encryption result;
In this step, the plurality of data messages includes m1, m2, & mn; each of the data messages mi is split into k message blocks, a plurality of message blocks including mi1, mi2,.. mik, where i=1, 2,..n;
For example, for each message block m11, m12, m1K of the data message m1, the message blocks m11, m12, m1K are each symmetrically encrypted (e.g. advanced encryption standard algorithm (Advanced Encryption Standard, AES)) using the first key K1, resulting in a first encryption result.
S123, encrypting the first encryption result by using the second key to obtain a second encryption result;
in this step, the first encryption result is encrypted using a second key K2 by an asymmetric encryption algorithm, such as a public key cryptosystem algorithm (RIVEST SHAMIR ADLEMAN, RSA), to obtain a second encryption result.
S124, applying a hash function to the second encryption result to obtain a hash value corresponding to each message block;
In this step, a hash function (e.g., SHA-256) is applied to the second encryption result corresponding to each message block to obtain hash values H1 to Hn, respectively.
Wherein the hash function (e.g., SHA-256) is an algorithm that converts input data of arbitrary length into a fixed-length hash value. By applying a hash function to the second encryption result for each message block separately, a corresponding hash value can be generated, which helps to ensure the integrity and security of the message. The hash value may be used to verify whether the message was tampered with and to check for errors or data corruption during data transmission.
S125, performing exclusive OR operation on the hash values corresponding to the acquired message blocks and the confusion matrix to obtain a plurality of second masks.
In this step, H1 to Hn are exclusive-ored with the confusion matrix M, respectively, to obtain a plurality of second masks S1 to Sn, that is, s1=h1 #, s2=h2 #, and sn=hn.
Optionally, in the embodiment of the present application, the process of "masking each data message by the plurality of first masks and the plurality of second masks to generate a masked message" in S13 specifically includes the following steps, as shown in fig. 2:
S131, splitting each data message into a plurality of message blocks;
In this step, the plurality of data messages includes m1, m2, & mn; each of the data messages mi is split into k message blocks, a plurality of message blocks including mi1, mi2,.. mik, where i=1, 2,..n;
Wherein the plurality of first masks includes p1, p2, pn; the plurality of second masks includes S1, S2,;
S132, determining the generation time and the sending time of each data message;
in this step, the generation time of each of the data messages includes mi_t1, and the transmission time includes mi_t2;
S133, calculating a masking parameter of each data message corresponding to each message block by performing exclusive OR operation on the plurality of first masks, the generation time and the sending time of each data message according to a preset calculation mode, wherein the masking parameter is used for masking the data message;
Specifically, for each message block of each of the data messages, the following formula is used: mij= (mij = (mij + pi + mi_t1+ mi_t2) mod 2), and calculating masking parameters of each data message corresponding to each message block by performing exclusive-or operation on the plurality of first masks, the generation time and the transmission time of each data message according to a preset calculation mode;
where i=1, 2,..n, j=1, 2,..k.
For example: assuming that there are two data messages m1 and m2, each data message is split into 3 message blocks, i.e. k=3. Meanwhile, each data message has a corresponding first mask p1 and p2, and the generation time and the transmission time are m1_t1, m1_t2, m2_t1, and m2_t2, respectively.
Now we do exclusive or operation according to the preset calculation mode, and calculate the masking parameter of each data message corresponding to each message block. Assuming that the preset calculation mode is an exclusive or operation:
for the first message block m11 of the data message m1:
m11=(m11⊕p1)+((m11+p1+m1_t1+m1_t2)mod2);
for the second message block m12 of the data message m1:
m12=(m12⊕p1)+((m12+p1+m1_t1+m1_t2)mod2);
for the third message block m13 of the data message m1:
m13=(m13⊕p1)+((m13+p1+m1_t1+m1_t2)mod2);
for the first message block m21 of the data message m2:
m21=(m21⊕p2)+((m21+p2+m2_t1+m2_t2)mod2);
for the second message block m22 of the data message m2:
m22=(m22⊕p2)+((m22+p2+m2_t1+m2_t2)mod2);
for the third message block m23 of data message m2:
m23=(m23⊕p2)+((m23+p2+m2_t1+m2_t2)mod2);
Through the calculation, the masking parameter of each data message corresponding to each message block can be obtained and used for masking the data message so as to enhance the safety and the integrity of the data.
S134, according to the dividing sequence of the message blocks of each data message, respectively performing an alternative exclusive OR operation on the masking parameter of each data message corresponding to each message block, and performing an exclusive OR operation on the alternative exclusive OR operation results of a plurality of data messages to calculate a first intermediate masking message;
Specifically, by the formula: result1=m11.m21 @ m21 @ m12 @ mn 1@ m22 @ mn 2@ m1k @ m2k @ mnk, performing an alternate exclusive-or operation on the masking parameters of each data message corresponding to each message block according to the division order of the message blocks of each data message, and performing an exclusive-or operation on the results of the alternate exclusive-or operation on the plurality of data messages to calculate a first intermediate masking message.
Wherein result1 is denoted as a first intermediate masked message, m11, m21, mn1 represents a plurality of data messages m1, m2, mn, a first message block of mn, m12, m22, mn2 represents a plurality of data messages m1, m2, mn, a second message block of mn, m1k, m2k, mnk represents a plurality of data messages m1, m2, mn.
For example: assuming that there are two data messages m1 and m2, each data message is split into 3 message blocks, i.e. k=3. We have now calculated the masking parameters for each data message for each message block, i.e. m11, m12, m13, m21, m22, m23.
According to the dividing sequence of the message blocks of each data message, performing an alternate exclusive OR operation, and performing an exclusive OR operation on the alternate exclusive OR operation results of a plurality of data messages to calculate a first intermediate masking message result1: result1 = m11, m21 @ m12 @ m22 @ m13 @ m23;
the following masking parameter values are assumed to be known:
m11=1011;
m21=1100;
m12=0101;
m22=1110;
m13=0010;
m23=1001;
and performing an alternating exclusive OR operation:
result1=1011⊕1100⊕0101⊕1110⊕0010⊕1001
result1=0110⊕1011⊕1110⊕1001
result1=0011⊕0110⊕1001
result1=1101⊕1001
result1=0100
Therefore, according to the above embodiment, the calculation result of the first intermediate mask message result1 is 0100. This result will be used for subsequent data message masking operations.
S135, performing a cyclic left shift operation on the first intermediate masking message by a first preset bit number, performing a cyclic left shift operation on the plurality of second masks by the first preset bit number, and performing an exclusive OR operation on a left shift result of the first intermediate masking message and a left shift result of the plurality of second masks to obtain a second intermediate masking message;
Specifically, by the formula: result 2= ((result 1< < w) ((S2 < < w) >) No.,) mod2n, with the first intermediate masking message being left-shifted by a first preset number of bits, the plurality of second masks being circularly left-shifted by a first preset number of bits, and the left-shifted result of the first intermediate masking message and the left-shifted result of the plurality of second masks being exclusive-ored to obtain a second intermediate masking message;
Wherein result2 is represented as a second intermediate masking message, and w is represented as a left shift by a first preset number of bits;
for example: let the first intermediate mask message result1 be 0100 and the preset left shift number w be 1. Meanwhile, there are three second masks S1, S2, S3, and a left shift operation is required.
First, the first intermediate masking message result1 is circularly shifted left by a first preset number of bits:
result1 shift left by 1 bit = 1000;
next, each second mask is circularly shifted left by a first preset number of bits:
S1 shift left by 1 bit=1101;
s2 shift left by 1 bit=0011;
S3 shift left by 1 bit=1010;
finally, exclusive OR operation is carried out on the left shift result of the first intermediate masking message and the left shift results of the plurality of second masks, so as to obtain a second intermediate masking message result2:
result 2= ((result 1 left shift by 1 bit) ((S2 left shift by 1 bit) ((S3 left shift by 1 bit)) mod 2-3)
result2=(1000⊕1101⊕0011⊕1010)mod8
result2=1100mod8
result2=4
Thus, according to the above embodiment, the calculation result of the second intermediate mask message result2 is 4. This result will be used for subsequent data message masking operations.
S136, performing cyclic left shift operation on the plurality of first masks by a second preset bit number, and performing exclusive OR operation on left shift results of the plurality of first masks and the second intermediate masking message to obtain a third intermediate masking message;
Specifically, by the formula: the result 3=result 2 # (p 1< < (w+1)) # (p 2< < (w+1)) # (pn < (w+1)), performing cyclic left shift operation on the plurality of first masks by a first preset number of bits, and performing exclusive or operation on left shift results of the plurality of first masks and the second intermediate masking message to obtain a third intermediate masking message;
Wherein result3 is represented as a third intermediate mask message, (w+1) is represented as a left shift by a second preset number of bits;
for example: assuming that the second intermediate mask message result2 is 4, the preset left shift number w is 1. Meanwhile, there are three first mask parameters p1, p2, p3, which require a left shift operation, and the second preset number of bits is 1.
First, performing a cyclic left shift operation on each first masking parameter by a second preset number of bits:
p1 left shift by 2 bits = 1010;
p2 left shift by 2 bits = 0110;
p3 shift left by 2 bits = 1101;
then, exclusive OR operation is carried out on the left shift result of each first masking parameter and the second intermediate masking message result2, so as to obtain a third intermediate masking message result3:
result 3= (result 2) x (p 1 left shift 2 bits) (p 2 left shift 2 bits) (p 3 left shift 2 bits)
result3=4⊕1010⊕0110⊕1101
result3=0000⊕1010⊕0110⊕1101
result3=0001⊕0110⊕1101
result3=1110⊕1101
result3=0011
Thus, according to the above embodiment, the calculation result of the third intermediate mask message result3 is 0011. This result will be used for subsequent data message masking operations.
It should be noted that in the Glink protocol, the shift w+1 bit and the shift w bit have respective roles and differences, and are not merely set according to the requirements.
The main purpose of shifting the w+1 bits is to increase the confusion and security of the data. The data is circularly shifted left by k+1 bits and then is exclusive-or operated with the mask, so that the data and the mask are more confused, and the confidentiality of the data is improved. Meanwhile, as the mask is shifted one bit more left than the data, more complex operation results can be generated, and the difficulty of an attacker in cracking the data is increased.
Moving w bits relatively reduces the confusion and security of the data. Although the bit order of the data may still be changed, the result of exclusive-or operation with the mask may be relatively easy to restore or analyze. Thus, to enhance the security and confidentiality of data, the Glink protocol selects the operation of shifting w+1 bits.
Therefore, the selection of the shift w+1 bits (+2, +n, etc. may be added according to the requirement in practical application), and the shift w bits are not only set according to the requirement, but also in consideration of increasing the confusion and confidentiality of the data, so as to improve the security of the data. By such operation, the data can be more difficult to crack or analyze, thereby effectively protecting the privacy and safety of the data.
S137, performing cyclic left shift operation on the plurality of second masks by a first preset bit number, and performing exclusive or transportation on the left shift results of the plurality of second masks and the third intermediate masking message to obtain the masking message.
Specifically, by the formula: final _ result=result 3 _ (s1 < < w) ((S2 < < w) > a @ is a @ and @ is a (Sn < < w)), the plurality of second masks are subjected to a cyclic left-shift operation by a first preset number of bits, exclusive or transportation is carried out on the left shift results of the plurality of second masks and the third intermediate masking message, so that a masking message is obtained;
Wherein final_result is denoted as mask message, and w is denoted as left-shifted by a first preset number of bits.
For example: let the third intermediate mask message result3 be 0011 and the preset left shift number w be 2. Meanwhile, there are three second masks S1, S2, S3, a left shift operation is required, and the first preset number of bits is 2.
First, each second mask is circularly left-shifted by a first preset number of bits:
S1 shift left by 2 bits=1011;
s2 shift left by 2 bits = 0110;
s3 shift left by 2 bits = 1100;
then, exclusive OR operation is carried out on the left shift result of each second mask and the third intermediate masking message result3, so as to obtain a final masking message final_result:
final_result= (result 3) ((S1 left-shifted by 2 bits)/(S2 left-shifted by 2 bits)/(S3 left-shifted by 2 bits)) and (S1 left-shifted by 2 bits)
final_result=0011⊕1011⊕0110⊕1100
final_result=1000⊕0110⊕1100
final_result=1110⊕1100
final_result=0010
Thus, according to the above embodiment, the calculation result of the final mask message final_result is 0010. This result indicates that the masked message calculation step in the Glink protocol is complete.
Based on the above S131 to S137, an effect of data encryption and confusion can be achieved. By performing multiple masking, left shifting, and exclusive-or operations on the data, the security and hackability of the data can be increased.
The specific effects include:
Data confusion: the original data can be converted into the mixed data subjected to multiple encryption processing through multiple masking and exclusive-or operations, so that the complexity and the unintelligible property of the data are increased.
Data encryption: the data are encrypted through the left shift and exclusive OR operation, so that an unauthorized user cannot easily read the original data content, and the confidentiality of the data is improved.
Data protection: through steps S133-S137 in Glink protocol, data can be encrypted and covered in multiple layers, so that the safety of the data is improved, and the risk of data theft or tampering is reduced.
In general, based on the implementation of the steps, the efficient encryption, confusion and protection of the data can be realized, and the security and privacy protection in the data transmission process are enhanced
Fig. 3 is a schematic structural diagram of a data transmission processing system based on Glink bus protocol according to an embodiment of the present application, where, as shown in fig. 3, the system includes:
A determining module 31, configured to determine a plurality of data messages to be sent under Glink bus protocol;
An acquisition module 32, configured to acquire, for each of the data messages, a plurality of first masks generated randomly and a plurality of second masks generated by a preset fixed rule;
A generating module 33, configured to mask each of the data messages by using the first masks and the second masks, so as to generate a masked message;
and the sending module 34 is configured to encrypt the masked message to obtain an encrypted message, send the encrypted message to the receiving end, so that the receiving end decrypts the encrypted message to obtain the masked message, and decode the masked message through the plurality of first masks and the plurality of second masks to obtain a plurality of data messages.
Optionally, in the embodiment of the present application, the obtaining module 32 is specifically configured to split each data message into a plurality of message blocks, and encrypt, for each message block, the message block with the first key to obtain a first encryption result; encrypting the first encryption result by using the second key to obtain a second encryption result; applying a hash function to the second encryption result to obtain a hash value corresponding to each message block; and performing exclusive OR operation on the hash values corresponding to the acquired message blocks and the confusion matrix to obtain a plurality of second masks.
Optionally, in the embodiment of the present application, the generating module 33 is specifically configured to split each of the data messages into a plurality of message blocks; determining the generation time and the sending time of each data message; calculating a masking parameter of each data message corresponding to each message block by performing exclusive OR operation on the plurality of first masks, the generation time and the sending time of each data message according to a preset calculation mode, wherein the masking parameter is used for masking the data message; according to the dividing sequence of the message blocks of each data message, respectively carrying out an alternative exclusive-or operation on the masking parameter of each data message corresponding to each message block, carrying out an exclusive-or operation on alternative exclusive-or operation results of a plurality of data messages, and calculating a first intermediate masking message; performing a cyclic left shift operation on the first intermediate masking message by a first preset bit number, performing a cyclic left shift operation on the plurality of second masks by a first preset bit number, and performing an exclusive or operation on a left shift result of the first intermediate masking message and a left shift result of the plurality of second masks to obtain a second intermediate masking message; performing cyclic left shift operation on the plurality of first masks by a second preset bit number, and performing exclusive OR operation on the left shift results of the plurality of first masks and the second intermediate masking message to obtain a third intermediate masking message; and performing cyclic left shift operation on the plurality of second masks by a first preset bit number, and performing exclusive or transportation on the left shift results of the plurality of second masks and the third intermediate masking message to obtain the masking message.
Optionally, in an embodiment of the present application, the plurality of data messages includes m1, m2, & mn;
Each of the data messages mi is split into k message blocks, a plurality of message blocks including mi1, mi2,.. mik, where i=1, 2,..n;
the plurality of first masks includes p1, p2, pn;
the plurality of second masks includes S1, S2,;
The generation time of each data message comprises mi_t1, and the transmission time comprises mi_t2;
The generating module 33 is specifically configured to, for each message block of each data message, apply the following formula: mij= (mij = (mij + pi + mi_t1+ mi_t2) mod 2), and calculating masking parameters of each data message corresponding to each message block by performing exclusive-or operation on the plurality of first masks, the generation time and the transmission time of each data message according to a preset calculation mode;
where i=1, 2,..n, j=1, 2,..k.
Optionally, in an embodiment of the present application, the generating module 33 is specifically configured to use the formula: result1=m11.m21 @ m21 @ m12 @ mn 1@ m22 @ mn 2@ m1k @ m2k @ mnk, performing an alternate exclusive-or operation on the masking parameters of each data message corresponding to each message block according to the division order of the message blocks of each data message, and performing an exclusive-or operation on the results of the alternate exclusive-or operation on the plurality of data messages to calculate a first intermediate masking message.
Wherein result1 is denoted as a first intermediate masked message, m11, m21, mn1 represents a plurality of data messages m1, m2, mn, a first message block of mn, m12, m22, mn2 represents a plurality of data messages m1, m2, mn, a second message block of mn, m1k, m2k, mnk represents a plurality of data messages m1, m2, mn.
Optionally, in an embodiment of the present application, the generating module 33 is specifically configured to use the formula: result 2= ((result 1< < w) ((S2 < < w) >) No.,) mod2n, with the first intermediate masking message being left-shifted by a first preset number of bits, the plurality of second masks being circularly left-shifted by a first preset number of bits, and the left-shifted result of the first intermediate masking message and the left-shifted result of the plurality of second masks being exclusive-ored to obtain a second intermediate masking message;
Wherein result2 is represented as a second intermediate masking message, and w is represented as a left shift by a first preset number of bits;
Optionally, in an embodiment of the present application, the generating module 33 is specifically configured to use the formula: the result 3=result 2# (p 1< < (w+1)) # (p 2< < (w+1)) # (pn < (w+1)), performing cyclic left shift operation on the plurality of first masks by a first preset number of bits, and performing exclusive or operation on left shift results of the plurality of first masks and the second intermediate masking message to obtain a third intermediate masking message;
Wherein result3 is represented as a third intermediate mask message, (w+1) is represented as a left shift by a second preset number of bits;
Optionally, in an embodiment of the present application, the generating module 33 is specifically configured to use the formula: final _ result=result 3 _ (s1 < < w) ((S2 < < w) > a @ is a @ and @ is a (Sn < < w)), the plurality of second masks are subjected to a cyclic left-shift operation by a first preset number of bits, exclusive or transportation is carried out on the left shift results of the plurality of second masks and the third intermediate masking message, so that a masking message is obtained;
Wherein final_result is denoted as mask message, and w is denoted as left-shifted by a first preset number of bits.
Optionally, in an embodiment of the present application, the plurality of first masks includes at least: a random binary number or a random string.
The data transmission processing system based on Glink bus protocol described in fig. 3 may execute the data transmission processing method based on Glink bus protocol described in the embodiment shown in fig. 1, and its principle and technical effects are not repeated. The specific manner in which the respective modules and units perform the operations in the data transmission processing system based on Glink bus protocol in the above embodiment has been described in detail in the embodiment related to the method, and will not be described in detail here.
In one possible design, the Glink bus protocol-based data transfer processing system of the embodiment shown in FIG. 3 may be implemented as a computing device, which may include a storage component 41 and a processing component 42, as shown in FIG. 4;
The storage component 41 stores one or more computer instructions for execution by the processing component 42.
The processing component 42 is configured to: determining a plurality of data messages to be sent under Glink bus protocol; for each data message, acquiring a plurality of first masks which are randomly generated and a plurality of second masks which are generated through preset fixed rules; masking each of the data messages by the plurality of first masks and the plurality of second masks to generate a masked message; and encrypting the masked message to obtain an encrypted message, and sending the encrypted message to a receiving end so that the receiving end can decrypt the encrypted message to obtain the masked message, and decoding the masked message through the plurality of first masks and the plurality of second masks to obtain a plurality of data messages.
Wherein the processing component 42 may include one or more processors to execute computer instructions to perform all or part of the steps of the methods described above. Of course, the processing component may also be implemented as one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic elements for executing the methods described above.
The storage component 41 is configured to store various types of data to support operations at the terminal. The memory component may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
Of course, the computing device may necessarily include other components, such as input/output interfaces, communication components, and the like.
The input/output interface provides an interface between the processing component and a peripheral interface module, which may be an output device, an input device, etc.
The communication component is configured to facilitate wired or wireless communication between the computing device and other devices, and the like.
The computing device may be a physical device or an elastic computing host provided by the cloud computing platform, and at this time, the computing device may be a cloud server, and the processing component, the storage component, and the like may be a base server resource rented or purchased from the cloud computing platform.
The embodiment of the application also provides a computer storage medium, which stores a computer program, and the computer program can realize the data transmission processing method based on Glink bus protocol in the embodiment shown in fig. 1 when being executed by a computer.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (9)

1.一种基于Glink总线协议的数据传输处理方法,其特征在于,应用于发送端,包括:1. A data transmission processing method based on the Glink bus protocol, characterized in that it is applied to a sending end and includes: 确定基于Glink总线协议下待发送的多个数据消息;Determine multiple data messages to be sent based on the Glink bus protocol; 针对每个所述数据消息,获取随机生成多个第一掩码以及通过预先设置的固定规则生成多个第二掩码;For each of the data messages, a plurality of first masks are randomly generated and a plurality of second masks are generated according to a preset fixed rule; 通过所述多个第一掩码和所述多个第二掩码,对每个所述数据消息进行掩盖,以生成掩盖消息;Masking each of the data messages using the plurality of first masks and the plurality of second masks to generate a masked message; 将掩盖消息进行加密后得到加密消息,并将所述加密消息发送至接收端,以供接收端对所述加密消息进行解密后得到掩盖消息,并通过所述多个第一掩码和所述多个第二掩码,对所述掩盖消息进行解码,以得到多个数据消息;Encrypting the masked message to obtain an encrypted message, and sending the encrypted message to a receiving end, so that the receiving end decrypts the encrypted message to obtain the masked message, and decodes the masked message by using the multiple first masks and the multiple second masks to obtain multiple data messages; 所述通过预先设置的固定规则生成多个第二掩码,包括:The generating of a plurality of second masks by using a preset fixed rule comprises: 随机生成第一密钥和第二密钥,并初始化混淆矩阵;Randomly generate the first key and the second key, and initialize the confusion matrix; 将每个所述数据消息拆分为多个消息块,并针对每个所述消息块,使用所述第一密钥对所述消息块进行加密,得到第一加密结果;Splitting each of the data messages into a plurality of message blocks, and encrypting each of the message blocks using the first key to obtain a first encryption result; 使用所述第二密钥对所述第一加密结果进行加密,得到第二加密结果;Encrypt the first encryption result using the second key to obtain a second encryption result; 对所述第二加密结果应用散列函数,得到每个所述消息块对应的哈希值;Applying a hash function to the second encryption result to obtain a hash value corresponding to each of the message blocks; 分别将获取的多个所述消息块对应的哈希值与所述混淆矩阵进行异或运算,得到多个第二掩码。The obtained hash values corresponding to the plurality of message blocks are respectively subjected to an XOR operation with the confusion matrix to obtain a plurality of second masks. 2.根据权利要求1所述的方法,其特征在于,所述通过所述多个第一掩码和所述多个第二掩码,对每个所述数据消息进行掩盖,以生成掩盖消息,包括:2. The method according to claim 1, wherein the step of masking each of the data messages by using the plurality of first masks and the plurality of second masks to generate a masked message comprises: 分别将每个所述数据消息拆分成多个消息块;Splitting each of the data messages into a plurality of message blocks respectively; 确定每个所述数据消息的生成时间及发送时间;Determining the generation time and sending time of each of the data messages; 通过对所述多个第一掩码、每个所述数据消息的生成时间及发送时间进行按照预设计算方式进行异或运算,计算出每个所述数据消息对应每个所述消息块的掩盖参数,所述掩盖参数用于对所述数据消息进行掩盖;By performing an XOR operation on the multiple first masks, the generation time and the sending time of each of the data messages according to a preset calculation method, a masking parameter of each of the data messages corresponding to each of the message blocks is calculated, and the masking parameter is used to mask the data message; 按照每个所述数据消息的消息块的划分顺序,分别对每个数据消息对应每个所述消息块的掩盖参数进行交替异或运算,并将多个数据消息的交替异或运算结果进行异或运算,计算出第一中间掩盖消息;According to the division order of the message blocks of each data message, respectively, performing an alternate XOR operation on the masking parameters of each data message corresponding to each message block, and performing an XOR operation on the alternate XOR operation results of multiple data messages to calculate a first intermediate masking message; 将所述第一中间掩盖消息进行循环左移第一预设位数的操作,将所述多个第二掩码进行循环左移第一预设位数的操作,并对所述第一中间掩盖消息的左移结果以及所述多个第二掩码的左移结果进行异或运算,得到第二中间掩盖消息;Circularly shifting the first intermediate mask message to the left by a first preset number of bits, circularly shifting the plurality of second masks to the left by a first preset number of bits, and performing an XOR operation on the left-shifted result of the first intermediate mask message and the left-shifted result of the plurality of second masks to obtain a second intermediate mask message; 将所述多个第一掩码进行循环左移第二预设位数的操作,并将所述多个第一掩码的左移结果与所述第二中间掩盖消息进行异或运算,得到第三中间掩盖消息;cyclically shifting the plurality of first masks left by a second preset number of bits, and performing an XOR operation on the left-shift results of the plurality of first masks and the second intermediate masked message to obtain a third intermediate masked message; 将所述多个第二掩码进行循环左移第一预设位数的操作,并将所述多个第二掩码的左移结果与所述第三中间掩盖消息进行异或运输,得到掩盖消息。The plurality of second masks are cyclically shifted left by a first preset number of bits, and the left shift results of the plurality of second masks are XOR-transferred with the third intermediate masked message to obtain a masked message. 3.根据权利要求2所述的方法,其特征在于,多个数据消息包括m1,m2,...,mn;3. The method according to claim 2, characterized in that the plurality of data messages include m1, m2, ..., mn; 每个所述数据消息mi被拆分为k个消息块,多个消息块包括mi1,mi2,...,mik,其中,i=1,2,...,n;Each of the data messages mi is split into k message blocks, the plurality of message blocks comprising mi1, mi2, ..., mik, wherein i=1, 2, ..., n; 所述多个第一掩码包括p1,p2,...,pn;The plurality of first masks include p1, p2, ..., pn; 所述多个第二掩码包括S1,S2,...,Sn;The plurality of second masks include S1, S2, ..., Sn; 每个所述数据消息的生成时间包括mi_t1、发送时间包括mi_t2;The generation time of each data message includes mi_t1, and the sending time includes mi_t2; 所述通过对所述多个第一掩码、每个所述数据消息的生成时间及发送时间进行按照预设计算方式进行异或运算,计算出每个所述数据消息对应每个所述消息块的掩盖参数,包括:The method of calculating a masking parameter of each message block corresponding to each data message by performing an XOR operation on the multiple first masks, the generation time and the sending time of each data message according to a preset calculation method includes: 针对每个所述数据消息的每个消息块,通过公式:mij=(mij⊕pi)+((mij+pi+mi_t1+mi_t2)mod2),通过对所述多个第一掩码、每个所述数据消息的生成时间及发送时间进行按照预设计算方式进行异或运算,计算出每个所述数据消息对应每个所述消息块的掩盖参数;For each message block of each of the data messages, the formula: mij=(mij⊕pi)+((mij+pi+mi_t1+mi_t2)mod2) is used to calculate the masking parameter of each of the data messages corresponding to each of the message blocks by performing an XOR operation on the multiple first masks, the generation time and the sending time of each of the data messages according to a preset calculation method; 其中,i=1,2,...,n,j=1,2,...,k。Among them, i=1,2,...,n,j=1,2,...,k. 4.根据权利要求3所述的方法,其特征在于,所述按照每个所述数据消息的消息块的划分顺序,分别对每个数据消息对应每个所述消息块的掩盖参数进行交替异或运算,并将多个数据消息的交替异或运算结果进行异或操作,计算出第一中间掩盖消息,包括:4. The method according to claim 3, characterized in that the step of performing an alternate XOR operation on the mask parameters of each message block corresponding to each data message according to the division order of the message blocks of each data message, and performing an XOR operation on the alternate XOR operation results of multiple data messages to calculate the first intermediate mask message comprises: 通过公式:result1=m11⊕m21⊕...⊕mn1⊕m12⊕m22⊕...⊕mn2⊕...⊕m1k⊕m2k⊕...⊕mnk,按照每个所述数据消息的消息块的划分顺序,分别对每个数据消息对应每个所述消息块的掩盖参数进行交替异或运算,并将多个数据消息的交替异或运算结果进行异或运算,计算出第一中间掩盖消息;By formula: result1=m11⊕m21⊕...⊕mn1⊕m12⊕m22⊕...⊕mn2⊕...⊕m1k⊕m2k⊕...⊕mnk, according to the division order of the message blocks of each data message, the mask parameters of each data message corresponding to each message block are subjected to alternating XOR operation respectively, and the alternating XOR operation results of multiple data messages are subjected to XOR operation to calculate the first intermediate mask message; 其中,result1表示为第一中间掩盖消息,m11,m21,...,mn1代表多个数据消息m1,m2,...,mn的第一个消息块,m12,m22,...,mn2代表多个数据消息m1,m2,...,mn的第二个消息块,m1k,m2k,...,mnk代表多个数据消息m1,m2,...,mn的第k个消息块。Among them, result1 represents the first intermediate cover message, m11, m21, ..., mn1 represent the first message block of multiple data messages m1, m2, ..., mn, m12, m22, ..., mn2 represent the second message block of multiple data messages m1, m2, ..., mn, and m1k, m2k, ..., mnk represent the kth message block of multiple data messages m1, m2, ..., mn. 5.根据权利要求4所述的方法,其特征在于,所述将所述第一中间掩盖消息进行循环左移第一预设位数的操作,将所述多个第二掩码进行循环左移第一预设位数的操作,并对所述第一中间掩盖消息的左移结果以及所述多个第二掩码的左移结果进行异或运算,得到第二中间掩盖消息,包括:5. The method according to claim 4, characterized in that the step of cyclically shifting the first intermediate mask message by a first preset number of bits, cyclically shifting the plurality of second masks by a first preset number of bits, and performing an XOR operation on the left shift result of the first intermediate mask message and the left shift result of the plurality of second masks to obtain the second intermediate mask message comprises: 通过公式:result2=((result1<<w)⊕(S1<<w)⊕(S2<<w)⊕...⊕(Sn<<w)) mod2n,将所述第一中间掩盖消息进行左移第一预设位数的操作,将所述多个第二掩码进行循环左移第一预设位数的操作,并对所述第一中间掩盖消息的左移结果以及所述多个第二掩码的左移结果进行异或运算,得到第二中间掩盖消息;By using the formula: result2=((result1<<w)⊕(S1<<w)⊕(S2<<w)⊕...⊕(Sn<<w)) mod2 n , the first intermediate mask message is left-shifted by a first preset number of bits, the plurality of second masks are cyclically left-shifted by a first preset number of bits, and an XOR operation is performed on the left-shift result of the first intermediate mask message and the left-shift result of the plurality of second masks to obtain a second intermediate mask message; 其中,result2表示为第二中间掩盖消息,w表示为左移第一预设位数;Wherein, result2 represents the second intermediate masked message, and w represents the first preset number of bits shifted left; 所述将所述多个第一掩码进行循环左移第二预设位数的操作,并将所述多个第一掩码的左移结果与所述第二中间掩盖消息进行异或运算,得到第三中间掩盖消息;The operation of cyclically left-shifting the plurality of first masks by a second preset number of bits, and performing an XOR operation on the left-shift results of the plurality of first masks and the second intermediate masked message to obtain a third intermediate masked message; 通过公式:result3=result2⊕(p1<<(w+1))⊕(p2<<(w+1))⊕...⊕(pn<<(w+1)),将所述多个第一掩码进行循环左移第二预设位数的操作,并将所述多个第一掩码的左移结果与所述第二中间掩盖消息进行异或运算,得到第三中间掩盖消息;By using the formula: result3=result2⊕(p1<<(w+1))⊕(p2<<(w+1))⊕...⊕(pn<<(w+1)), the plurality of first masks are cyclically shifted left by a second preset number of bits, and an XOR operation is performed on the left shift results of the plurality of first masks and the second intermediate mask message to obtain a third intermediate mask message; 其中,result3表示为第三中间掩盖消息,(w+1)表示为左移第二预设位数;Wherein, result3 represents the third intermediate masked message, and (w+1) represents the second preset number of bits shifted left; 所述将所述多个第二掩码进行循环左移第一预设位数的操作,并将所述多个第二掩码的左移结果与所述第三中间掩盖消息进行异或运输,得到掩盖消息,包括:The operation of cyclically left-shifting the plurality of second masks by a first preset number of bits, and performing an XOR operation on the left-shift results of the plurality of second masks and the third intermediate masked message to obtain the masked message includes: 通过公式:final_result=result3⊕((S1<<w)⊕(S2<<w)⊕...⊕(Sn<<w)),将所述多个第二掩码进行循环左移第一预设位数的操作,并将所述多个第二掩码的左移结果与所述第三中间掩盖消息进行异或运输,得到掩盖消息;By using the formula: final_result=result3⊕((S1<<w)⊕(S2<<w)⊕...⊕(Sn<<w)), the plurality of second masks are cyclically shifted left by a first preset number of bits, and the left shift results of the plurality of second masks are XOR-transferred with the third intermediate masked message to obtain a masked message; 其中,final_result表示为掩盖消息,w表示为左移第一预设位数。Among them, final_result represents the masked message, and w represents the left shift by the first preset number of bits. 6.根据权利要求1~5任一项所述的方法,其特征在于,所述多个第一掩码至少包括:随机二进制数或者随机字符串。6 . The method according to claim 1 , wherein the plurality of first masks at least include: a random binary number or a random character string. 7.一种基于Glink总线协议的数据传输处理系统,其特征在于,包括:7. A data transmission processing system based on the Glink bus protocol, characterized by comprising: 确定模块,用于确定基于Glink总线协议下待发送的多个数据消息;A determination module, used to determine multiple data messages to be sent based on the Glink bus protocol; 获取模块,用于针对每个所述数据消息,获取随机生成多个第一掩码以及通过预先设置的固定规则生成多个第二掩码;An acquisition module, used for acquiring, for each of the data messages, a plurality of first masks generated randomly and a plurality of second masks generated by a preset fixed rule; 生成模块,用于通过所述多个第一掩码和所述多个第二掩码,对每个所述数据消息进行掩盖,以生成掩盖消息;A generating module, configured to mask each of the data messages by using the plurality of first masks and the plurality of second masks to generate a masked message; 发送模块,用于将掩盖消息进行加密后得到加密消息,并将所述加密消息发送至接收端,以供接收端对所述加密消息进行解密后得到掩盖消息,并通过所述多个第一掩码和所述多个第二掩码,对所述掩盖消息进行解码,以得到多个数据消息;A sending module, configured to encrypt the masked message to obtain an encrypted message, and send the encrypted message to a receiving end, so that the receiving end decrypts the encrypted message to obtain the masked message, and decodes the masked message through the multiple first masks and the multiple second masks to obtain multiple data messages; 所述获取模块具体用于随机生成第一密钥和第二密钥,并初始化混淆矩阵;将每个所述数据消息拆分为多个消息块,并针对每个所述消息块,使用所述第一密钥对所述消息块进行加密,得到第一加密结果;使用所述第二密钥对所述第一加密结果进行加密,得到第二加密结果;对所述第二加密结果应用散列函数,得到每个所述消息块对应的哈希值;分别将获取的多个所述消息块对应的哈希值与所述混淆矩阵进行异或运算,得到多个第二掩码。The acquisition module is specifically used to randomly generate a first key and a second key, and initialize a confusion matrix; split each of the data messages into multiple message blocks, and for each of the message blocks, use the first key to encrypt the message block to obtain a first encryption result; use the second key to encrypt the first encryption result to obtain a second encryption result; apply a hash function to the second encryption result to obtain a hash value corresponding to each of the message blocks; and perform an XOR operation on the hash values corresponding to the multiple message blocks obtained and the confusion matrix respectively to obtain multiple second masks. 8.一种计算设备,其特征在于,包括处理组件以及存储组件;所述存储组件存储一个或多个计算机指令;所述一个或多个计算机指令用以被所述处理组件调用执行,实现如权利要求1~6任一项所述的基于Glink总线协议的数据传输处理方法。8. A computing device, characterized in that it includes a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the data transmission processing method based on the Glink bus protocol as described in any one of claims 1 to 6. 9.一种计算机存储介质,其特征在于,存储有计算机程序,所述计算程序被计算机执行时,实现如权利要求1~6任一项所述的基于Glink总线协议的数据传输处理方法。9. A computer storage medium, characterized in that a computer program is stored therein, and when the computer program is executed by a computer, the data transmission processing method based on the Glink bus protocol as described in any one of claims 1 to 6 is implemented.
CN202410440513.8A 2024-04-12 2024-04-12 A data transmission processing method and system based on Glink bus protocol Active CN118158021B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410440513.8A CN118158021B (en) 2024-04-12 2024-04-12 A data transmission processing method and system based on Glink bus protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410440513.8A CN118158021B (en) 2024-04-12 2024-04-12 A data transmission processing method and system based on Glink bus protocol

Publications (2)

Publication Number Publication Date
CN118158021A CN118158021A (en) 2024-06-07
CN118158021B true CN118158021B (en) 2024-11-12

Family

ID=91294891

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410440513.8A Active CN118158021B (en) 2024-04-12 2024-04-12 A data transmission processing method and system based on Glink bus protocol

Country Status (1)

Country Link
CN (1) CN118158021B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115883064A (en) * 2022-11-23 2023-03-31 湘潭大学 An anti-side-channel attack method based on SM3 cryptographic hash algorithm
CN116305197A (en) * 2023-02-17 2023-06-23 成都国科微电子有限公司 Data encryption method and device and readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB202020414D0 (en) * 2020-12-22 2021-02-03 Nchain Holdings Ltd Blocking sensitive data
CN116757702A (en) * 2023-07-03 2023-09-15 中国工商银行股份有限公司 Transaction data determining method and device, processor and electronic equipment
CN117151242A (en) * 2023-08-09 2023-12-01 中国联合网络通信集团有限公司 Sample acquisition method, model construction method, device, equipment and storage medium
CN117278226A (en) * 2023-11-09 2023-12-22 紫光同芯微电子有限公司 Safety protection method and device for SHA256

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115883064A (en) * 2022-11-23 2023-03-31 湘潭大学 An anti-side-channel attack method based on SM3 cryptographic hash algorithm
CN116305197A (en) * 2023-02-17 2023-06-23 成都国科微电子有限公司 Data encryption method and device and readable storage medium

Also Published As

Publication number Publication date
CN118158021A (en) 2024-06-07

Similar Documents

Publication Publication Date Title
CN102138300B (en) Application of message authentication code precomputation in secure memory
CN101751243B (en) Methods and devices for instruction level software encryption
US20170063853A1 (en) Data cipher and decipher based on device and data authentication
CN112394877A (en) Method for secure memory and system thereof
US20080084996A1 (en) Authenticated encryption method and apparatus
WO2018104412A1 (en) Method of rsa signature or decryption protected using a homomorphic encryption
CN110008745A (en) Encryption method, computer equipment and computer storage medium
US8577024B2 (en) Concealing plain text in scrambled blocks
US9847879B2 (en) Protection against passive sniffing
US12052348B2 (en) Computation device using shared shares
CN117640256B (en) Data encryption method, recommendation device and storage medium of wireless network card
KR20130093557A (en) System, devices and methods for collaborative execution of a software application comprising at least one encrypted instruction
CN117675189A (en) Data encryption method, data decryption device and electronic equipment
Haria et al. Enhanced image encryption using AES algorithm with CBC mode: a secure and efficient approach
CN114629633B (en) Key block enhanced encapsulation
CN117221878B (en) Information security control method and device based on wireless network equipment
KR101687492B1 (en) Storing method of data dispersively and credential processing unit
CN118158021B (en) A data transmission processing method and system based on Glink bus protocol
US12425189B1 (en) Cryptographic computer machines with novel switching devices
JP6631989B2 (en) Encryption device, control method, and program
CN119363348B (en) A multi-tenant cultural and tourism data encryption processing method, system, device and medium
WO2025215393A1 (en) Improved encryption and authentication method with associated data
Durge et al. Analyzing Byte Level Tokenization for two Layer Encryption Technique
CN117240439A (en) Data processing method based on quantum network cloud host
CN119150323A (en) Data protection method and device based on chip bus encryption and safety chip

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载