Instant messaging data encryption transmission method and system
Through hash encryption and double encryption key technology, the problem of encryption transmission delay of instant messaging data in group chat scenarios is solved, and efficient and secure data transmission is achieved, adapting to complex network environments and multi-user scenarios.
Patent Information
- Application Number
- CN202510574001.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-05-06
AI Technical Summary
The existing instant messaging data encryption technology in group chat scenarios has increased the number of people, resulting in an increase in the update time of the protocol group chat key, resulting in delay in the encryption transmission of instant messaging data, which cannot meet the timely response needs.
By obtaining instant messaging data and hardware device information, hash encryption is used to generate hash values, combining the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm to generate double encryption keys, and building a multi-forktree path based on the number of group chat members for encryption transmission, ensuring that each member encrypts and decrypts data through the secure key path.
It improves encryption security and transmission timeliness, adapts to complex network environments, resists multiple attacks, reduces key update delays, and adapts to multi-user data transmission in group chat scenarios.
Smart Images

Figure CN120090884B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of instant messaging, and in particular to an instant messaging data encryption transmission method and system. Background Art
[0002] With the rapid development of Internet technology, instant messaging applications have become an important tool for daily communication and information exchange. However, instant messaging data faces many security threats during transmission, such as network monitoring, data interception, and man-in-the-middle attacks. This has led to the need for encrypted transmission of instant messaging.
[0003] In the instant messaging scenario, the existing encryption technology requires more time to update the protocol group chat key due to the increase in the number of people, which in turn causes a large delay in the encrypted transmission of instant messaging data, and thus cannot meet the timely response requirements of instant messaging. Therefore, an instant messaging data encryption transmission method and system are needed to solve the above problems. Summary of the Invention
[0004] The purpose of the present invention is to provide a method and system for encrypting and transmitting instant messaging data to solve the technical problems raised in the above-mentioned background technology.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A method for encrypting and transmitting instant messaging data, comprising:
[0007] Acquiring instant messaging data transmission information, wherein the data transmission information includes communication data information and instant messaging hardware device information;
[0008] Acquire a transmission data stream according to the communication data information, divide the transmission data stream into a plurality of encryption units of fixed size, acquire corresponding encryption unit preambles according to the plurality of encryption units, and generate a plurality of hash values from the plurality of encryption unit preambles based on hash encryption;
[0009] Obtaining user fingerprint information and environmental sensor information according to the instant messaging hardware device information, and obtaining the gyroscope angular velocity change rate and the ambient light intensity instantaneous gradient according to the environmental sensor information;
[0010] Generate a dynamic random entropy value seed according to the user fingerprint information, the gyroscope angular velocity change rate and the instantaneous gradient of the ambient light intensity;
[0011] Based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm, multiple hash values and dynamic random entropy value seeds are exchanged to obtain a double-encrypted transmission data key;
[0012] Instant messaging data is encrypted and transmitted based on the double-encrypted transmission data key.
[0013] Preferably, the step of obtaining a transmission data stream according to the communication data information, dividing the transmission data stream into a plurality of encryption units of fixed size, obtaining corresponding encryption unit preambles according to the plurality of encryption units, and generating a plurality of hash values from the plurality of encryption unit preambles based on hash encryption includes:
[0014] Converting the communication data information into a standardized binary stream based on TLV encoding to obtain a binary data stream, and defining the binary data stream as a transmission data stream;
[0015] Dividing the transmission data stream into multiple encryption units of fixed size according to a preset fixed length;
[0016] Disassembling the plurality of encryption units according to standard fields to obtain a plurality of encryption unit preambles;
[0017] Based on hash encryption, multiple encryption unit preambles are used to generate genesis blocks, and the genesis blocks are chain-bound to obtain multiple hash secret values, wherein the chain binding is to concatenate the genesis blocks into an irreversible chain structure based on a forward hash dependency.
[0018] Preferably, the step of obtaining the gyroscope angular velocity change rate and the ambient light intensity instantaneous gradient according to the environmental sensor information includes:
[0019] Acquire gyroscope data according to the environmental sensor information, and perform original signal correction on the gyroscope data to obtain corrected gyroscope data;
[0020] Acquiring a gyroscope instantaneous speed and a gyroscope data sampling interval according to the corrected gyroscope data;
[0021] Acquire the first adjacent sampling points of the gyroscope at the current moment based on a preset time sequence, wherein the first adjacent sampling points include the first sampling point moment and the second sampling point moment;
[0022] The gyroscope angular velocity change rate is calculated according to the gyroscope instantaneous speed, the gyroscope data sampling interval, the first sampling point time and the second sampling point time, wherein the calculation formula is:
[0023] ;
[0024] in, represents the rate of change of gyroscope angular velocity, represents the instantaneous speed of the gyroscope, represents the first sampling point moment, represents the second sampling point moment, Indicates the gyroscope data sampling interval;
[0025] Acquire an initial measured light intensity value of the photoelectric sensor according to the environmental sensor information;
[0026] Performing nonlinear compensation on the initial measured light intensity value based on the standard light source to obtain a compensated measured light intensity value;
[0027] Obtaining an initial measurement light sampling interval;
[0028] Acquire the second adjacent sampling points of the photoelectric sensor at the current moment based on a preset time sequence, wherein the second adjacent sampling points include the third sampling point moment and the fourth sampling point moment;
[0029] The instantaneous gradient of the ambient light intensity is calculated according to the compensated measured light intensity value, the initial measured light sampling interval, the third sampling point time, and the fourth sampling point time, wherein the calculation formula is:
[0030] ;
[0031] in, represents the instantaneous gradient of ambient light intensity, Indicates the compensated measured light intensity value, represents the third sampling point, represents the fourth sampling point, Indicates the initial measurement light sampling interval.
[0032] Preferably, the step of generating a dynamic random entropy value seed according to the user fingerprint information, the gyroscope angular velocity change rate, and the instantaneous gradient of ambient light intensity includes:
[0033] Extracting the pressure gradient of the fingerprint pressing by the pressure sensing array according to the information of the instant messaging hardware device, and generating a first 256-bit binary code from the pressure gradient based on a quantum random number generator;
[0034] Generating a second 256-bit binary code from the gyroscope angular velocity change rate based on a quantum random number generator;
[0035] Generating a third 256-bit binary code from the instantaneous gradient of the ambient light intensity based on a quantum random number generator;
[0036] The first 256-bit binary code, the second 256-bit binary code, and the third 256-bit binary code are mixed in a heterogeneous manner to obtain a mixed code;
[0037] Processing the mixed code based on a hash function to obtain a hash mixed code value, and performing the hash mixed code value;
[0038] A current timestamp is obtained based on a preset time sequence, and the current timestamp and the hash mixed code value are mixed based on a quantum random number generator to obtain a dynamic random entropy value seed.
[0039] Preferably, the step of performing key exchange on the plurality of hash values and the dynamic random entropy value seeds based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm to obtain a double-encrypted transmission data key includes:
[0040] Obtaining a public-private key pair generated by using an elliptic curve cryptography algorithm for the plurality of hash values and a dynamic random entropy value seed, wherein the public-private key pair includes a first private key and a second private key;
[0041] A preset effective point on the elliptic curve is obtained based on an elliptic curve cryptography algorithm, and a first public key is calculated according to the preset effective point and the first private key, wherein the calculation formula is:
[0042] ;
[0043] in, represents the first public key, represents the first private key, Indicates the preset effective point;
[0044] The second public key is calculated based on the preset validity point and the second private key, wherein the calculation formula is:
[0045] ;
[0046] in, represents the second public key, represents the second private key, Indicates the preset effective point;
[0047] Performing a secret key conversion on the first public key and the second public key based on a hash function to obtain an ECC key;
[0048] Based on the post-quantum Kyber algorithm, multiple hash values and dynamic random entropy value seeds are used to generate Kyber keys, and the ECC key and Kyber key are exchanged based on hash processing to obtain a double-encrypted transmission data key.
[0049] Preferably, the step of encrypting and transmitting instant messaging data based on a double-encrypted transmission data key includes:
[0050] Obtaining the number of members of the protocol group chat, and organizing the protocol group chat into a multitree path based on the number of members;
[0051] Acquire corresponding path nodes according to the multi-branch tree path, and encrypt the plurality of path nodes using the double-encrypted transmission data key according to a preset time sequence to obtain a plurality of encrypted nodes;
[0052] The instant messaging data of the protocol group chat is encrypted and transmitted according to the multiple encryption nodes.
[0053] This application also provides an instant messaging data encryption transmission system, including:
[0054] A first acquisition module is used to acquire data transmission information of instant messaging, wherein the data transmission information includes communication data information and instant messaging hardware device information;
[0055] a second acquisition module, configured to acquire a transmission data stream according to the communication data information, divide the transmission data stream into a plurality of encryption units of fixed size, acquire corresponding encryption unit preambles according to the plurality of encryption units, and generate a plurality of hash values from the plurality of encryption unit preambles based on hash encryption;
[0056] a third acquisition module, configured to acquire user fingerprint information and environmental sensor information according to the instant messaging hardware device information, and acquire a gyroscope angular velocity change rate and an instantaneous gradient of ambient light intensity according to the environmental sensor information;
[0057] A generation module, configured to generate a dynamic random entropy value seed based on the user fingerprint information, the gyroscope angular velocity change rate, and the instantaneous gradient of ambient light intensity;
[0058] An exchange module is used to perform key exchange on the multiple hash values and dynamic random entropy value seeds based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm to obtain a double-encrypted transmission data key;
[0059] The transmission module is used to encrypt and transmit instant messaging data based on a double-encrypted transmission data key.
[0060] Preferably, the second acquisition module includes:
[0061] A first acquiring unit is configured to convert the communication data information into a standardized binary stream based on TLV encoding conversion to obtain a binary data stream, and define the binary data stream as a transmission data stream;
[0062] a segmentation unit, configured to segment the transmission data stream into a plurality of encryption units of fixed size according to a preset fixed length;
[0063] a second obtaining unit, configured to disassemble the plurality of encryption units according to standard fields to obtain a plurality of encryption unit preambles;
[0064] A generation unit is used to generate a genesis block from a plurality of the encryption unit preambles based on hash encryption, and to chain-bind the genesis blocks to obtain a plurality of hash secret values, wherein the chain binding is to concatenate the genesis blocks into an irreversible chain structure based on a forward hash dependency.
[0065] The present application also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0066] The present application also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when executed by a processor.
[0067] The beneficial effects of the present application are as follows: the present invention first obtains data transmission information containing communication and hardware device information, standardizes the communication data and splits and encrypts it to generate a hash value, and at the same time mines the dynamic factors in the hardware device information to generate a dynamic random entropy value seed, and then uses the elliptic curve and post-quantum Kyber algorithm to generate a double encryption key based on the above results. Finally, a multi-branch tree path is constructed according to the number of group chat members, and the key encryption path nodes are used to realize the encrypted transmission of instant messaging data, effectively improving the encryption security and transmission timeliness, adapting to complex network environments and resisting various attacks. At the same time, multiple encryption nodes can also efficiently adapt to multi-user data transmission in group chat scenarios, ensuring that each member can encrypt and decrypt data through a secure key path, while reducing the delay problem caused by key updates. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 This is a schematic diagram of a method flow chart according to an embodiment of the present application.
[0069] Figure 2 This is a schematic diagram of the system structure of an embodiment of the present application.
[0070] Figure 3 This is a schematic diagram of the internal structure of a computer device according to an embodiment of the present application.
[0071] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0072] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0073] like Figure 1 As shown, the present application provides an instant messaging data encryption transmission method, comprising:
[0074] S1. Acquire data transmission information of instant messaging, wherein the data transmission information includes communication data information and instant messaging hardware device information;
[0075] S2. Obtaining a transmission data stream according to the communication data information, dividing the transmission data stream into a plurality of encryption units of fixed size, obtaining corresponding encryption unit preambles according to the plurality of encryption units, and generating a plurality of hash values from the plurality of encryption unit preambles based on hash encryption;
[0076] S3. Obtaining user fingerprint information and environmental sensor information based on the instant messaging hardware device information, and obtaining a gyroscope angular velocity change rate and an instantaneous gradient of ambient light intensity based on the environmental sensor information;
[0077] S4. Generate a dynamic random entropy value seed based on the user fingerprint information, the gyroscope angular velocity change rate, and the instantaneous gradient of ambient light intensity;
[0078] S5. Perform key exchange on the multiple hash values and the dynamic random entropy value seed based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm to obtain a double-encrypted transmission data key;
[0079] S6. Encrypt and transmit the instant messaging data based on the double-encrypted transmission data key.
[0080] As described in the above steps S1-S6, due to the existing encryption technology in the instant messaging scenario, the increase in the number of people leads to a longer time required to update the protocol group chat key, which in turn leads to a large delay in the encrypted transmission of instant messaging data, and thus cannot meet the needs of timely communication and timely response. Therefore, the present invention first obtains the data transmission information of the instant messaging, wherein the data transmission information includes communication data information and instant messaging hardware device information, and provides basic materials for subsequent encryption processing by comprehensively collecting various types of data information required for instant messaging, ensuring that the encryption process can fully consider the communication content and device-related factors, and enhance the pertinence and security of encryption. Since the communication data usually has a complex and diverse format, it is converted into a unified binary data stream and divided into encryption units to facilitate efficient encryption operations. Due to its strong one-way and anti-collision properties, hash encryption can generate reliable hash values based on the encryption unit preamble, providing important intermediate data for subsequent key generation and data security. It is an indispensable part of the encryption process. Then, according to the communication data information, the transmission data stream is obtained, and the transmission data stream is divided into multiple encryption units of fixed size. The corresponding encryption unit preambles are obtained according to the multiple encryption units, and multiple hash values are generated from the multiple encryption unit preambles based on hash encryption. Through standardized conversion and segmentation processing, the communication data is converted into a unit structure suitable for encryption, and hash encryption is used to generate hash values. These values are irreversible and unique, which can effectively protect the integrity and originality of the data and prevent data from being lost. The transmission process is tampered with, and then the user fingerprint information and environmental sensor information are obtained according to the instant messaging hardware device information, and the gyroscope angular velocity change rate and the ambient light intensity instantaneous gradient are obtained according to the environmental sensor information. By deeply mining the dynamic factors such as the user fingerprint information, the gyroscope angular velocity change rate and the ambient light intensity instantaneous gradient from the hardware device information, these factors are random and real-time, which can greatly increase the dynamic and unpredictable nature of the encryption and resist common static attack methods. Then, a dynamic random entropy value seed is generated according to the user fingerprint information, the gyroscope angular velocity change rate and the ambient light intensity instantaneous gradient. In this way, the dynamic information from multiple sources is encoded, mixed and further processed to generate a dynamic random entropy value seed.As the key foundation for key generation, the entropy seed possesses extremely high randomness and unpredictability, laying the foundation for the subsequent generation of high-strength encryption keys. Furthermore, information from different sources possesses unique random characteristics. This randomness is fully integrated through quantum random number generator encoding and heterogeneous superposition mixing operations. Combined with a timestamp, its dynamic nature is further enhanced, ensuring the generated entropy seed is cryptographically strong enough to meet the stringent requirements for key randomness, thereby enhancing the security of the overall encryption system. Subsequently, a key exchange is performed using elliptic curve cryptography and the post-quantum Kyber algorithm, combining the multiple hash values and the dynamic random entropy seed to generate a doubly encrypted transmission key. This multi-algorithm fusion and dual encryption mechanism significantly improves key security and attack resistance, effectively addressing the potential threats posed by emerging technologies such as quantum computing. Elliptic curve cryptography offers advantages in efficiency and security in traditional cryptography, while the post-quantum Kyber algorithm is designed to address the potential threats of quantum computing. Combining the two and exchanging keys based on multiple key data generated in advance can give full play to the strengths of their respective algorithms, ensure the security of keys in different security dimensions, adapt to the increasingly complex network security environment, and ensure the confidentiality and integrity of instant messaging data during transmission. Finally, the instant messaging data is encrypted and transmitted based on the double-encrypted transmission data key. In this way, a multi-branch tree path is constructed according to the number of members in the protocol group chat, and the path nodes are encrypted and used to encrypt instant messaging data. This method can efficiently adapt to multi-user data transmission in group chat scenarios, ensuring that each member can encrypt and decrypt data through a secure key path, while reducing the delay problem caused by key updates and ensuring the timeliness of instant messaging.
[0081] In one embodiment, the step S2 of obtaining a transmission data stream according to the communication data information, dividing the transmission data stream into a plurality of encryption units of fixed size, obtaining corresponding encryption unit preambles according to the plurality of encryption units, and generating a plurality of hash values from the plurality of encryption unit preambles based on hash encryption includes:
[0082] S201, converting the communication data information into a standardized binary stream based on TLV encoding conversion to obtain a binary data stream, and defining the binary data stream as a transmission data stream;
[0083] S202, dividing the transmission data stream into multiple encryption units of fixed size according to a preset fixed length;
[0084] S203, disassembling the plurality of encryption units according to standard fields to obtain a plurality of encryption unit preambles;
[0085] S204. Generate a genesis block from the plurality of encryption unit preambles based on hash encryption, and chain-bind the genesis blocks to obtain a plurality of hash secret values, wherein the chain binding is to concatenate the genesis blocks into an irreversible chain structure based on a forward hash dependency.
[0086] As described in steps S201-S204 above, since the communication data in instant messaging data processing has a wide range of sources and formats, if it is not standardized, subsequent segmentation, encryption and other operations will be difficult to implement effectively. The present invention first converts the communication data information into a standardized binary stream based on TLV encoding conversion to obtain a binary data stream, and defines the binary data stream as a transmission data stream. The communication data information is converted into a standardized binary stream through TLV encoding conversion, thereby achieving the unification of data formats. This unification enables the subsequent processing flow to be carried out in a standardized and normalized manner, avoiding the processing complexity and error possibility caused by data format differences, and laying the foundation for data encryption processing. Among them, TLV encoding conversion provides a universal and mature method to achieve data format unification, ensuring that data of different sources and types can be correctly identified and processed by the system, which is a key step in data preprocessing in the entire encryption process. Then, the transmission data stream is divided into multiple encryption units of fixed size according to a preset fixed length. Since for large-scale communication data streams, if the entire encryption is directly performed, the computational complexity is huge and once an error occurs, the entire data transmission may fail. Therefore, splitting it into fixed-size encryption units conforms to the engineering practice principles of cryptography and data processing, can reduce processing difficulty, improve system stability and reliability, and is a necessary means to achieve efficient encryption. Furthermore, by splitting the binary data stream into multiple encryption units according to a preset fixed length, the originally continuous data stream is broken down into small blocks that are easier to manage and operate. This splitting method is beneficial for improving encryption efficiency because each encryption unit can be encrypted independently. It also facilitates error detection and correction during data transmission, enhancing data reliability. The multiple encryption units are then disassembled according to standard fields to obtain multiple encryption unit preambles. The encryption units are then disassembled according to standard fields to obtain the encryption unit preambles, extracting the key information in each encryption unit. This preamble information will serve as an important input for subsequent hash encryption. By hashing it, a representative and unique hash value can be generated for use in data integrity verification and key generation. At the same time, not all information in an encryption unit is equally important in encryption and security verification. By disassembling and obtaining key preamble information, it is possible to focus on the parts that are core to data security.Using this preamble information as the basis for hash encryption can reduce unnecessary computational effort while ensuring security, improving the overall performance and efficiency of the encryption system. Finally, multiple cryptographic unit preambles are hashed to generate a genesis block, which is then chained together to produce multiple hash values. Chaining involves concatenating these blocks into an irreversible chain structure based on forward hash dependencies. The genesis block is defined as the initial unit of the hash chain structure and serves as the trust anchor and security root for the entire data chain. The hash-based generation and chain binding of genesis blocks creates an irreversible and interconnected chain of hash values. As the starting point and trust anchor for the entire data chain, the genesis block ensures the reliability and integrity of the data source. This chain binding structure ensures that each hash value is dependent on the previous one. Any data tampering will result in a change in subsequent hash values, enabling timely detection of data anomalies and ensuring data security during transmission. The chain structure of hash encryption has important application value in cryptography. Drawing on the principles of blockchain technology, it provides a powerful tamper-proof and integrity verification mechanism for instant messaging data. The multiple hash values generated in this way become an important basis for subsequent key exchange and data encryption. They are one of the core links in ensuring data security in the entire encryption transmission method, and effectively resist common network attack methods such as man-in-the-middle attacks and data tampering.
[0087] In one embodiment, the step S3 of acquiring the gyroscope angular velocity change rate and the ambient light intensity instantaneous gradient according to the environmental sensor information includes:
[0088] S301, acquiring gyroscope data according to the environmental sensor information, and performing original signal correction on the gyroscope data to obtain corrected gyroscope data;
[0089] S302, acquiring a gyroscope instantaneous speed and a gyroscope data sampling interval according to the corrected gyroscope data;
[0090] S303: Acquire the first adjacent sampling points of the gyroscope at the current moment based on a preset time sequence, wherein the first adjacent sampling points include the first sampling point moment and the second sampling point moment;
[0091] S304: Calculate the gyroscope angular velocity change rate according to the gyroscope instantaneous speed, the gyroscope data sampling interval, the first sampling point time, and the second sampling point time, wherein the calculation formula is:
[0092] ;
[0093] in, represents the rate of change of gyroscope angular velocity, represents the instantaneous speed of the gyroscope, represents the first sampling point moment, represents the second sampling point moment, Indicates the gyroscope data sampling interval;
[0094] S305, obtaining an initial measured light intensity value of the photoelectric sensor according to the environmental sensor information;
[0095] S306, performing nonlinear compensation on the initial measured light intensity value based on a standard light source to obtain a compensated measured light intensity value;
[0096] S307, obtaining an initial measurement light sampling interval;
[0097] S308: Acquire the second adjacent sampling points of the photoelectric sensor at the current moment based on a preset time sequence, wherein the second adjacent sampling points include the third sampling point moment and the fourth sampling point moment;
[0098] S309: Calculate the instantaneous gradient of ambient light intensity according to the compensated measured light intensity value, the initial measured light sampling interval, the third sampling point time, and the fourth sampling point time, wherein the calculation formula is:
[0099] ;
[0100] in, represents the instantaneous gradient of ambient light intensity, Indicates the compensated measured light intensity value, represents the third sampling point, represents the fourth sampling point, Indicates the initial measurement light sampling interval.
[0101] As described in steps S301-S309 above, the present invention first obtains gyroscope data based on the environmental sensor information and then performs raw signal correction on the gyroscope data to obtain corrected gyroscope data. This process of obtaining gyroscope data from the environmental sensor information and performing raw signal correction ensures data accuracy and reliability. Raw gyroscope data may contain noise, bias, and other issues. Corrected data provides high-quality basic data for subsequent accurate calculation of the angular velocity rate of change, reducing encryption security risks caused by data errors. Furthermore, data accuracy is crucial when using gyroscope data for encryption-related operations. Directly using uncorrected raw data may introduce erroneous information, affecting the validity of subsequent keys or encryption parameters generated based on this data. Therefore, performing raw signal correction is a necessary prerequisite for ensuring that the entire encryption system operates based on reliable data. Subsequently, the gyroscope instantaneous velocity and gyroscope data sampling interval are obtained based on the corrected gyroscope data. Furthermore, the gyroscope instantaneous velocity and data sampling interval are obtained based on the corrected gyroscope data. These parameters are key elements in calculating the angular velocity rate of change. Clarifying these values provides the necessary input for subsequent precise mathematical calculations, enabling accurate quantification of the gyroscope's dynamic characteristics and further introducing randomness based on the device's motion state into the encryption process. The first adjacent sampling points before and after the gyroscope at the current moment are then obtained based on a preset time sequence. These first adjacent sampling points include the first sampling point moment and the second sampling point moment. Determining the first adjacent sampling points before and after the gyroscope at the current moment based on the preset time sequence establishes a time reference framework for subsequent calculations of the angular velocity rate of change. By selecting appropriate adjacent sampling points, the gyroscope's velocity change trend over a short period of time can be accurately reflected, thereby obtaining a representative angular velocity rate of change for enhanced randomness in the encryption process. Furthermore, when calculating the angular velocity rate of change, the proper selection of sampling points is key to ensuring that the calculation results accurately reflect the gyroscope's dynamic characteristics. Adjacent sampling points are selected through a preset time sequence, adhering to the basic principles of signal processing and mathematical calculations. This ensures that effective dynamic change information can be extracted from the continuous gyroscope data, providing a reliable source of randomness for encryption. Subsequently, the gyroscope angular velocity change rate is calculated based on the gyroscope's instantaneous velocity, the gyroscope data sampling interval, the first sampling point, and the second sampling point. Using the previously acquired parameters, the gyroscope angular velocity change rate is calculated according to a specific formula. This rate of change is a real-time physical quantity closely related to device motion. Introducing it into the encryption process greatly increases the dynamics and unpredictability of encryption, effectively defending against attacks based on fixed patterns and improving encryption security. The initial measured light intensity value of the photoelectric sensor is then obtained based on the environmental sensor information. Obtaining this initial measured light intensity value from the environmental sensor information provides the basic data for the subsequent calculation of the instantaneous gradient of the ambient light intensity.Changes in light intensity reflect the dynamics of the environment and are an important basis for introducing environmental randomness into the encryption process. Nonlinear compensation is then performed on the initial measured light intensity based on a standard light source to obtain a compensated measured light intensity value. This is then further compensated for nonlinearly using the standard light source, improving the accuracy and comparability of the light intensity data. Photoelectric sensor measurements under different environments may exhibit deviations. Compensation allows subsequent calculations to be performed under a unified standard, ensuring that the instantaneous gradient of ambient light intensity calculated based on light intensity changes accurately reflects actual environmental changes and enhancing encryption reliability. The initial measured light sampling interval is then obtained. The second adjacent sampling points before and after the current photoelectric sensor are obtained based on a preset time sequence. These second adjacent sampling points include the third and fourth sampling points. Determining the second adjacent sampling points before and after the current photoelectric sensor based on the preset time sequence, similar to gyroscope data processing, establishes a time reference frame for calculating the instantaneous gradient of ambient light intensity. By selecting appropriate adjacent sampling points, the changing trend of light intensity over a short period of time can be accurately reflected, thereby obtaining a representative instantaneous gradient of ambient light intensity, which is used to enhance randomness in the encryption process. Finally, the instantaneous gradient of ambient light intensity is calculated based on the compensated measured light intensity value, the initial measured light sampling interval, the third sampling point, and the fourth sampling point. Using the previously obtained compensated light intensity value, the sampling interval, and the adjacent sampling points, the instantaneous gradient of ambient light intensity is calculated according to a specific formula. This gradient value reflects the rapid changes in ambient light. Introducing it into the encryption process further increases the environmental randomness of the encryption, making the encryption results more unpredictable and improving resistance to external attacks. At the same time, as an important quantitative indicator of environmental randomness, the instantaneous gradient of ambient light intensity can provide unique random information for encryption. By accurately calculating and applying this gradient value, the dynamic changing characteristics of ambient light can be fully utilized. Together with other factors, a more robust encryption system can be constructed, enhancing encryption security and cracking resistance, effectively protecting the security of instant messaging data during transmission.
[0102] In one embodiment, step S4 of generating a dynamic random entropy value seed based on the user fingerprint information, the gyroscope angular velocity change rate, and the instantaneous gradient of ambient light intensity includes:
[0103] S401: extracting the pressure gradient of the fingerprint pressing by the pressure sensing array according to the information of the instant messaging hardware device, and generating a first 256-bit binary code from the pressure gradient based on a quantum random number generator;
[0104] S402, generating a second 256-bit binary code from the gyroscope angular velocity change rate based on a quantum random number generator;
[0105] S403, generating a third 256-bit binary code based on the instantaneous gradient of the ambient light intensity using a quantum random number generator;
[0106] S404: performing heterogeneous superposition mixing on the first 256-bit binary code, the second 256-bit binary code, and the third 256-bit binary code to obtain a mixed code;
[0107] S405, processing the mixed code based on a hash function to obtain a hash mixed code value, and performing the hash mixed code value;
[0108] S406: Obtain a current timestamp based on a preset time sequence, and mix the current timestamp and the hash mixed code value based on a quantum random number generator to obtain a dynamic random entropy value seed.
[0109] As described in steps S401-S406 above, the present invention extracts the pressure gradient of the fingerprint detected by the pressure-sensing array based on the instant messaging hardware device information, and generates a first 256-bit binary code from the pressure gradient based on a quantum random number generator. The fingerprint pressure gradient detected by the pressure-sensing array is extracted from the instant messaging hardware device information and converted into a first 256-bit binary code using a quantum random number generator. The fingerprint pressure gradient is unique, and the binary code generated based on it introduces a random factor based on the user's biometrics into the subsequent key generation, enhancing the unpredictability of the key and improving the security of encryption. At the same time, during the encryption process, the use of the user's biometric information can increase the personalization and uniqueness of the key. As a stable and unique biometric feature, the changes in the pressure gradient of the fingerprint can provide rich random information. The quantum random number generator further ensures the randomness of the code, making the generated binary code cryptographically strong and providing a strong foundation for building secure keys. The quantum random number generator then generates a second 256-bit binary code based on the gyroscope angular velocity change rate, which is then converted into a second 256-bit binary code using the quantum random number generator. The gyroscope angular velocity change rate reflects the dynamic motion state of the device and is a real-time, unpredictable physical quantity. Encoding it adds the randomness of the device's dynamic environment to key generation, allowing the key to continuously change with the device's usage, effectively defending against attacks based on fixed patterns. In modern encryption technology, the introduction of dynamic physical information about the device can significantly enhance encryption security. The real-time and random nature of gyroscope data makes it an ideal key generation factor. Using a quantum random number generator for encoding can convert this physical quantity into a binary form suitable for cryptographic operations, further enriching the source of randomness in the key and enhancing the encryption system's resistance to dynamic attacks. The instantaneous gradient of ambient light intensity is then converted into a third 256-bit binary code based on the quantum random number generator. This is also a factor that changes continuously with environmental changes. Encoding it and incorporating it into the key generation process increases the randomness of environmental factors. Even with the same device and user operation, the generated key will vary depending on the environment, improving the security and resistance to cracking. Environmental factors are often overlooked in encryption, but they can actually provide additional randomness for key generation.The instantaneous changes in ambient light intensity are unpredictable. Through the encoding of the quantum random number generator, this environmental randomness is converted into a cryptographically usable binary code, further broadening the random space of the key, making the encryption system more robust and adaptable to different usage environments and attack scenarios. The first 256-bit binary code, the second 256-bit binary code, and the third 256-bit binary code are then superimposed and mixed in a heterogeneous manner to obtain a hybrid code. The hybrid code is obtained by heterogeneously superimposing and mixing the three 256-bit binary codes. This mixing operation integrates random information from different sources, so that the generated hybrid code integrates the randomness of user biometrics, device dynamic motion, and environmental factors, further enhancing the complexity and unpredictability of the code, and providing a stronger random foundation for the subsequent generation of high-quality keys. At the same time, the randomness of a single source may have certain limitations. By heterogeneously superimposing and mixing multiple different types of random codes, the advantages of each source can be fully utilized and any possible random defects can be compensated. In cryptography, increasing the complexity of randomness is an important means to improve the security of keys. Therefore, this step is crucial to improving the security of the entire encryption system. The mixed code is then processed based on a hash function to obtain a hash mixed code value, and the hash mixed code value is processed using a hash function to obtain a hash mixed code value. The one-way and collision-resistant properties of the hash function make the hash mixed code value have the characteristics of fixed length and uniqueness. It can compress the complex mixed code into a representative hash value, which is convenient for subsequent key generation and management operations, and further ensures the integrity and security of the data. At the same time, the hash function plays an important role in cryptography. It can convert data of any length into a hash value of fixed length, and has the characteristics of irreversibility and collision resistance. During this process, hashing the hybrid code simplifies the data structure, facilitating subsequent key generation and exchange operations. The security characteristics of hash functions are also leveraged to enhance the security and reliability of the entire encryption process. Finally, a current timestamp is obtained based on a preset time sequence. This current timestamp and the hashed hybrid code value are then mixed using a quantum random number generator to generate a dynamic random entropy seed. This combination of the current timestamp and the hashed hybrid code value is then used to generate a dynamic random entropy seed using a quantum random number generator. The introduction of the timestamp increases the randomness of the time dimension, allowing the entropy seed to take on different values at different points in time, further enhancing its dynamic and unpredictable nature. This entropy seed serves as the core input for subsequent key generation, determining the key's fundamental characteristics and security. In encryption systems, a dynamic random entropy seed is crucial for generating high-strength keys.By combining the timestamp with the hash mixed code value and processing it with a quantum random number generator, multiple random factors are fully integrated to ensure that the entropy seed has extremely high randomness and unpredictability in the cryptographic sense, providing a solid foundation for generating secure and reliable encryption keys and effectively resisting various cryptanalysis attacks.
[0110] In one embodiment, the step S5 of performing key exchange on the plurality of hash values and the dynamic random entropy value seed based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm to obtain a double-encrypted transmission data key includes:
[0111] S501: Generate a public-private key pair based on the elliptic curve cryptography algorithm for the multiple hash values and the dynamic random entropy value seed, wherein the public-private key pair includes a first private key and a second private key;
[0112] S502: Obtain a preset effective point on the elliptic curve based on an elliptic curve cryptography algorithm, and calculate a first public key according to the preset effective point and the first private key, wherein the calculation formula is:
[0113] ;
[0114] in, represents the first public key, represents the first private key, Indicates the preset effective point;
[0115] S503: Calculate a second public key based on the preset validity point and the second private key, where the calculation formula is:
[0116] ;
[0117] in, represents the second public key, represents the second private key, Indicates the preset effective point;
[0118] S504: Perform a secret key conversion on the first public key and the second public key based on a hash function to obtain an ECC key;
[0119] S505: Generate a Kyber key from the multiple hash values and the dynamic random entropy value seed based on the post-quantum Kyber algorithm, perform a key exchange on the ECC key and the Kyber key based on the hash process, and obtain a double-encrypted transmission data key.
[0120] As described in the above steps S501-S505, the present invention first obtains a public-private key pair generated based on the elliptic curve cryptography algorithm for multiple hash values and dynamic random entropy value seeds, wherein the public-private key pair includes a first private key and a second private key. In this way, the public-private key pair is generated based on the hash value and the dynamic random entropy value seed using the elliptic curve cryptography algorithm. The public-private key pair is a core element in cryptography. The public key can be publicly used to encrypt data, while the private key is kept confidential by the holder for decryption. In this way, a secure communication foundation is achieved between the data sender and the receiver, ensuring that only the receiver with the corresponding private key can decrypt the transmitted data, thereby ensuring the confidentiality of the data. At the same time, the elliptic curve cryptography algorithm is widely used in the field of modern encryption and is highly favored due to its advantages such as shorter key length and higher computational efficiency at the same security strength. The public-private key pair is generated based on the hash value obtained in the previous processing and the dynamic random entropy seed. This fully utilizes the randomness and security characteristics of this data, providing basic key material that complies with cryptographic standards for subsequent key exchange and data encryption. This is a key step in building a secure encrypted transmission system. Next, a preset effective point on the elliptic curve is obtained based on the elliptic curve cryptography algorithm, and the first public key is calculated based on the preset effective point and the first private key. In this way, the preset effective point on the elliptic curve is determined based on the elliptic curve cryptography algorithm. The preset effective point is a special point predetermined on the elliptic curve. It plays a critical and fundamental role in the key generation and encryption process. From a mathematical perspective, the elliptic curve is defined by a series of points based on the equation of the elliptic curve. The preset effective point is a point selected in this curve space, and the first public key is calculated in combination with the first private key. This process is an important step in generating public keys in the elliptic curve cryptography algorithm. Through specific mathematical operations, the private key is associated with the preset effective point, so that the public key has the encryption characteristics corresponding to the private key, while ensuring the effectiveness and security of the public key in the elliptic curve cryptography system, and providing the correct public key parameters for subsequent key exchange and encryption operations. At the same time, in the elliptic curve cryptography algorithm, the selection of the preset effective point and the calculation of the public key based on the private key follow strict mathematical rules. This is the basis for ensuring that the public key can correctly participate in the encryption and decryption process. By accurately executing this step, it is ensured that the generated first public key can work with the first private key in the entire encryption system to achieve secure encrypted communication. It is a necessary step for performing encryption operations in accordance with the principles of the elliptic curve cryptography algorithm. Next, the second public key is calculated based on the preset effective point and the second private key. Similarly, according to the elliptic curve cryptography algorithm, the second public key is calculated using the preset effective point and the second private key.Similar to step S502, this step generates a corresponding public key for the other participant, allowing both parties to possess their own public and private key pairs under the elliptic curve cryptography system. This lays the foundation for subsequent key exchange and two-way secure communication, ensuring the feasibility and security of the encryption process in multi-user or multi-device communication scenarios. Furthermore, in actual instant messaging encrypted transmission, which may involve communication between multiple users or devices, each participant needs to have its own public and private key pair. Generating a second public key through this step meets the encryption requirements in multi-user scenarios, adheres to the multi-user application principle of the elliptic curve cryptography algorithm, ensures that the system can support complex communication environments, and enhances the versatility and practicality of the encryption method. The first and second public keys are then converted to ECC keys based on a hash function. In this way, the first and second public keys are converted to ECC keys using a hash function. The unidirectionality and collision resistance of the hash function ensure that the ECC key generated after the public key conversion is more secure and unique. This also facilitates integration and management with other keys in subsequent encryption operations, further enhancing the security and key diversity of the entire encryption system. Finally, the post-quantum Kyber algorithm uses the multiple hash values and a dynamic random entropy seed to generate a Kyber key. The ECC key and Kyber key are then exchanged using a hashing process to obtain a doubly encrypted transmission key. The post-quantum Kyber algorithm is resistant to quantum computing attacks, and combined with keys generated using elliptic curve cryptography, a double encryption mechanism is implemented. This double encryption significantly improves key security, effectively countering various current and future cryptographic attacks and ensuring the high confidentiality and integrity of instant messaging data during transmission.
[0121] In one embodiment, the step S6 of encrypting and transmitting the instant messaging data based on the double-encrypted transmission data key includes:
[0122] S601, obtaining the number of members of the protocol group chat, and organizing the protocol group chat into a multi-branch tree path based on the number of members;
[0123] S602: Obtain corresponding path nodes according to the multi-branch tree path, and encrypt the plurality of path nodes using the double-encrypted transmission data key according to a preset time sequence to obtain a plurality of encrypted nodes;
[0124] S603: Encrypt and transmit the instant messaging data of the protocol group chat according to the multiple encryption nodes.
[0125] As described in steps S601-S603 above, the present invention first obtains the number of members in the protocol group chat and then organizes the protocol group chat into a multitree path based on the number of members. This effectively organizes and manages the group chat member structure by obtaining the number of members in the protocol group chat. In group chat scenarios, changes in the number of members can affect the complexity of data transmission. The multitree path can organize this complexity in an orderly manner, providing a clear logical architecture for subsequent data encryption and distribution. This ensures that each member can accurately receive and process data within this architecture, improving the efficiency and accuracy of data transmission. Furthermore, in encrypted transmission of instant messaging group chats, how to rationally arrange data flow is a key issue. Constructing a multitree path based on the number of members is an effective data organization method that can adapt to group chats of varying sizes. It structures the relationships between group members, avoids data disarray, and provides an orderly framework for subsequent encryption operations, a necessary prerequisite for efficient group chat encrypted transmission. Corresponding path nodes are then obtained based on the multitree path. The dual-encrypted transmission data key is used to encrypt multiple path nodes according to a preset time sequence, resulting in multiple encrypted nodes. Corresponding path nodes are determined based on the multitree path, and these nodes are encrypted using the dual-encrypted transmission data key according to a preset time sequence, generating multiple encrypted nodes. These encrypted nodes become the key medium for secure data transmission between group chat members. Each encrypted node carries an encrypted portion of information. Only members with the correct key can decrypt the corresponding node's information, thus ensuring data confidentiality during transmission and preventing information from being accessed by unauthorized members. In a group chat encryption system, encrypting key nodes along the transmission path is a core operation for ensuring data security. Encrypting path nodes using the dual-encrypted key fully utilizes the high-strength key generated in the previous step and, combined with the preset time sequence, increases the dynamic and random nature of the encryption. This step ensures the security of data during transmission, and can effectively resist external attacks and information leakage even in complex group chat environments. It is a key link in achieving secure group chat encrypted transmission. Finally, the instant messaging data of the protocol group chat is encrypted and transmitted according to multiple encryption nodes. In this way, the instant messaging data of the protocol group chat is encrypted and transmitted using multiple encryption nodes, achieving comprehensive encryption protection for the group chat data. During the entire process from the sender to the receiver, the data is kept secure at each transmission link through the layers of protection of the encryption nodes, ensuring the confidentiality, integrity and availability of the instant messaging data, and meeting the strict requirements for data security in group chat scenarios. At the same time, multiple encryption nodes can also efficiently adapt to multi-user data transmission in group chat scenarios, ensuring that each member can encrypt and decrypt data through a secure key path, while reducing the delay problem caused by key updates.
[0126] like Figure 2 As shown, the present application also provides an instant messaging data encryption transmission system, comprising:
[0127] A first acquisition module is used to acquire data transmission information of instant messaging, wherein the data transmission information includes communication data information and instant messaging hardware device information;
[0128] a second acquisition module, configured to acquire a transmission data stream according to the communication data information, divide the transmission data stream into a plurality of encryption units of fixed size, acquire corresponding encryption unit preambles according to the plurality of encryption units, and generate a plurality of hash values from the plurality of encryption unit preambles based on hash encryption;
[0129] a third acquisition module, configured to acquire user fingerprint information and environmental sensor information according to the instant messaging hardware device information, and acquire a gyroscope angular velocity change rate and an instantaneous gradient of ambient light intensity according to the environmental sensor information;
[0130] A generation module, configured to generate a dynamic random entropy value seed based on the user fingerprint information, the gyroscope angular velocity change rate, and the instantaneous gradient of ambient light intensity;
[0131] An exchange module is used to perform key exchange on the multiple hash values and dynamic random entropy value seeds based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm to obtain a double-encrypted transmission data key;
[0132] The transmission module is used to encrypt and transmit instant messaging data based on a double-encrypted transmission data key.
[0133] In one embodiment, the second acquisition module includes:
[0134] A first acquiring unit is configured to convert the communication data information into a standardized binary stream based on TLV encoding conversion to obtain a binary data stream, and define the binary data stream as a transmission data stream;
[0135] a segmentation unit, configured to segment the transmission data stream into a plurality of encryption units of fixed size according to a preset fixed length;
[0136] a second obtaining unit, configured to disassemble the plurality of encryption units according to standard fields to obtain a plurality of encryption unit preambles;
[0137] A generation unit is used to generate a genesis block from a plurality of the encryption unit preambles based on hash encryption, and to chain-bind the genesis blocks to obtain a plurality of hash secret values, wherein the chain binding is to concatenate the genesis blocks into an irreversible chain structure based on a forward hash dependency.
[0138] like Figure 3 As shown, the present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method for encrypting and transmitting instant messaging data when executing the computer program.
[0139] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned method for encrypting and transmitting instant messaging data are implemented.
[0140] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct RAM bus dynamic RAM (DRDRAM), and RAM bus dynamic RAM (RDRAM).
[0141] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, apparatus, article, or method comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, apparatus, article, or method. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, apparatus, article, or method comprising the element.
[0142] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for encrypting and transmitting instant messaging data, characterized in that: include: Acquiring instant messaging data transmission information, wherein the data transmission information includes communication data information and instant messaging hardware device information; The steps of obtaining a transmission data stream according to the communication data information, dividing the transmission data stream into a plurality of encryption units of fixed size, obtaining corresponding encryption unit preambles according to the plurality of encryption units, and generating a plurality of hash secret values from the plurality of encryption unit preambles based on hash encryption specifically include: performing standardized binary stream conversion on the communication data information based on TLV encoding conversion to obtain a binary data stream, and defining the binary data stream as a transmission data stream; Dividing the transmission data stream into multiple encryption units of fixed size according to a preset fixed length; Disassembling the plurality of encryption units according to standard fields to obtain a plurality of encryption unit preambles; Generate a genesis block from the plurality of encryption unit preambles based on hash encryption, and chain-bind the genesis blocks to obtain a plurality of hash secret values, wherein the chain-binding is to concatenate the genesis blocks into an irreversible chain structure based on a forward hash dependency relationship; Obtaining user fingerprint information and environmental sensor information according to the instant messaging hardware device information, and obtaining the gyroscope angular velocity change rate and the ambient light intensity instantaneous gradient according to the environmental sensor information; Generate a dynamic random entropy value seed according to the user fingerprint information, the gyroscope angular velocity change rate and the instantaneous gradient of the ambient light intensity; Based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm, multiple hash values and dynamic random entropy value seeds are exchanged to obtain a double-encrypted transmission data key; Instant messaging data is encrypted and transmitted based on a double-encrypted transmission data key.
2. The instant messaging data encryption transmission method according to claim 1, characterized in that: The step of obtaining the gyroscope angular velocity change rate and the ambient light intensity instantaneous gradient according to the environmental sensor information includes: Acquire gyroscope data according to the environmental sensor information, and perform original signal correction on the gyroscope data to obtain corrected gyroscope data; Acquiring a gyroscope instantaneous speed and a gyroscope data sampling interval according to the corrected gyroscope data; Acquire the first adjacent sampling points of the gyroscope at the current moment based on a preset time sequence, wherein the first adjacent sampling points include the first sampling point moment and the second sampling point moment; Calculate the gyroscope angular velocity change rate according to the gyroscope instantaneous speed, the gyroscope data sampling interval, the first sampling point time and the second sampling point time; Acquire an initial measured light intensity value of the photoelectric sensor according to the environmental sensor information; Performing nonlinear compensation on the initial measured light intensity value based on the standard light source to obtain a compensated measured light intensity value; Obtaining an initial measurement light sampling interval; Acquire the second adjacent sampling points of the photoelectric sensor at the current moment based on a preset time sequence, wherein the second adjacent sampling points include the third sampling point moment and the fourth sampling point moment; The instantaneous gradient of the ambient light intensity is calculated according to the compensated measured light intensity value, the initial measured light sampling interval, the third sampling point time and the fourth sampling point time.
3. The instant messaging data encryption transmission method according to claim 1, characterized in that: The step of generating a dynamic random entropy value seed according to the user fingerprint information, the gyroscope angular velocity change rate, and the instantaneous gradient of ambient light intensity includes: Extracting the pressure gradient of the fingerprint pressing by the pressure sensing array according to the information of the instant messaging hardware device, and generating a first 256-bit binary code from the pressure gradient based on the quantum random number generator; Generating a second 256-bit binary code from the gyroscope angular velocity change rate based on a quantum random number generator; Generating a third 256-bit binary code from the instantaneous gradient of the ambient light intensity based on a quantum random number generator; The first 256-bit binary code, the second 256-bit binary code, and the third 256-bit binary code are mixed in a heterogeneous manner to obtain a mixed code; Processing the mixed code based on a hash function to obtain a hash mixed code value; A current timestamp is obtained based on a preset time sequence, and the current timestamp and the hash mixed code value are mixed based on a quantum random number generator to obtain a dynamic random entropy value seed.
4. The instant messaging data encryption transmission method according to claim 1, characterized in that: The step of performing key exchange on the plurality of hash secret values and the dynamic random entropy value seed based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm to obtain a double-encrypted transmission data key includes: Obtaining a public-private key pair generated by using an elliptic curve cryptography algorithm for the plurality of hash values and a dynamic random entropy value seed, wherein the public-private key pair includes a first private key and a second private key; Obtaining a preset effective point on the elliptic curve based on an elliptic curve cryptography algorithm, and calculating a first public key based on the preset effective point and the first private key; Calculate a second public key based on the preset validity point and the second private key; Performing key conversion on the first public key and the second public key based on a hash function to obtain an ECC key; Based on the post-quantum Kyber algorithm, multiple hash secret values and dynamic random entropy value seeds are used to generate Kyber keys, and the ECC key and the Kyber key are exchanged based on hash processing to obtain a double-encrypted transmission data key.
5. The instant messaging data encryption transmission method according to claim 1, characterized in that: The step of encrypting and transmitting instant messaging data based on the double-encrypted transmission data key includes: Obtaining the number of members of the protocol group chat, and organizing the protocol group chat into a multitree path based on the number of members; Acquire corresponding path nodes according to the multi-branch tree path, and encrypt the plurality of path nodes using the double-encrypted transmission data key according to a preset time sequence to obtain a plurality of encrypted nodes; The instant messaging data of the protocol group chat is encrypted and transmitted according to the multiple encryption nodes.
6. An instant messaging data encryption transmission system, characterized in that: include: A first acquisition module is used to acquire data transmission information of instant messaging, wherein the data transmission information includes communication data information and instant messaging hardware device information; a second acquisition module, configured to acquire a transmission data stream according to the communication data information, divide the transmission data stream into a plurality of encryption units of fixed size, acquire corresponding encryption unit preambles according to the plurality of encryption units, and generate a plurality of hash values from the plurality of encryption unit preambles based on hash encryption; The second acquisition module includes: A first acquiring unit is configured to convert the communication data information into a standardized binary stream based on TLV encoding conversion to obtain a binary data stream, and define the binary data stream as a transmission data stream; a segmentation unit, configured to segment the transmission data stream into a plurality of encryption units of fixed size according to a preset fixed length; a second obtaining unit, configured to disassemble the plurality of encryption units according to standard fields to obtain a plurality of encryption unit preambles; a generating unit, configured to generate a genesis block from a plurality of the encryption unit preambles based on hash encryption, and to chain-bind the genesis blocks to obtain a plurality of hash secret values, wherein the chain-binding is to concatenate the genesis blocks into an irreversible chain structure based on a forward hash dependency; a third acquisition module, configured to acquire user fingerprint information and environmental sensor information according to the instant messaging hardware device information, and acquire a gyroscope angular velocity change rate and an instantaneous gradient of ambient light intensity according to the environmental sensor information; A generation module, configured to generate a dynamic random entropy value seed based on the user fingerprint information, the gyroscope angular velocity change rate, and the instantaneous gradient of ambient light intensity; An exchange module is used to perform key exchange on the multiple hash values and dynamic random entropy value seeds based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm to obtain a double-encrypted transmission data key; The transmission module is used to encrypt and transmit instant messaging data based on a double-encrypted transmission data key.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Secure communication protocol method and system based on microchip fingerprint technology
CN119011137A