Audio encryption method and system based on multiple symmetric encryption
By segmenting and mapping the audio waveforms, a symmetric encryption function is constructed, and the audio binary data is mapped into the virtual image, solving the problems of cumbersome encryption process and large computing resources occupancy, and achieving efficient encryption and decryption processes.
Patent Information
- Application Number
- CN202411329095.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-09-24
AI Technical Summary
The existing audio encryption method has cumbersome encryption processes, occupying large computing resources, and the decryption and encryption processes are inefficient.
The audio encryption method based on multiple symmetric encryption is adopted. By segmenting the waveform of the audio, the waveform function is generated, and converting it into binary form, a symmetric encryption function is constructed, and the audio binary data is mapped into the virtual image to generate audio encrypted data.
The encryption and decryption process is simplified, the computing resource occupation is reduced, the encryption and decryption speed is accelerated, and multiple encryption is carried out through the same key, avoiding mode exposure.
Smart Images

Figure CN119483910B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of audio encryption, and in particular relates to an audio encryption method and system based on multiple symmetric encryption. Background Art
[0002] Audio encryption refers to the process of encoding audio data using cryptography to protect the security and privacy of audio content. By converting the original audio signal into ciphertext, only the recipient with the correct decryption key can restore the original audio content. This encryption method is widely used in secure communications, copyright protection, and personal privacy protection, ensuring that audio data is not accessed or tampered with by unauthorized persons during transmission.
[0003] Current audio files are generally transmitted encrypted during use. The existing encryption method has a cumbersome encryption process and requires a large amount of computing resources during the decryption and encryption process. Summary of the invention
[0004] The purpose of the present invention is to provide an audio encryption method based on multiple symmetric encryption, aiming to solve the problem that the encryption process of the existing encryption method is cumbersome and requires large computing resources during the decryption and encryption process.
[0005] The present invention is implemented as follows: an audio encryption method based on multiple symmetric encryption, the method comprising:
[0006] Acquire the audio data to be encrypted, convert the audio data to be encrypted into temporary analog signal data, and segment the audio data to be encrypted based on the temporary analog signal data to obtain waveform data packets;
[0007] Sampling the waveform data packet to obtain a plurality of sampling point data, converting the sampling point data into sampling point coordinates, and generating a set of waveform functions for each waveform data packet based on the sampling point coordinates;
[0008] Convert the waveform function into binary form to obtain waveform binary data, randomly select a preset number of waveform binary data, calculate the statistical data volume, and construct a symmetric encryption function according to the data volume;
[0009] A virtual image is constructed according to the audio binary data, a character string is generated through a symmetric encryption function, and all waveform binary data are mapped into the virtual image according to the character string to obtain audio encrypted data.
[0010] Preferably, the steps of sampling the waveform data packet to obtain a plurality of sampling point data, converting the sampling point data into sampling point coordinates, and generating a set of waveform functions for each waveform data packet based on the sampling point coordinates specifically include:
[0011] The waveform data packet is sampled according to a preset sampling rate to obtain sampling point data, where the sampling point data includes the sampling point time and the audio signal strength of the sampling point;
[0012] Construct sampling point coordinates according to the sampling point data, wherein the abscissa of the sampling point coordinates is the time value of the time sampling point, and the ordinate is the audio signal strength;
[0013] The sampling point coordinates are fitted multiple times based on the preset fitting function type until the fitting accuracy meets the requirements. Each set of waveform data packets will generate a set of waveform functions.
[0014] Preferably, the steps of converting the waveform function into binary form to obtain waveform binary data, randomly selecting a preset number of waveform binary data, calculating the statistical data volume, and constructing a symmetric encryption function according to the data volume specifically include:
[0015] Converting the waveform function into binary form to obtain waveform binary data, wherein the waveform binary data at least includes the waveform function, an independent variable interval, and a terminator;
[0016] Randomly select a preset number of waveform binary data, perform data volume statistics on the waveform binary data, and construct a data volume coordinate, wherein the abscissa of the data volume coordinate is the extraction number and the ordinate is the data volume of the waveform binary data;
[0017] The data volume coordinates are fitted according to the preset function fitting method to obtain a symmetric encryption function.
[0018] Preferably, the step of constructing a virtual image according to the audio binary data, generating a character string through a symmetric encryption function, and mapping all waveform binary data into the virtual image according to the character string to obtain the audio encrypted data specifically includes:
[0019] Counting the number of binary characters in the audio binary data, and constructing a set of virtual images, wherein the number of virtual pixels contained in the virtual images is greater than the number of binary characters;
[0020] Import the preset decimal data set into the symmetric encryption function, generate the calculated value through the symmetric encryption function, and form a string;
[0021] The waveform binary data are mapped into virtual images one by one according to a preset mapping relationship, and the virtual images are used as audio encryption data to generate a key, wherein the key is a symmetric encryption function and the number of encryptions.
[0022] Preferably, the step of converting the audio data to be encrypted into temporary analog signal data, segmenting the audio data to be encrypted based on the temporary analog signal data, and obtaining a waveform data packet specifically includes: reading the audio data to be encrypted, performing weight assignment, voltage conversion and filtering output on the encrypted audio data to obtain temporary analog signal data, converting the temporary analog signal data into an audio waveform graph, calculating the slope of each point in the audio waveform graph, dividing the waveform graph into multiple waveform intervals according to the slope, each waveform interval containing a peak or a trough, and segmenting the audio data to be encrypted according to the time interval of the waveform interval to obtain a waveform data packet.
[0023] Another object of the present invention is to provide an audio encryption system based on multiple symmetric encryption, the system comprising:
[0024] An audio segmentation module is used to obtain audio data to be encrypted, convert the audio data to be encrypted into temporary analog signal data, and segment the audio data to be encrypted based on the temporary analog signal data to obtain waveform data packets;
[0025] A waveform function generation module is used to sample the waveform data packet to obtain a plurality of sampling point data, convert the sampling point data into sampling point coordinates, and generate a set of waveform functions for each waveform data packet based on the sampling point coordinates;
[0026] An encryption function generation module is used to convert the waveform function into binary form to obtain waveform binary data, randomly select a preset number of waveform binary data, calculate the statistical data volume, and construct a symmetric encryption function according to the data volume;
[0027] The multiple encryption module is used to construct a virtual image according to the audio binary data, generate a character string through a symmetric encryption function, map all waveform binary data into the virtual image according to the character string, and obtain the audio encrypted data.
[0028] Preferably, the waveform function generating module includes:
[0029] The waveform unit is used to sample the waveform data packet according to a preset sampling rate to obtain sampling point data, wherein the sampling point data includes the sampling point time and the audio signal strength of the sampling point;
[0030] A sampling coordinate construction unit, used to construct sampling point coordinates according to the sampling point data, wherein the abscissa of the sampling point coordinates is the time value of the time sampling point, and the ordinate is the audio signal strength;
[0031] The waveform function fitting unit is used to perform multiple fittings on the sampling point coordinates based on a preset fitting function type until the fitting accuracy meets the requirements. Each set of waveform data packets will generate a set of waveform functions.
[0032] Preferably, the encryption function generation module includes:
[0033] A data conversion unit, used for converting the waveform function into binary form to obtain waveform binary data, wherein the waveform binary data at least includes the waveform function, an independent variable interval and a terminator;
[0034] A data volume statistics unit is used to randomly select a preset number of waveform binary data, perform data volume statistics on the waveform binary data, and construct a data volume coordinate, wherein the abscissa of the data volume coordinate is the extraction number and the ordinate is the data volume of the waveform binary data;
[0035] The encryption function fitting unit is used to fit the data volume coordinates according to a preset function fitting method to obtain a symmetric encryption function.
[0036] Preferably, the multiple encryption module comprises:
[0037] A virtual image generation unit, used for counting the number of binary characters in the audio binary data, and constructing a set of virtual images, wherein the number of virtual pixels contained in the virtual images is greater than the number of binary characters;
[0038] A character string generation unit, used for importing a preset decimal data set into a symmetric encryption function, generating a calculated value through the symmetric encryption function to form a character string;
[0039] The audio encryption unit is used to map the waveform binary data into the virtual image one by one according to the preset mapping relationship, use the virtual image as the audio encryption data, and generate a key, wherein the key is a symmetric encryption function and the number of encryptions.
[0040] Preferably, the step of converting the audio data to be encrypted into temporary analog signal data, segmenting the audio data to be encrypted based on the temporary analog signal data, and obtaining a waveform data packet specifically includes: reading the audio data to be encrypted, performing weight assignment, voltage conversion and filtering output on the encrypted audio data to obtain temporary analog signal data, converting the temporary analog signal data into an audio waveform graph, calculating the slope of each point in the audio waveform graph, dividing the waveform graph into multiple waveform intervals according to the slope, each waveform interval containing a peak or a trough, and segmenting the audio data to be encrypted according to the time interval of the waveform interval to obtain a waveform data packet.
[0041] The present invention provides an audio encryption method based on multiple symmetric encryption, which divides the waveform of the audio, converts the waveform into a corresponding waveform function, and maps and converts the waveform function, thereby realizing the scrambling of binary data. Data can be encrypted multiple times with one key, and the repeated encryption process is simple, occupies less computing resources, and has a faster encryption and decryption speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A flowchart of an audio encryption method based on multiple symmetric encryption provided by an embodiment of the present invention;
[0043] Figure 2 A flowchart of the steps of sampling a waveform data packet to obtain a plurality of sampling point data, converting the sampling point data into sampling point coordinates, and generating a set of waveform functions for each waveform data packet based on the sampling point coordinates provided in an embodiment of the present invention;
[0044] Figure 3 A flowchart of the steps of converting a waveform function into binary form to obtain waveform binary data, randomly selecting a preset number of waveform binary data, calculating the statistical data volume, and constructing a symmetric encryption function according to the data volume provided in an embodiment of the present invention;
[0045] Figure 4 A flowchart of the steps of constructing a virtual image according to audio binary data, generating a string through a symmetric encryption function, mapping all waveform binary data into the virtual image according to the string, and obtaining audio encrypted data provided by an embodiment of the present invention;
[0046] Figure 5 An architecture diagram of an audio encryption system based on multiple symmetric encryption provided by an embodiment of the present invention;
[0047] Figure 6 An architectural diagram of a waveform function generation module provided in an embodiment of the present invention;
[0048] Figure 7 An architectural diagram of an encryption function generation module provided in an embodiment of the present invention;
[0049] Figure 8 An architectural diagram of a multiple encryption module provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. 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.
[0051] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.
[0052] like Figure 1 FIG. 1 is a flowchart of an audio encryption method based on multiple symmetric encryption provided by an embodiment of the present invention, the method comprising:
[0053] S100, obtaining audio data to be encrypted, converting the audio data to be encrypted into temporary analog signal data, and segmenting the audio data to be encrypted based on the temporary analog signal data to obtain waveform data packets.
[0054] In this step, the audio data to be encrypted is obtained. The audio data to be encrypted is a digital signal. When playing, it needs to be converted into an analog signal. The audio data to be encrypted is read, and the encrypted audio data is weighted, voltage converted, and filtered and output. In order to divide the audio data to be encrypted, the audio data to be encrypted is converted into a low-precision analog signal by sampling at a low sampling rate, that is, temporary analog signal data. Since the low sampling rate is used for sampling, a large amount of data details will be lost, but the temporary analog signal data is not directly used for playback. It is just that the digital signal is converted into an analog signal by the above-mentioned low sampling rate method to facilitate waveform identification. The temporary analog signal data is converted into an audio waveform graph, and the slope of each point in the audio waveform graph is calculated. The waveform graph is divided into multiple waveform intervals according to the slope. Each waveform interval contains a peak or a trough. By analyzing the slope, the area between two adjacent sampling points with a slope of 0 is a peak or a trough. At this time, the time interval of these two sampling points is used as the segmentation basis to segment the encrypted audio data to obtain a waveform data packet.
[0055] S200, sampling a waveform data packet to obtain a plurality of sampling point data, converting the sampling point data into sampling point coordinates, and generating a set of waveform functions for each waveform data packet based on the sampling point coordinates.
[0056] In this step, the waveform data packet is sampled. The data recorded in the waveform data packet is the original data. The sampling is performed according to the preset sampling accuracy. High-precision sampling is adopted at this time. The data recorded by the sampling point data is the time value and the audio signal strength of the waveform at the corresponding moment. Then, multiple sets of sampling point coordinates will be obtained. The horizontal coordinate of the sampling point coordinate is the time value, and the vertical coordinate is the audio signal strength corresponding to the time value. Subsequently, function fitting is performed to obtain the waveform function of the current peak or trough. By controlling the fitting accuracy, high-precision conversion of the data can be achieved. After determining the sampling step size, start time and waveform function, the data contained in the waveform data packet can be restored.
[0057] S300, converting the waveform function into binary form to obtain waveform binary data, randomly selecting a preset number of waveform binary data, calculating the statistical data volume, and constructing a symmetric encryption function according to the data volume.
[0058] In this step, the waveform function is converted into binary form, that is, the waveform function is represented by binary data, such as the waveform function, the independent variable interval of the waveform function and the terminator are all converted into binary data, so as to obtain waveform binary data. Since there are multiple waveform data packets, multiple waveform binary data will be generated accordingly. Since the data content contained in each waveform data packet is different, the size of the waveform binary data is also different. A preset number of waveform binary data are randomly selected for statistics to determine the amount of data contained in the waveform binary data, and a data amount coordinate is constructed accordingly. The horizontal coordinate of the data amount coordinate is the extraction number, and the vertical coordinate is the data amount of the waveform binary data. Function fitting is performed with a preset function type to obtain a symmetric encryption function.
[0059] S400, constructing a virtual image according to the audio binary data, generating a character string through a symmetric encryption function, mapping all waveform binary data into the virtual image according to the character string, and obtaining audio encrypted data.
[0060] In this step, a virtual image is constructed according to the audio binary data. The virtual image contains a large number of virtual pixels. The colors of the virtual pixels are all unfilled and are in a blank state. A continuous calculation value is generated by a symmetric encryption function. The calculation value is used as a character string. According to the preset mapping rules, the binary characters in the waveform binary data are mapped to the virtual image, so as to determine the filling order and filling value of each virtual pixel, thereby completing the filling of the virtual image. The filling process can be repeated many times. After the filling is completed, the virtual image is read according to the preset reading order to obtain audio encrypted data composed of binary data.
[0061] like Figure 2 As shown, as a preferred embodiment of the present invention, the steps of sampling the waveform data packet to obtain a plurality of sampling point data, converting the sampling point data into sampling point coordinates, and generating a set of waveform functions for each waveform data packet based on the sampling point coordinates specifically include:
[0062] S201, sampling a waveform data packet according to a preset sampling rate to obtain sampling point data, where the sampling point data includes a sampling point time and an audio signal strength at the sampling point.
[0063] S202, constructing sampling point coordinates according to the sampling point data, wherein the abscissa of the sampling point coordinates is the time value of the time sampling point, and the ordinate is the audio signal strength.
[0064] In this step, the waveform data packet is sampled according to a preset sampling rate. The highest sampling rate is the same as the original sampling rate of the audio data to be encrypted, such as 48000 Hz. By sampling, the time value of the sampling point and the corresponding audio signal strength are determined; the sampling point coordinates are constructed according to the sampling point data, and the horizontal axis of the sampling point coordinates is the time value of the time sampling point, and the vertical axis is the audio signal strength.
[0065] S203, performing multiple fittings on the sampling point coordinates based on a preset fitting function type until the fitting accuracy reaches the requirement, and each group of waveform data packets will generate a group of waveform functions.
[0066] In this step, the sampling point coordinates are fitted multiple times based on the preset fitting function type. When fitting, multiple functions are used for fitting. Specifically, fitting starts from a quadratic function, and the maximum number of fitting times is set to six times, that is, the maximum number of fitting functions obtained by fitting is 6 times. When fitting, fitting starts from a low-order function, such as fitting a quadratic function first. After the fitting is completed, an accuracy check is performed to determine whether the accuracy meets the requirements. If not, cubic function fitting is continued until the fitting accuracy meets the requirements. If the fitting function obtained by the final fitting does not meet the requirements, the data contained in the waveform data packet is directly used as the waveform binary data. Before this, it is also converted into binary. By fitting, one waveform can generate one waveform function.
[0067] like Figure 3 As shown, as a preferred embodiment of the present invention, the steps of converting the waveform function into binary form to obtain waveform binary data, randomly selecting a preset number of waveform binary data, calculating the statistical data volume, and constructing a symmetric encryption function according to the data volume specifically include:
[0068] S301, converting the waveform function into binary form to obtain waveform binary data, wherein the waveform binary data at least includes the waveform function, an independent variable interval and a terminator.
[0069] In this step, the waveform function is converted into binary form and regarded as characters, so that the characters in the waveform function can be represented by binary characters. Similarly, the independent variable interval corresponding to the waveform function and the preset terminator symbol are determined and converted into binary data.
[0070] S302, randomly selecting a preset number of waveform binary data, performing data volume statistics on the waveform binary data, and constructing a data volume coordinate, wherein the horizontal axis of the data volume coordinate is the extraction number and the vertical axis is the data volume of the waveform binary data.
[0071] In this step, a preset number of waveform binary data is randomly selected, each waveform binary data is numbered, and then a preset random function is used to generate a random number, and the waveform binary data with the corresponding number is determined according to the random number, and then the data volume of the waveform binary data is counted, and then the data volume coordinates are constructed.
[0072] S303, fitting the data volume coordinates according to a preset function fitting method to obtain a symmetric encryption function.
[0073] In this step, the data volume coordinates are fitted according to a preset function fitting method. The fitting method may be a cubic polynomial function or other forms of functions to obtain a symmetric encryption function.
[0074] like Figure 4 As shown, as a preferred embodiment of the present invention, the steps of constructing a virtual image according to audio binary data, generating a string through a symmetric encryption function, mapping all waveform binary data into the virtual image according to the string, and obtaining audio encrypted data specifically include:
[0075] S401, counting the number of binary characters in the audio binary data, and constructing a set of virtual images, wherein the number of virtual pixels included in the virtual images is greater than the number of binary characters.
[0076] In this step, the number of binary characters in all audio binary data is counted. The virtual image can be an image of N*N size, that is, the length and width are N virtual pixels. The number of binary characters is less than N*N. The length and width of the virtual image can be adjusted as long as the condition "the number of virtual pixels contained in the virtual image is greater than the number of binary characters" is met. If the pixels of the virtual image exceed N*N, they are filled with a specific color, such as pure black.
[0077] S402, importing a preset decimal data set into a symmetric encryption function, and generating a calculated value through the symmetric encryption function to form a character string.
[0078] In this step, a preset decimal data set is imported into the symmetric encryption function. The decimal data set can be a natural number, an odd number, an even number or a prime number, etc. When it is imported into the symmetric encryption function, each imported number will generate a calculated value, which is regarded as a character to obtain a large number of characters. The character combinations are concatenated to obtain a continuous string, such as 1247981274981274...
[0079] S403, mapping the waveform binary data into virtual images one by one according to a preset mapping relationship, using the virtual image as audio encryption data, and generating a key, wherein the key is a symmetric encryption function and an encryption number.
[0080] In this step, the waveform binary data is mapped to the virtual image one by one according to the preset mapping relationship, and the filling is started from the first virtual pixel in the upper left corner of the virtual image. When filling, all the audio binary data are spliced into a whole in chronological order, which is defined as a binary data collection. Binary characters are read from the binary data collection in sequence. Reading the character "0" indicates filling a first color pixel (such as red), and reading the character "1" indicates filling a second color pixel (such as white). The filling position is determined by the characters in the character string. After the first virtual pixel is filled, a character in the character string is read. If the character is an even number, it is selected from the unfilled virtual pixels. The selection order is: select the leftmost virtual pixel from the top row of unfilled virtual pixels. If the character is an odd number, it is selected from the unfilled virtual pixels. The selection order is: select from the bottom row of unfilled virtual pixels. The color of a virtual pixel on the far right is determined according to the second binary character in the binary data collection, that is, if the characters in the string are even, then filling starts from the head of the virtual image, otherwise, if the characters in the string are odd, then filling starts from the tail of the virtual image until all binary characters are read and the virtual image is filled. If multiple encryption is required, the first color pixel and the second color pixel filled this time are read from left to right and from top to bottom, and restored to binary character data. Subsequently, the string is continued to be generated through the symmetric encryption function, and the binary character data is regarded as a binary data collection for filling, so that multiple encryption can be achieved. The first color pixel and the second color pixel filled this time are read from left to right and from top to bottom, and restored to binary character data, so as to obtain audio encryption data and generate a key. The key is the symmetric encryption function and the number of encryptions.
[0081] When decrypting, according to the amount of data contained in the audio encrypted data, a virtual image of the same specification and virtual audio data of the same specification as the audio encrypted data are constructed, the initial position of each character in the virtual audio data is determined, the virtual audio data is regarded as a binary data collection, and encryption is performed according to a symmetric encryption function and the number of encryptions to obtain the virtual encrypted data, the final position of each character in the virtual encrypted data is determined, and the audio encrypted data is restored according to the starting position and the final position to obtain an unencrypted binary data collection, and the binary data collection is restored to multiple groups of waveform functions according to the terminator in the binary data collection, and a waveform data packet is obtained according to the independent variable interval of the waveform function, and the waveform data packets are spliced in chronological order to restore the audio data to be encrypted; the present invention reduces the amount of data storage by fitting the sampling points in the same peak or trough, realizes the compressed transmission of the audio data to be encrypted, and multiple encryptions can be performed using the same key without exposing the encrypted data pattern.
[0082] like Figure 5 As shown, an audio encryption system based on multiple symmetric encryption is provided in an embodiment of the present invention, and the system includes:
[0083] The audio segmentation module 100 is used to obtain the audio data to be encrypted, convert the audio data to be encrypted into temporary analog signal data, and segment the audio data to be encrypted based on the temporary analog signal data to obtain waveform data packets.
[0084] In this system, the audio segmentation module 100 obtains the audio data to be encrypted, which is a digital signal. When playing, it needs to be converted into an analog signal, read the audio data to be encrypted, perform weight distribution, voltage conversion and filtering output on the encrypted audio data, and in order to divide the audio data to be encrypted, the audio data to be encrypted is converted into a low-precision analog signal by sampling at a low sampling rate, that is, temporary analog signal data. Since the low sampling rate is used for sampling, a large amount of data details will be lost, but the temporary analog signal data is not directly used for playback. It is just to convert the digital signal into an analog signal by the above-mentioned low sampling rate method to facilitate waveform identification, convert the temporary analog signal data into an audio waveform graph, calculate the slope of each point in the audio waveform graph, and divide the waveform graph into multiple waveform intervals according to the slope. Each waveform interval contains a peak or a trough. By analyzing the slope, the area between two adjacent sampling points with a slope of 0 is a peak or a trough. At this time, the time interval of these two sampling points is used as the segmentation basis to segment the encrypted audio data to obtain a waveform data packet.
[0085] The waveform function generation module 200 is used to sample the waveform data packet to obtain a plurality of sampling point data, convert the sampling point data into sampling point coordinates, and generate a set of waveform functions for each waveform data packet based on the sampling point coordinates.
[0086] In this system, the waveform function generation module 200 samples the waveform data packet. The data recorded in the waveform data packet is the original data. The sampling is performed according to the preset sampling accuracy. At this time, high-precision sampling is adopted. The data recorded by the sampling point data is the time value and the audio signal strength of the waveform at the corresponding moment. Then, multiple sets of sampling point coordinates will be obtained. The horizontal coordinate of the sampling point coordinate is the time value, and the vertical coordinate is the audio signal strength corresponding to the time value. Subsequently, function fitting is performed to obtain the waveform function of the current peak or trough. By controlling the fitting accuracy, high-precision conversion of the data can be achieved. After determining the sampling step size, start time and waveform function, the data contained in the waveform data packet can be restored.
[0087] The encryption function generation module 300 is used to convert the waveform function into binary form, obtain waveform binary data, randomly select a preset number of waveform binary data, calculate the statistical data volume, and construct a symmetric encryption function according to the data volume.
[0088] In the present system, the encryption function generation module 300 converts the waveform function into a binary form, that is, the waveform function is represented by binary data, such as converting the waveform function, the independent variable interval of the waveform function and the terminator into binary data, thereby obtaining waveform binary data. Since there are multiple waveform data packets, multiple waveform binary data will be generated accordingly. Since the data content contained in each waveform data packet is different, the size of the waveform binary data is also different. A preset number of waveform binary data are randomly selected for statistics to determine the amount of data contained in the waveform binary data, and a data amount coordinate is constructed accordingly. The horizontal axis of the data amount coordinate is the extraction number, and the vertical axis is the data amount of the waveform binary data. Function fitting is performed with a preset function type to obtain a symmetric encryption function.
[0089] The multiple encryption module 400 is used to construct a virtual image according to the audio binary data, generate a character string through a symmetric encryption function, and map all waveform binary data into the virtual image according to the character string to obtain audio encrypted data.
[0090] In this system, the multiple encryption module 400 constructs a virtual image based on the audio binary data. The virtual image contains a large number of virtual pixels. The colors of the virtual pixels are all unfilled and are in a blank state. A continuous calculation value is generated through a symmetric encryption function. The calculation value is used as a string, and the binary characters in the waveform binary data are mapped to the virtual image according to the preset mapping rules, so as to determine the filling order and filling value of each virtual pixel, thereby completing the filling of the virtual image. The filling process can be repeated many times. After the filling is completed, the virtual image is read according to the preset reading order to obtain audio encrypted data composed of binary data.
[0091] like Figure 6 As shown, as a preferred embodiment of the present invention, the waveform function generating module 200 includes:
[0092] The waveform unit 201 is used to sample the waveform data packet at a preset sampling rate to obtain sampling point data, where the sampling point data includes the sampling point time and the audio signal strength of the sampling point.
[0093] The sampling coordinate construction unit 202 is used to construct sampling point coordinates according to the sampling point data, wherein the abscissa of the sampling point coordinates is the time value of the time sampling point, and the ordinate is the audio signal strength.
[0094] In this module, the waveform graph unit 201 samples the waveform data packet at a preset sampling rate. The highest sampling rate is the same as the original sampling rate of the audio data to be encrypted, such as 48000 Hz. By sampling, the time value of the sampling point and the corresponding audio signal strength are determined; the sampling point coordinates are constructed according to the sampling point data, and the horizontal axis of the sampling point coordinates is the time value of the time sampling point, and the vertical axis is the audio signal strength.
[0095] The waveform function fitting unit 203 is used to perform multiple fittings on the sampling point coordinates based on a preset fitting function type until the fitting accuracy reaches the requirement. Each group of waveform data packets will generate a group of waveform functions.
[0096] In this module, the waveform function fitting unit 203 performs multiple fittings on the sampling point coordinates based on the preset fitting function type. When fitting, multiple functions are used for fitting. Specifically, fitting starts from a quadratic function, and the maximum number of fitting times is set to six times, that is, the maximum number of fitting functions obtained by fitting is 6 times. When fitting, fitting starts from a low-order function, such as fitting a quadratic function first. After the fitting is completed, an accuracy check is performed to determine whether the accuracy meets the requirements. If not, cubic function fitting is continued until the fitting accuracy meets the requirements. If the fitting function finally obtained by fitting does not meet the requirements, the data contained in the waveform data packet is directly used as the waveform binary data. Before this, it is also converted into binary. By fitting, one waveform can generate a waveform function.
[0097] like Figure 7 As shown, as a preferred embodiment of the present invention, the encryption function generation module 300 includes:
[0098] The data conversion unit 301 is used to convert the waveform function into binary form to obtain waveform binary data, and the waveform binary data at least includes the waveform function, the independent variable interval and the terminator.
[0099] In this module, the data conversion unit 301 converts the waveform function into binary form and regards the waveform function as characters, so that the characters in the waveform function can be represented by binary characters. Similarly, the independent variable interval corresponding to the waveform function and the preset terminator symbol are determined and converted into binary data.
[0100] The data volume statistics unit 302 is used to randomly select a preset number of waveform binary data, perform data volume statistics on the waveform binary data, and construct a data volume coordinate, wherein the horizontal axis of the data volume coordinate is the extraction number and the vertical axis is the data volume of the waveform binary data.
[0101] In this module, the data volume statistics unit 302 randomly selects a preset number of waveform binary data, numbers each waveform binary data, and then uses a preset random function to generate a random number, determines the waveform binary data with the corresponding number according to the random number, and then counts the data volume of the waveform binary data, and then constructs the data volume coordinates.
[0102] The encryption function fitting unit 303 is used to fit the data volume coordinates according to a preset function fitting method to obtain a symmetric encryption function.
[0103] In this module, the encryption function fitting unit 303 fits the data volume coordinates according to a preset function fitting method. The fitting method may be a cubic polynomial function or other forms of functions to obtain a symmetric encryption function.
[0104] like Figure 8 As shown, as a preferred embodiment of the present invention, the multiple encryption module 400 includes:
[0105] The virtual image generation unit 401 is used to count the number of binary characters in the audio binary data and construct a set of virtual images, where the number of virtual pixels contained in the virtual images is greater than the number of binary characters.
[0106] In this module, the virtual image generation unit 401 counts the number of binary characters in all audio binary data. The virtual image can be an image of N*N size, that is, the length and width are N virtual pixels. The number of binary characters is less than N*N. The length and width of the virtual image can be adjusted as long as the condition "the number of virtual pixels contained in the virtual image is greater than the number of binary characters" is met. If the pixels of the virtual image exceed N*N, they are filled with a specific color, such as pure black.
[0107] The character string generating unit 402 is used to import a preset decimal data set into a symmetric encryption function, and generate a calculated value through the symmetric encryption function to form a character string.
[0108] In this module, the string generation unit 402 imports a preset decimal data set into the symmetric encryption function. The decimal data set can be a natural number, an odd number, an even number or a prime number, etc. When it is imported into the symmetric encryption function, each imported number will generate a calculated value, which is regarded as a character to obtain a large number of characters. The character combinations are spliced together to obtain a continuous string, such as 1247981274981274...
[0109] The audio encryption unit 403 is used to map the waveform binary data into the virtual image one by one according to a preset mapping relationship, use the virtual image as the audio encryption data, and generate a key, wherein the key is a symmetric encryption function and the number of encryptions.
[0110] In this module, the audio encryption unit 403 maps the waveform binary data into the virtual image one by one according to a preset mapping relationship, and starts filling from the first virtual pixel in the upper left corner of the virtual image. When filling, all the audio binary data are spliced into a whole in chronological order, which is defined as a binary data collection. Binary characters are read from the binary data collection in sequence. Reading the character "0" indicates filling a first color pixel (such as red), and reading the character "1" indicates filling a second color pixel (such as white). The filling position is determined by the characters in the character string. After the first virtual pixel is filled, a character in the character string is read. If the character is an even number, it is selected from the unfilled virtual pixels. The selection order is: select the leftmost virtual pixel from the top row of unfilled virtual pixels. If the character is an odd number, it is selected from the unfilled virtual pixels. The selection order is: select the leftmost virtual pixel from the bottom row of unfilled virtual pixels. Select a rightmost virtual pixel from the pixels, and determine the color of the virtual pixel according to the second binary character in the binary data collection, that is, if the characters in the string are even, then fill in from the head of the virtual image, otherwise, if the characters in the string are odd, then fill in from the tail of the virtual image until all binary characters are read and the virtual image is filled. If multiple encryption is required, read the first color pixel and the second color pixel filled this time in order from left to right and from top to bottom, and restore them to binary character data. Subsequently, continue to generate a string through a symmetric encryption function, and fill in the binary character data as a collection of binary data to achieve multiple encryption. Then read the first color pixel and the second color pixel filled this time in order from left to right and from top to bottom, and restore them to binary character data, so as to obtain audio encryption data and generate a key. The key is a symmetric encryption function and the number of encryptions.
[0111] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0112] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the 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 used in the embodiments provided in this application can 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. As an 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 (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0113] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0114] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0115] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An audio encryption method based on multiple symmetric encryption, characterized in that: The method comprises: Acquire the audio data to be encrypted, convert the audio data to be encrypted into temporary analog signal data, and segment the audio data to be encrypted based on the temporary analog signal data to obtain waveform data packets; Sampling the waveform data packet to obtain a plurality of sampling point data, converting the sampling point data into sampling point coordinates, and generating a set of waveform functions for each waveform data packet based on the sampling point coordinates; Convert the waveform function into binary form to obtain waveform binary data, randomly select a preset number of waveform binary data, calculate the statistical data volume, and construct a symmetric encryption function according to the data volume; Construct a virtual image according to the audio binary data, generate a string through a symmetric encryption function, map all waveform binary data into the virtual image according to the string, and obtain audio encrypted data; The steps of converting the audio data to be encrypted into temporary analog signal data, segmenting the audio data to be encrypted based on the temporary analog signal data, and obtaining a waveform data packet specifically include: reading the audio data to be encrypted, performing weight assignment, voltage conversion, and filtering output on the audio data to be encrypted to obtain temporary analog signal data, converting the temporary analog signal data into an audio waveform graph, calculating the slope of each point in the audio waveform graph, dividing the waveform graph into a plurality of waveform intervals according to the slope, each waveform interval comprising a peak or a trough, and segmenting the audio data to be encrypted according to the time interval of the waveform interval to obtain a waveform data packet.
2. The audio encryption method based on multiple symmetric encryption according to claim 1, characterized in that: The steps of sampling the waveform data packet to obtain a plurality of sampling point data, converting the sampling point data into sampling point coordinates, and generating a set of waveform functions for each waveform data packet based on the sampling point coordinates specifically include: The waveform data packet is sampled according to a preset sampling rate to obtain sampling point data, where the sampling point data includes the sampling point time and the audio signal strength of the sampling point; Construct sampling point coordinates according to the sampling point data, wherein the abscissa of the sampling point coordinates is the time value of the time sampling point, and the ordinate is the audio signal strength; The sampling point coordinates are fitted multiple times based on the preset fitting function type until the fitting accuracy meets the requirements. Each set of waveform data packets will generate a set of waveform functions.
3. The audio encryption method based on multiple symmetric encryption according to claim 1, characterized in that: The steps of converting the waveform function into binary form to obtain waveform binary data, randomly selecting a preset number of waveform binary data, calculating the statistical data volume, and constructing a symmetric encryption function according to the data volume specifically include: Converting the waveform function into binary form to obtain waveform binary data, wherein the waveform binary data at least includes the waveform function, an independent variable interval, and a terminator; Randomly select a preset number of waveform binary data, perform data volume statistics on the waveform binary data, and construct a data volume coordinate, wherein the abscissa of the data volume coordinate is the extraction number and the ordinate is the data volume of the waveform binary data; The data volume coordinates are fitted according to the preset function fitting method to obtain a symmetric encryption function.
4. The audio encryption method based on multiple symmetric encryption according to claim 1, characterized in that: The steps of constructing a virtual image according to the audio binary data, generating a character string through a symmetric encryption function, and mapping all waveform binary data into the virtual image according to the character string to obtain the audio encrypted data specifically include: Counting the number of binary characters in the audio binary data, and constructing a set of virtual images, wherein the number of virtual pixels contained in the virtual images is greater than the number of binary characters; Import the preset decimal data set into the symmetric encryption function, generate the calculated value through the symmetric encryption function, and form a string; The waveform binary data are mapped into virtual images one by one according to a preset mapping relationship, and the virtual images are used as audio encryption data to generate a key, wherein the key is a symmetric encryption function and the number of encryptions.
5. An audio encryption system based on multiple symmetric encryption, characterized in that: The system comprises: An audio segmentation module is used to obtain audio data to be encrypted, convert the audio data to be encrypted into temporary analog signal data, and segment the audio data to be encrypted based on the temporary analog signal data to obtain waveform data packets; A waveform function generation module is used to sample the waveform data packet to obtain a plurality of sampling point data, convert the sampling point data into sampling point coordinates, and generate a set of waveform functions for each waveform data packet based on the sampling point coordinates; An encryption function generation module is used to convert the waveform function into binary form to obtain waveform binary data, randomly select a preset number of waveform binary data, calculate the statistical data volume, and construct a symmetric encryption function according to the data volume; A multiple encryption module is used to construct a virtual image based on audio binary data, generate a string through a symmetric encryption function, and map all waveform binary data into the virtual image based on the string to obtain audio encrypted data; The working process of the audio segmentation module specifically includes: reading the audio data to be encrypted, performing weight assignment, voltage conversion and filtering output on the encrypted audio data, obtaining temporary analog signal data, converting the temporary analog signal data into an audio waveform graph, calculating the slope of each point in the audio waveform graph, dividing the waveform graph into multiple waveform intervals according to the slope, each waveform interval contains a peak or a trough, and segmenting the encrypted audio data according to the time interval of the waveform interval to obtain a waveform data packet.
6. The audio encryption system based on multiple symmetric encryption according to claim 5, characterized in that: The waveform function generating module comprises: The waveform unit is used to sample the waveform data packet according to a preset sampling rate to obtain sampling point data, wherein the sampling point data includes the sampling point time and the audio signal strength of the sampling point; A sampling coordinate construction unit, used to construct sampling point coordinates according to the sampling point data, wherein the abscissa of the sampling point coordinates is the time value of the time sampling point, and the ordinate is the audio signal strength; The waveform function fitting unit is used to perform multiple fittings on the sampling point coordinates based on a preset fitting function type until the fitting accuracy meets the requirements. Each set of waveform data packets will generate a set of waveform functions.
7. The audio encryption system based on multiple symmetric encryption according to claim 5, characterized in that: The encryption function generation module comprises: A data conversion unit, used for converting the waveform function into binary form to obtain waveform binary data, wherein the waveform binary data at least includes the waveform function, an independent variable interval and a terminator; A data volume statistics unit is used to randomly select a preset number of waveform binary data, perform data volume statistics on the waveform binary data, and construct a data volume coordinate, wherein the abscissa of the data volume coordinate is the extraction number and the ordinate is the data volume of the waveform binary data; The encryption function fitting unit is used to fit the data volume coordinates according to a preset function fitting method to obtain a symmetric encryption function.
8. The audio encryption system based on multiple symmetric encryption according to claim 5, characterized in that: The multiple encryption module comprises: A virtual image generation unit, used for counting the number of binary characters in the audio binary data, and constructing a set of virtual images, wherein the number of virtual pixels contained in the virtual images is greater than the number of binary characters; A character string generation unit, used for importing a preset decimal data set into a symmetric encryption function, generating a calculated value through the symmetric encryption function to form a character string; The audio encryption unit is used to map the waveform binary data into the virtual image one by one according to the preset mapping relationship, use the virtual image as the audio encryption data, and generate a key, wherein the key is a symmetric encryption function and the number of encryptions.
Citation Information
Patent Citations
Electronic signature system and method based on audio communication
CN102223234A
Methods and systems for digital rights management of protected content
US20050021539A1