Data encryption and decryption method and system based on multiple encryption modes of WAPI

By employing multiple encryption methods and keystream data processing in WAPI, the issue of insufficient security in the CTR mode of WAPI 2.0 was resolved, thereby improving the security and efficiency of data transmission for video network devices.

CN121567896APending Publication Date: 2026-02-24BEIJING HUITONG JINCAI INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511823152.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-05
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

The CTR mode in WAPI 2.0 has security issues, which affects the data transmission security of video networking devices in video conferencing and video telephony.

Method used

It employs multiple encryption methods based on WAPI, including session key generation for asymmetric encryption transmission of symmetric keys and key updates at preset intervals, combined with OFB mode, CFB mode, CBC mode and XTS mode, to perform symmetric encryption processing on audio and video data through key stream data.

Benefits of technology

It improves the security and efficiency of data transmission, reduces data transmission time, and enhances the security of symmetric encryption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121567896A_ABST
    Figure CN121567896A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data encryption and decryption method and system based on multiple encryption modes of WAPI. The method comprises the following steps: acquiring audio and video data; adding random noise to the audio and video data to obtain target audio and video data; analyzing the target audio and video data to obtain an analysis result; under the condition that the analysis result represents that the secret key and the cache data are updated, obtaining a session secret key at the current moment, generating secret key stream data based on the session secret key at the current moment, and caching the target audio and video data to obtain target cache audio and video data; and through the key stream data, performing symmetric encryption processing on the target cached audio and video data to obtain target encrypted audio and video data, and sending the target encrypted audio and video data to the target device, so that the target device decrypts the target encrypted audio and video data to obtain target decrypted audio data. According to the scheme, the security of data transmission can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, specifically to a data encryption and decryption method and system based on multiple WAPI encryption methods. Background Technology

[0002] Because video networking technology enables real-time transmission of high-definition audio and video across the entire network, it is increasingly being used in various large-scale conferences. Video networking has also gained widespread praise from users for its excellent high-definition video interaction technology, security, and high reliability. During live video conferencing, video calls, and other broadcasts, the audio and video data transmitted by video networking devices undergoes complex encryption and decryption processes before being transmitted to the external network to ensure that the audio and video data meets the security requirements of full or partial encryption and decryption.

[0003] To address the need for communication security, we proposed WAPI, a wireless LAN security protocol with independent intellectual property rights. This protocol can effectively solve the problem of secure communication in wireless LANs. However, in WAPI 2.0, encryption and decryption use CTR mode, which has inherent security limitations. Summary of the Invention

[0004] This application aims to provide a data encryption and decryption method and system based on multiple WAPI encryption methods, which can improve the security of data transmission.

[0005] The technical solution of this application is implemented as follows: In a first aspect, embodiments of this application provide a data encryption / decryption method based on multiple WAPI encryption methods, the method comprising: Acquire audio and video data; and add random noise to the audio and video data to obtain target audio and video data; The target audio and video data is parsed to obtain a parsing result; if the parsing result indicates that the key and cached data are updated, the session key at the current moment is obtained, and key stream data is generated based on the session key at the current moment. At the same time, the target audio and video data is cached to obtain target cached audio and video data; wherein, the session key at the current moment indicates that the key is obtained by transmitting the symmetric key through asymmetric encryption. The target cached audio and video data is symmetrically encrypted using the key stream data to obtain target encrypted audio and video data, which is then sent to the target device so that the target device can decrypt the target encrypted audio and video data to obtain target decrypted audio data.

[0006] In the above scheme, before obtaining the session key at the current moment by parsing the target audio and video data to obtain the parsing result, and when the parsing result represents the update key and cached data, the method further includes: Based on the WAPI network, during the initial network access, the client and the access point generate a master key and a session key through a key negotiation process; The master key is stored in the hardware security module, and the session key is periodically updated according to a preset periodic time to obtain the updated session key. Based on the current time corresponding to the target audio and video data, obtain the session key for the current time.

[0007] In the above scheme, the step of periodically updating the session key according to a preset time interval to obtain the updated session key includes: The timestamp is determined based on the preset period and the current time. The session key is updated according to the preset periodic time and the timestamp to obtain the updated session key; wherein the timestamp is used as a random number to perturb the session key.

[0008] In the above scheme, generating key stream data based on the session key at the current moment includes: Initial key stream data is generated by combining a random number with the session key at the current moment using at least one of OFB, CFB, CBC, and XTS modes. Complementary sequences are generated by combining Logistic mapping and sinusoidal chaotic mapping. The initial keystream data is alternately encrypted using the complementary sequence to obtain the keystream data.

[0009] In the above scheme, the step of performing symmetric encryption on the target cached audio and video data using the key stream data to obtain encrypted audio and video data includes: If the target cached audio and video data is located in the target data cache area, the format of the cached audio and video data is converted into the target format corresponding to the key stream data to obtain the target data cached audio data; wherein, the target data cache area is a cache area where data is cached according to the principle of data entering the cache area first leaving the cache area; The key stream data is combined with the target cached audio and video data and symmetric encryption is performed to obtain the target encrypted audio and video data.

[0010] In the above scheme, the step of combining the key stream data with the target cached audio and video data for symmetric encryption to obtain the target encrypted audio and video data includes: Based on the encryption type of the key stream data, the encryption method corresponding to the target cached audio and video data is determined from OFB mode, CFB mode, CBC mode and XTS mode; Based on the encryption methods corresponding to the key stream data and the target cached audio and video data, the target cached audio and video data is subjected to symmetric encryption to obtain the target encrypted audio and video data.

[0011] The method in the above scheme further includes: Determine the chaotic sequence to be used to generate the key; A dynamic key is obtained by interactively processing the target audio and video data and the chaotic sequence. The key stream data is generated using the dynamic key; and the target cached audio and video data is encrypted using the key stream data to obtain the target encrypted audio and video data.

[0012] Secondly, embodiments of this application provide a data encryption / decryption system based on multiple WAPI encryption methods. The system includes an acquisition module, a caching module, and an encryption module. The acquisition module is used to acquire audio and video data; and add random noise to the audio and video data to obtain target audio and video data; The caching module is used to parse the target audio and video data to obtain a parsing result; when the parsing result represents an update key and cached data, it obtains the session key at the current moment, generates key stream data based on the session key at the current moment, and caches the target audio and video data to obtain target cached audio and video data; wherein, the session key at the current moment represents a key obtained by transmitting a symmetric key through asymmetric encryption; The encryption module is used to perform symmetric encryption on the target cached audio and video data using the key stream data to obtain target encrypted audio and video data, and send the target encrypted audio and video data to the target device so that the target device can decrypt the target encrypted audio and video data to obtain target decrypted audio data.

[0013] Thirdly, embodiments of this application provide a data encryption / decryption device based on multiple WAPI encryption methods, comprising: a processor and a memory; wherein, The memory is used to store computer programs; The processor is configured to call and run the computer program from the memory to perform the method as described in the first aspect.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium storing executable instructions for causing a processor to perform the method described in the first aspect.

[0015] This application provides a data encryption and decryption method and system based on multiple WAPI encryption methods. The method includes: acquiring audio and video data; adding random noise to the audio and video data to obtain target audio and video data; parsing the target audio and video data to obtain a parsing result; acquiring the session key at the current moment when the parsing result represents an updated key and cached data, generating key stream data based on the session key at the current moment, and simultaneously caching the target audio and video data to obtain target cached audio and video data; wherein, the session key at the current moment represents a key obtained by transmitting a symmetric key through asymmetric encryption; performing symmetric encryption processing on the target cached audio and video data using the key stream data to obtain target encrypted audio and video data, and sending the target encrypted audio and video data to a target device so that the target device can decrypt the target encrypted audio and video data to obtain target decrypted audio data. In the above scheme, key stream data is generated based on the session key at the current moment, and the target audio and video data is cached to obtain the target cached audio and video data, which can reduce the data transmission time. In addition, since the session key at the current moment is obtained by transmitting the symmetric key through asymmetric encryption, and the target cached audio and video data is processed by symmetric encryption, the use of asymmetric encryption to transmit the session key and symmetric encryption to process the data can improve the security of data transmission. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application. Obviously, the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0017] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily need to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0018] Figure 1 This is an optional flowchart illustrating a data encryption / decryption method based on multiple WAPI encryption methods provided in an embodiment of this application. Figure 2A schematic diagram of the structure of a data encryption and decryption system based on multiple WAPI encryption methods provided in this application embodiment; Figure 3 This is a schematic diagram of the structure of a data encryption and decryption device based on multiple encryption methods of WAPI, provided in an embodiment of this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the specific technical solutions of this application will be further described in detail below with reference to the accompanying drawings of the embodiments of this application. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application.

[0020] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used in this application is for the purpose of describing embodiments of this application only and is not intended to be limiting of this application.

[0021] In the following description, references to "some embodiments," "this embodiment," "this application embodiment," and examples, etc., describe a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same subset or different subset of all possible embodiments and may be combined with each other without conflict.

[0022] If the application documents contain similar descriptions such as "first / second", the following explanation shall be added: In the following description, the terms "first / second / third" are used only to distinguish similar objects and do not represent a specific order of objects. It is understood that "first / second / third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0023] This application provides a data encryption and decryption method based on multiple WAPI encryption methods. Figure 1 This is an optional flowchart illustrating a data encryption / decryption method based on multiple WAPI encryption methods provided in an embodiment of this application. Figure 1 The steps shown are explained.

[0024] S101. Acquire audio and video data; and add random noise to the audio and video data to obtain the target audio and video data.

[0025] In some embodiments of this application, audio and video data refers to a digitized collection of sound (audio) and image (video) information used for storing or transmitting media content. Specifically, it is divided into: Audio data: Represents the waveform information of sound. The original format is such as PCM (Pulse Code Modulation), which converts analog sound into digital signals through sampling and quantization. Common encoding formats include MP3 or G.711, which are widely used in music or telephone scenarios.

[0026] Video data: Represents a continuous sequence of image frames, in raw formats such as RGB (red, green, and blue primary colors) or YUV (luminance and chrominance separated), forming dynamic images through pixel combination. For example, an MP4 file contains decoded YUV data that can be directly used for display.

[0027] In some embodiments of this application, audio and video data are acquired by collecting audio and video data using an audio and video acquisition device; and random noise is added to the audio and video data to obtain the target audio and video data. S102. Parse the target audio and video data to obtain the parsing result; if the parsing result represents the updated key and cached data, obtain the session key at the current moment, and generate key stream data based on the session key at the current moment, while caching the target audio and video data to obtain the target cached audio and video data; wherein, the session key at the current moment represents the key obtained by transmitting the symmetric key through asymmetric encryption.

[0028] In some embodiments of this application, the target audio and video data is parsed to obtain a parsing result; if the parsing result represents the update key and cached data, the session key at the current moment is obtained, and initial key stream data is generated by combining a random number and the session key at the current moment with at least one of OFB mode, CFB mode, CBC mode and XTS mode; a complementary sequence is generated by using Logistic mapping and sinusoidal chaotic mapping; the initial key stream data is alternately encrypted using the complementary sequence to obtain key stream data.

[0029] In some embodiments of this application, OFB mode (Output Feedback mode) is used. The principle is to use the output of the encryption function as feedback input to generate a keystream that is XORed with the plaintext.

[0030] In some embodiments of this application, the following modes are used: CFB (Cipher Feedback) mode: The principle is to use the preceding ciphertext block as encryption input, generate a key stream, and XOR it with the plaintext. CBC (Cipher Block Chaining) mode: The principle is to XOR the plaintext block with the preceding ciphertext block before encryption. XTS (X-Switched Block Encryption) mode: The principle is based on the XEX algorithm, introducing a Tweak value to achieve block independence.

[0031] S103. Using the key stream data, the target cached audio and video data is symmetrically encrypted to obtain the target encrypted audio and video data, and the target encrypted audio and video data is sent to the target device so that the target device can decrypt the target encrypted audio and video data to obtain the target decrypted audio data.

[0032] In some embodiments of this application, key stream data is generated by combining OFB mode with random numbers; the key stream data is stored, and the target audio and video data is cached to obtain target cached audio and video data.

[0033] In some embodiments of this application, when the parsing result represents the update key and cached data, the target cached audio and video data is encrypted using at least one of OFB mode, CFB mode, CBC mode, and XTS mode to obtain target encrypted audio and video data. The target encrypted audio and video data is then sent to the target device so that the target device can decrypt the target encrypted audio and video data to obtain target decrypted audio data.

[0034] In some embodiments of this application, based on the encryption type of the key stream data, the encryption method corresponding to the target cached audio and video data is determined from OFB mode, CFB mode, CBC mode and XTS mode; based on the key stream data and the encryption method corresponding to the target cached audio and video data, symmetric encryption processing is performed on the target cached audio and video data to obtain the target encrypted audio and video data.

[0035] The initial keystream data is alternately encrypted using complementary sequences generated by Logistic mapping and sinusoidal chaotic mapping to obtain the final keystream data. Based on the encryption type of the keystream data, the encryption method corresponding to the target cached audio and video data is determined from OFB, CFB, CBC, and XTS modes, i.e., the mode corresponding to the initial keystream data is determined. Based on the encryption methods corresponding to the keystream data and the target cached audio and video data, symmetric encryption and decryption are performed on the target cached audio and video data to obtain the target encrypted audio and video data.

[0036] It is understandable that generating keystream data based on the current session key and caching the target audio and video data to obtain the target cached audio and video data can reduce data transmission time. In addition, since the current session key is obtained by transmitting the symmetric key through asymmetric encryption, and the target cached audio and video data is symmetrically encrypted, the use of asymmetric encryption for transmitting the session key and symmetric encryption for data transmission can improve the security of data transmission.

[0037] In some embodiments of this application, the generation of key stream data based on the session key at the current time in S102 can be implemented through S201-S203, as follows: S201. Generate initial key stream data by combining a random number and the session key at the current time through at least one of OFB mode, CFB mode, CBC mode and XTS mode.

[0038] For example, the session key at the current moment is obtained, and initial keystream data is generated by combining a random number with the session key at the current moment using at least one of the following modes: OFB, CFB, CBC, and XTS. For instance, a first initial keystream data is generated using OFB mode, combining a random number with the session key at the current moment; a second initial keystream data is generated using CFB mode, combining a random number with the session key at the current moment; a third initial keystream data is generated using CBC mode, combining a random number with the session key at the current moment; and a fourth initial keystream data is generated using XTS mode, combining a random number with the session key at the current moment. The first, second, third, and fourth initial keystream data are all initial keystream data.

[0039] It should be noted that a fifth or sixth initial key stream data can also be generated based on two or three of the OFB, CFB, CBC, and XTS modes. The fifth or sixth initial key stream data is also initial key stream data.

[0040] S202. Generate complementary sequences through Logistic mapping and sinusoidal chaotic mapping.

[0041] In some embodiments of this application, a chaotic sequence is generated by using Logistic mapping and sinusoidal chaotic mapping; the chaotic sequence is then converted using DNA encoding to obtain a complementary sequence.

[0042] It should be noted that DNA coding conversion quantizes the values ​​of chaotic sequences into integers from 0 to 3, corresponding to A / T / C / G bases, and then generates complementary strands, i.e., complementary sequences, according to biological complementarity rules.

[0043] S203. The initial key stream data is alternately encrypted using complementary sequences to obtain the key stream data.

[0044] In some embodiments of this application, a first sequence value and a second sequence value of a complementary sequence of initial keystream data are determined; a time series value is acquired every 30 seconds according to the acquisition time of the target audio and video data; an encryption node is selected from the second sequence value using the time series value; and the corresponding sequence value in the first sequence value of the initial keystream data is encrypted using the selected encryption node to obtain the keystream data.

[0045] In some embodiments of this application, by selecting the encryption node of the second sequence value, the sequence value corresponding to the encryption node of the second sequence value is selected from the first sequence value of the initial key stream data, so that only a part of the key stream data of the initial key stream data is encrypted to obtain the key stream data.

[0046] It should be noted that, in addition to obtaining time series values ​​every 30 seconds according to the acquisition time of the target audio and video data, time series values ​​can also be formed by randomly selecting multiple time nodes according to the acquisition time of the target audio and video data; or, multiple time nodes can be selected according to an incremental function according to the acquisition time of the target audio and video data to form time series values. This application does not specifically limit the embodiments in this regard.

[0047] In some embodiments of this application, S104-S106 are executed before S102, as follows: S104. Based on the WAPI network, during the initial network access, the client and the access point generate a master key and a session key through a key negotiation process.

[0048] S105. Store the master key in the hardware security module and update the session key periodically according to the preset cycle time to obtain the updated session key.

[0049] In some embodiments of this application, a timestamp is determined based on a preset period and the current time; the session key is updated according to the preset period and the timestamp to obtain the updated session key; wherein, the timestamp is used as a random number to perturb the session key.

[0050] For example, the preset period can be 1 hour. The preset period is added to the current time to obtain a timestamp. The timestamp is then used as a random number to update the session key according to the preset period, resulting in the updated session key.

[0051] S106. Based on the current time corresponding to the target audio and video data, obtain the session key for the current time.

[0052] In some embodiments of this application, the data encryption and decryption method based on multiple WAPI encryption methods further includes: Determine the chaotic sequence to be used to generate the key; A dynamic key is obtained by interactively processing the target audio and video data and the chaotic sequence. A key stream is generated using a dynamic key; the target cached audio and video data is then encrypted using the key stream data to obtain the target encrypted audio and video data.

[0053] For example, a chaotic sequence for generating the key and an audio / video sequence of the target audio / video data are determined; data from the same nodes in the chaotic sequence and the audio / video sequence are extracted and processed interactively to obtain a dynamic key. Keystream data is generated using the dynamic key; and the target cached audio / video data is encrypted using the keystream data to obtain the target encrypted audio / video data.

[0054] Understandably, the security of data transmission can be improved because the OFB mode or at least one of the CFB, CBC, and XTS modes used is more secure than the existing CTR mode.

[0055] Based on the data encryption and decryption method using multiple WAPI encryption methods described in the above embodiments, this application also provides a data encryption and decryption system based on multiple WAPI encryption methods, such as... Figure 2 As shown, Figure 2 This application provides a schematic diagram of the structure of a data encryption and decryption system based on multiple WAPI encryption methods. The data encryption and decryption system 2 based on multiple WAPI encryption methods includes: an acquisition module 201, a caching module 202, and an encryption module 203. The acquisition module 201 is used to acquire audio and video data; and add random noise to the audio and video data to obtain target audio and video data; The caching module 202 is used to parse the target audio and video data to obtain a parsing result; when the parsing result represents an update key and cached data, it obtains the session key at the current moment, generates key stream data based on the session key at the current moment, and caches the target audio and video data to obtain target cached audio and video data; wherein, the session key at the current moment represents a key obtained by transmitting a symmetric key through asymmetric encryption; The encryption module 203 is used to perform symmetric encryption on the target cached audio and video data using the key stream data to obtain target encrypted audio and video data, and send the target encrypted audio and video data to the target device so that the target device can decrypt the target encrypted audio and video data to obtain target decrypted audio data.

[0056] In some embodiments of this application, the acquisition module 201 is further configured to: parse the target audio and video data to obtain a parsing result; if the parsing result represents an update key and cached data, before obtaining the session key at the current time, based on the WAPI network, during initial network access, the client and access point generate a master key and a session key through a key negotiation process; store the master key in a hardware security module, and periodically update the session key according to a preset periodic time to obtain an updated session key; and obtain the session key at the current time based on the current time corresponding to the target audio and video data.

[0057] In some embodiments of this application, the data encryption / decryption system 2 based on multiple WAPI encryption methods further includes: a determination module 204; wherein... The determining module 204 is used to determine a timestamp based on the preset period time and the current time; and to update the session key according to the preset period time and the timestamp to obtain the updated session key; wherein the timestamp is used as a random number to perturb the session key.

[0058] In some embodiments of this application, the acquisition module 201 is further configured to generate initial keystream data by combining a random number and the session key at the current time with at least one of the OFB mode, CFB mode, CBC mode and XTS mode; generate a complementary sequence by using a Logistic mapping and a sinusoidal chaotic mapping; and alternately encrypt the initial keystream data using the complementary sequence to obtain the keystream data.

[0059] In some embodiments of this application, the encryption / decryption module 203 is further configured to, if the target cached audio / video data is located in the target data cache area, convert the format of the cached audio / video data into the target format corresponding to the key stream data to obtain target data cached audio data; wherein, the target data cache area is a cache area where data is cached according to the principle of data entering the cache area first leaving the cache area; and to perform symmetric encryption processing on the key stream data and the target cached audio / video data to obtain the target encrypted audio / video data.

[0060] In some embodiments of this application, the encryption / decryption module 203 is further configured to determine the encryption method corresponding to the target cached audio / video data from OFB mode, CFB mode, CBC mode and XTS mode based on the encryption type of the key stream data; and to perform symmetric encryption processing on the target cached audio / video data based on the key stream data and the encryption method corresponding to the target cached audio / video data to obtain the target encrypted audio / video data.

[0061] In some embodiments of this application, the determining module 204 is further configured to determine a chaotic sequence for generating the key; The acquisition module 201 is further configured to perform interactive processing based on the target audio and video data and the chaotic sequence to obtain a dynamic key; The encryption / decryption module 203 is further configured to generate the key stream data using the dynamic key; and to encrypt the target cached audio / video data using the key stream data to obtain the target encrypted audio / video data.

[0062] Based on the data encryption and decryption method using multiple WAPI encryption methods described in the above embodiments, this application also provides a data encryption and decryption device based on multiple WAPI encryption methods, such as... Figure 3 As shown, Figure 3 This is a schematic diagram of a data encryption / decryption device based on multiple WAPI encryption methods provided in an embodiment of this application. The data encryption / decryption device 3 based on multiple WAPI encryption methods includes a processor 301 and a memory 302. The memory 302 is used to store a computer program; the processor 301 is used to call and run the computer program from the memory to execute the data encryption / decryption method based on multiple WAPI encryption methods as described in the above embodiment.

[0063] In the embodiments of this application, the processor 301 described above can be at least one of the following: Application-Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that for different devices, the electronic device used to implement the above processor function can also be other types, and the embodiments of this application do not specifically limit it.

[0064] This application provides a computer-readable storage medium storing a computer program for implementing, when executed by a processor, a data encryption / decryption method based on multiple WAPI encryption methods as described in any of the above embodiments.

[0065] For example, the program instructions corresponding to a data encryption and decryption method based on multiple WAPI encryption methods in this embodiment can be stored on storage media such as optical discs, hard disks, and USB flash drives. When the program instructions corresponding to a data encryption and decryption method based on multiple WAPI encryption methods in the storage media are read or executed by an electronic device, the data encryption and decryption method based on multiple WAPI encryption methods as described in any of the above embodiments can be implemented.

[0066] Furthermore, in the embodiments of this application, the functional modules can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional module.

[0067] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the method of this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0068] It should be understood that the phrases "one embodiment," "an embodiment," or "some embodiments" mentioned throughout the specification mean that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment," "in one embodiment," or "in some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the embodiments in this application are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. The descriptions of the various embodiments above tend to emphasize the differences between the various embodiments; their similarities or commonalities can be referred to mutually, and for the sake of brevity, these will not be repeated here.

[0069] The modules described above as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules. They may be located in one place or distributed across multiple network units. Some or all of the modules may be selected to achieve the purpose of this embodiment according to actual needs.

[0070] In addition, each functional module in the various embodiments of this application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the integrated modules can be implemented in hardware or in the form of hardware plus software functional units.

[0071] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.

[0072] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0073] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0074] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0075] The above description is merely an embodiment of this application, but the protection scope of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.

Claims

1. A data encryption and decryption method based on multiple WAPI encryption methods, characterized in that, The method includes: Acquire audio and video data; and add random noise to the audio and video data to obtain target audio and video data; The target audio and video data is parsed to obtain a parsing result; if the parsing result indicates that the key and cached data are updated, the session key at the current moment is obtained, and key stream data is generated based on the session key at the current moment. At the same time, the target audio and video data is cached to obtain target cached audio and video data; wherein, the session key at the current moment indicates that the key is obtained by transmitting the symmetric key through asymmetric encryption. The target cached audio and video data is symmetrically encrypted using the key stream data to obtain target encrypted audio and video data, which is then sent to the target device so that the target device can decrypt the target encrypted audio and video data to obtain target decrypted audio data.

2. The method according to claim 1, characterized in that, The method further includes parsing the target audio and video data to obtain a parsing result; and before obtaining the session key at the current moment, assuming the parsing result represents the update key and cached data: Based on the WAPI network, during the initial network access, the client and the access point generate a master key and a session key through a key negotiation process; The master key is stored in the hardware security module, and the session key is periodically updated according to a preset periodic time to obtain the updated session key. Based on the current time corresponding to the target audio and video data, obtain the session key for the current time.

3. The method according to claim 2, characterized in that, The step of periodically updating the session key according to a preset time interval to obtain the updated session key includes: The timestamp is determined based on the preset period and the current time. The session key is updated according to the preset periodic time and the timestamp to obtain the updated session key; wherein the timestamp is used as a random number to perturb the session key.

4. The method according to claim 1, characterized in that, The generation of key stream data based on the session key at the current moment includes: Initial key stream data is generated by combining a random number with the session key at the current moment using at least one of OFB, CFB, CBC, and XTS modes. Complementary sequences are generated by combining Logistic mapping and sinusoidal chaotic mapping. The initial keystream data is alternately encrypted using the complementary sequence to obtain the keystream data.

5. The method according to claim 1, characterized in that, The step of performing symmetric encryption on the target cached audio and video data using the key stream data to obtain the target encrypted audio and video data includes: If the target cached audio and video data is located in the target data cache area, the format of the cached audio and video data is converted into the target format corresponding to the key stream data to obtain the target data cached audio data; wherein, the target data cache area is a cache area where data is cached according to the principle of data entering the cache area first leaving the cache area; The key stream data is combined with the target cached audio and video data and symmetric encryption is performed to obtain the target encrypted audio and video data.

6. The method according to claim 5, characterized in that, The step of combining the keystream data with the target cached audio and video data for symmetric encryption to obtain the target encrypted audio and video data includes: Based on the encryption type of the key stream data, the encryption method corresponding to the target cached audio and video data is determined from OFB mode, CFB mode, CBC mode and XTS mode; Based on the encryption methods corresponding to the key stream data and the target cached audio and video data, the target cached audio and video data is subjected to symmetric encryption to obtain the target encrypted audio and video data.

7. The method according to claim 1, characterized in that, The method further includes: Determine the chaotic sequence to be used to generate the key; A dynamic key is obtained by interactively processing the target audio and video data and the chaotic sequence. The key stream data is generated using the dynamic key; and the target cached audio and video data is encrypted using the key stream data to obtain the target encrypted audio and video data.

8. A data encryption and decryption system based on multiple WAPI encryption methods, characterized in that, The data encryption and decryption system based on multiple WAPI encryption methods includes: an acquisition module, a caching module, and an encryption module, wherein... The acquisition module is used to acquire audio and video data; and add random noise to the audio and video data to obtain target audio and video data; The caching module is used to parse the target audio and video data to obtain a parsing result; when the parsing result represents an update key and cached data, it obtains the session key at the current moment, generates key stream data based on the session key at the current moment, and caches the target audio and video data to obtain target cached audio and video data; wherein, the session key at the current moment represents a key obtained by transmitting a symmetric key through asymmetric encryption; The encryption module is used to perform symmetric encryption on the target cached audio and video data using the key stream data to obtain target encrypted audio and video data, and send the target encrypted audio and video data to the target device so that the target device can decrypt the target encrypted audio and video data to obtain target decrypted audio data.

9. A data encryption / decryption device based on multiple WAPI encryption methods, characterized in that, include: Processor and memory, of which, The memory is used to store computer programs; The processor is configured to call and run the computer program from the memory to perform the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores executable instructions for causing a processor to execute, thereby implementing the method of any one of claims 1 to 7.