Audio signal encryption method and device, electronic equipment and storage medium
By using chaotic mapping methods and scrambling technologies with low dimensions in the audio signal encryption system, the problems of small key space and large resource occupation in the existing technology are solved, and efficient and secure audio signal encryption is achieved.
Patent Information
- Application Number
- CN202411422058.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-12
AI Technical Summary
In the prior art, the key space of the audio signal encryption system is small and the decryption is low. At the same time, the high-dimensional chaotic system occupies too much system resources during encryption and decryption, resulting in a longer time for encrypting audio signals.
An audio signal encryption method is adopted to convert the key seeds into an encryption matrix based on preset encoding rules and chaos matrix, and divide it into multiple key vectors. The chaotic matrix is generated using sinusoidal mapping, extended Logistic mapping and Hénon mapping, combining quantum Logistic chaos mapping and DNA encoding to scramble and encrypt audio signals.
It realizes that the key space of the encryption system and the complexity of the encryption algorithm are improved while occupying less resources, reducing the time for encrypting audio signals, while taking into account the performance and security of the system.
Smart Images

Figure CN119483883A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of audio signal encryption, and in particular to an audio signal encryption method, device, electronic equipment, and storage medium. Background Art
[0002] With the rapid development of modern computer and social media technology and the era of big data, a large amount of multimedia data is continuously output every day, including audio data. In the process of transmitting these audio data, there is a possibility of being intercepted by other devices. If the audio data contains important privacy data, the leakage of such audio data may have serious consequences. Therefore, audio encryption algorithms have become a research hotspot. For a security system, key space evaluation is a basic tool for evaluating the efficiency of the security system. A successful encryption system must have a large key space and be sensitive to the key value. At present, algorithms based on chaotic systems are particularly popular in the field of encryption. There are two types of chaotic systems: one-dimensional (1D) chaotic systems and high-dimensional (HD) chaotic systems. Existing 1D chaotic systems are mainly used for information data encryption. However, in the encryption system that simply uses a one-dimensional chaotic system, its key space is small and the decryption difficulty is low. When using a high-dimensional chaotic system, its high dimensionality will excessively occupy system resources during encryption and decryption, resulting in a long duration of the encrypted audio signal. Summary of the invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention provides an audio signal encryption method, device, electronic device, and storage medium, which can provide an encryption transmission method with a large key space and occupy less resources.
[0004] In a first aspect, an embodiment of the present invention provides an audio signal encryption method, which is applied to an audio signal processing system, the system comprising a transmitting end and a receiving end, and the encryption transmission method comprises:
[0005] The audio signal encryption module obtains a key seed, converts the key seed into an encryption matrix based on a preset encoding rule and a chaotic matrix, and divides the encryption matrix into a plurality of key vectors, wherein the chaotic matrix is generated based on a sine map, an extended logistic map, and a Hénon map;
[0006] The audio signal encryption module obtains an original audio signal and divides the original audio signal into a plurality of original audio vectors;
[0007] The audio signal encryption module scrambles all the original audio vectors to obtain multiple scrambled audio vectors, obtains an audio flag and a first vector from each of the scrambled audio vectors, and encrypts the first vector based on the key vector, wherein one first vector corresponds to one key vector;
[0008] The audio signal encryption module resynthesizes all corresponding scrambled audio vectors with the first vector based on the audio flag to obtain multiple encrypted audio vectors, and generates an encrypted audio signal based on the encrypted audio vectors.
[0009] In some embodiments of the present invention, the audio signal encryption module obtains a key seed, and converts the key seed into an encryption matrix based on a preset encoding rule and a chaotic matrix, including:
[0010] Taking each character in the key seed as a vertex and connecting every two vertices with an edge, generating a path graph, and encoding all characters in the path graph based on the encoding rule;
[0011] Obtaining an adjacency matrix based on the encoded path graph by calculation, wherein the dimension of the adjacency matrix is equal to the string length of the key seed;
[0012] Generate a plurality of random integer values based on a sine map, process all the integer values in turn through an extended logistic map and a Hénon map to obtain a plurality of independent values, and generate a chaotic vector based on the independent values;
[0013] Converting the chaotic vector into the chaotic matrix, wherein the dimension of the chaotic matrix is equal to the string length of the key seed;
[0014] The encoding matrix and the chaotic matrix are multiplied together, and the matrix obtained by the multiplication is multiplied with the lower triangular matrix that has been rotated once to obtain the encryption matrix.
[0015] In some embodiments of the present invention, the audio signal encryption module scrambles all the original audio vectors to obtain a plurality of scrambled audio vectors, including:
[0016] Divide the original audio signal into a plurality of first value blocks, wherein each of the first value blocks includes N characters, where N is a positive integer;
[0017] Generate an index key based on a quantum logistic chaotic map, wherein the index key includes a plurality of samples, and the number of the samples is equal to the number of the characters of the first value block;
[0018] Based on the order of the samples in the index key, reorder the position of each character in each of the first value blocks to obtain a plurality of primary scrambling vectors;
[0019] A primary scrambled audio is generated based on all the primary scrambling vectors.
[0020] In some embodiments of the present invention, the audio signal encryption module scrambles all the original audio vectors to obtain a plurality of scrambled audio vectors, and further comprises:
[0021] Divide the primary scrambled audio into a plurality of the second value blocks, wherein each of the second value blocks includes 2N characters, where N is a positive integer;
[0022] Convert all the second value blocks from floating point format to binary format, and convert a first preset number segment in each second value block into a DNA sequence, wherein the first preset number segment is composed of a continuous segment of characters in the second value block;
[0023] After the conversion is completed, all the second data blocks are restored to a floating point format, and the scrambled audio signal is generated based on all the second value blocks.
[0024] In some embodiments of the present invention, obtaining an audio marker and a first vector from each of the scrambled audio vectors, and encrypting the first vector based on the key vector, comprises:
[0025] Convert all the values constituting the scrambled audio vector from a floating point format to a binary format, generate the audio flag based on a second preset number segment in the scrambled audio vector, and segment the first vector based on a third preset number segment in the scrambled audio vector, wherein the second preset number segment and the third preset number segment are both composed of a continuous segment of characters in the scrambled audio vector, and the second preset number segment and the third preset number segment are adjacent to each other;
[0026] An XOR operation is performed on each of the first vectors and each of the key vectors to generate a plurality of the second vectors, wherein an XOR operation is performed on one of the first vectors and one of the key vectors.
[0027] In some embodiments of the present invention, the step of resynthesizing all corresponding scrambled audio vectors with the first vector based on the audio flag to obtain a plurality of encrypted audio vectors includes:
[0028] Convert all the second vectors into third value blocks, and re-add each of the third value blocks to the scrambled audio vector based on the audio flag to obtain a plurality of the encrypted audio vectors, wherein the position of the third value block is the same as the position of the third preset number segment;
[0029] All numerical values constituting the scrambled audio vector are converted from binary format to floating point format.
[0030] In some embodiments of the present invention, the audio signal processing system further includes an audio signal decryption module, the audio signal decryption module is communicatively connected to the audio signal encryption module, and after the audio signal encryption module generates an encrypted audio signal based on the encrypted audio vector, the method further includes:
[0031] The audio signal encryption module sends the encrypted audio signal to the audio signal decryption module;
[0032] The audio signal decryption module converts all the second vectors in the encrypted audio vector into the first vector based on the encrypted audio vector, the audio flag and the key vector to obtain the scrambled audio signal;
[0033] The audio signal decryption module performs descrambling processing on the scrambled audio signal to obtain the original audio signal.
[0034] In a second aspect, an embodiment of the present invention provides a control device, comprising at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute the audio signal encryption method described in the first aspect above.
[0035] In a third aspect, an embodiment of the present invention provides an electronic device, comprising the control device as described in the second aspect above.
[0036] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the audio signal encryption method as described in the first aspect above.
[0037] According to the encryption method of the audio signal of the embodiment of the present invention, there are at least the following beneficial effects: the audio signal encryption module obtains the key seed, converts the key seed into an encryption matrix based on the preset coding rule and the chaotic matrix, and divides the encryption matrix into multiple key vectors, wherein the chaotic matrix is generated based on the sine mapping, the extended Logistic mapping and the Hénon mapping; the audio signal encryption module obtains the original audio signal and divides the original audio signal into multiple original audio vectors; the audio signal encryption module scrambles all the original audio vectors to obtain multiple scrambled audio vectors, obtains an audio mark and a first vector from each scrambled audio vector, and encrypts the first vector based on the key vector, wherein one first vector corresponds to one key vector; the audio signal encryption module resynthesizes all the corresponding scrambled audio vectors with the first vector based on the audio mark to obtain multiple encrypted audio vectors, and generates an encrypted audio signal based on the encrypted audio vector. According to the technical solution of the embodiment of the present invention, a plurality of chaotic mapping methods and scrambling methods with lower dimensions are combined, so that encryption can be performed with less resources during encryption, and a sufficiently large key space can be obtained, taking into account the performance and security of the system during encrypted transmission, and reducing the time of encrypting audio signals. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 is one of the flow charts of an audio signal encryption method provided by an embodiment of the present invention;
[0039] Figure 2 This is a second flowchart of an audio signal encryption method provided by an embodiment of the present invention;
[0040] Figure 3 It is a structural diagram of a control device provided in another embodiment of the present invention. DETAILED DESCRIPTION
[0041] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0042] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0043] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0044] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0045] The embodiment of the present invention provides an encryption method for an audio signal, which has at least the following beneficial effects: an audio signal encryption module obtains a key seed, converts the key seed into an encryption matrix based on a preset coding rule and a chaotic matrix, and divides the encryption matrix into multiple key vectors, wherein the chaotic matrix is generated based on a sine map, an extended logistic map, and a Hénon map; the audio signal encryption module obtains an original audio signal, and divides the original audio signal into multiple original audio vectors; the audio signal encryption module scrambles all original audio vectors to obtain multiple scrambled audio vectors, obtains an audio flag and a first vector from each scrambled audio vector, and encrypts the first vector based on the key vector, wherein one first vector corresponds to one key vector; the audio signal encryption module resynthesizes all corresponding scrambled audio vectors with the first vector based on the audio flag to obtain multiple encrypted audio vectors, and generates an encrypted audio signal based on the encrypted audio vector. According to the technical solution of the embodiment of the present invention, a plurality of chaotic mapping methods and scrambling methods with lower dimensions are combined, so that encryption can be performed with less resources during encryption, and a sufficiently large key space can be obtained, which takes into account the performance and security of the system during encrypted transmission, and reduces the time of encrypting audio signals.
[0046] The concepts involved in the present invention are explained below:
[0047] Chaotic mapping: divided into 1D chaotic mapping and HD chaotic mapping. 1D chaotic mapping contains a small number of factors, while HD chaotic mapping contains a large number of factors;
[0048] Chaos matrices: matrices used in chaos theory that have the property of being very sensitive to initial values, i.e. small changes in initial conditions can lead to large differences in long-term behavior;
[0049] DNA coding: dynamically established according to the chaotic sequence created, there are four basic nucleotides in DNA, called A, T, C and G, of which only A and T and C and G are allowed to pair. In the grayscale image, there are 8-bit binary numbers representing each pixel, and there is also a complementary relationship between multiple pairs of binary values. Since 00 is related to 11 and 01 is also related to 10, the digital pairs 00, 01, 10 and 11 can be used to complement the DNA bases A, C, G and T;
[0050] Graph theory: It studies the mathematical structure and properties of graphs. A graph in graph theory is composed of a set of vertices (or nodes) and the edges connecting these vertices. Graph theory has a wide range of applications in computer science, cryptography, network analysis, biology, social sciences, transportation planning and other fields.
[0051] The control method of the embodiment of the present invention is further described below based on the accompanying drawings;
[0052] Reference Figure 1 , Figure 1 A flowchart of an audio signal encryption method provided by an embodiment of the present invention is provided. The audio signal encryption method is applied to an audio signal processing system. The system includes a transmitting end and a receiving end. The encryption transmission method includes but is not limited to the following steps:
[0053] Step S100, the audio signal encryption module obtains a key seed, converts the key seed into an encryption matrix based on a preset encoding rule and a chaotic matrix, and divides the encryption matrix into a plurality of key vectors, wherein the chaotic matrix is generated based on a sine map, an extended logistic map, and a Hénon map; 3
[0054] Step S200: the audio signal encryption module obtains an original audio signal and divides the original audio signal into a plurality of original audio vectors;
[0055] Step S300: the audio signal encryption module scrambles all original audio vectors to obtain multiple scrambled audio vectors, obtains an audio flag and a first vector from each scrambled audio vector, and encrypts the first vector based on the key vector, wherein one first vector corresponds to one key vector;
[0056] Step S400: The audio signal encryption module resynthesizes all corresponding scrambled audio vectors with the first vector based on the audio flag to obtain multiple encrypted audio vectors, and generates an encrypted audio signal based on the encrypted audio vectors.
[0057] It should be noted that in step S100, the key seed is a string including multiple characters, and the characters of the string can be generated based on any preset rules, and the length of the string can also be set arbitrarily according to the requirements. Since the key seed is composed of a string, the vector form corresponding to the key seed can be obtained by converting each character in the string into a vector factor. Furthermore, since the characters in the vector form corresponding to the key seed can be arbitrarily limited, it is necessary to convert all characters into numerical values generated based on the same set of encoding rules before the numerical values can be converted. Step S100 also involves a chaotic matrix generated by three types of mappings. The chaotic matrix is generated based on sine mapping, extended logistic mapping and Hénon mapping. The dimensions of these three types of chaotic mappings are all low, sine mapping is 1D, and extended logistic mapping and Hénon mapping are both 2D. Combining these three chaotic mappings with lower dimensions can obtain a larger key space while occupying fewer resources.
[0058] It should be noted that in step S200 to step S300, the audio signal encryption module first divides the original audio signal into multiple original audio vectors, and then scrambles the original audio signal in turn based on quantum Logistic chaotic mapping and DNA coding. The quantum Logistic chaotic mapping adopted is based on a quantum particle system that exhibits unpredictable dynamic behavior within a specific range. In the classical chaotic mapping, the key space range is limited due to the very few control factors, which leads to a narrow chaos length. When more dimensional chaotic mapping is used, as described in the scheme provided in this article, the key space range becomes larger, the complexity, randomness, and sensitivity to the initial state and control factors become higher, so the quantum Logistic system is suitable for use as a seed system in the cryptographic method; in order to increase the difficulty for hackers to reconstruct the original voice, the original audio signal is scrambled using a 3D quantum Logistic chaotic mapping in the initial step. Further, while the original audio signal is scrambled by the quantum Logistic chaotic mapping, it is also scrambled twice by DNA coding, which further enhances the complexity of the cryptographic system and increases the difficulty of hackers to crack it. At the same time, the secondary scrambling will not occupy too many system resources.
[0059] It should be noted that after the key vector and the scrambled audio vector are generated based on the above-mentioned embodiments, the two need to be combined to realize the encryption of the original audio signal. Specifically, in step S400, part of the code in the scrambled audio vector is separated out, and after associating with the key vector and performing related processing operations, the processed vector is backfilled into the key vector to realize the association between the key and the audio.
[0060] It can be understood that the audio signal encryption transmission method provided by the above-mentioned embodiments of the present invention, based on the key vector converted from the chaotic matrix constructed based on multiple chaotic maps, can improve the complexity of the encryption algorithm in the encryption system while occupying fewer resources, obtain a larger key space, and meet the needs of audio signal encryption transmission; at the same time, by scrambling the audio signal an appropriate number of times (secondary), the complexity of the encryption algorithm is further improved, so that the audio signal can be transmitted more securely.
[0061] In addition, in one embodiment, Figure 1 Step S100 of the illustrated embodiment also includes but is not limited to the following steps:
[0062] Step S110, taking each character in the key seed as a vertex and connecting every two vertices with an edge to generate a path graph, and encoding all the characters in the path graph based on the encoding rule;
[0063] Step S120, obtaining an adjacency matrix based on the encoded path graph by calculation, wherein the dimension of the adjacency matrix is equal to the length of the character string of the key seed;
[0064] Step S130, generating a plurality of random integer values based on a sine map, processing all the integer values in turn through an extended Logistic map and a Hénon map to obtain a plurality of independent values, and generating a chaotic vector based on the independent values;
[0065] Step S140, converting the chaotic vector into a chaotic matrix, wherein the dimension of the chaotic matrix is equal to the length of the character string of the key seed;
[0066] Step S150, the encoding matrix and the chaotic matrix are multiplied, and the matrix obtained by the multiplication is multiplied with the lower triangular matrix that has been rotated once to obtain the encryption matrix.
[0067] It should be noted that in step S110 to step S150, the key seed is first processed based on the processing idea of graph theory, and the graph is composed of an ordered pair (V, E), where V represents the vertex of the graph and E represents its edge. Therefore, the graph is just a set of vertices and edges. In the embodiment of the present invention, the graph G(A)=(V, E) consists of vertex V and edge E. After the path graph is generated, before the path graph is processed by chaotic mapping, it is also necessary to convert the characters in the path graph into numerical characters according to the encoding rules to facilitate subsequent vector operations. After obtaining the adjacency evidence of the corresponding path graph, the independent values generated by sine mapping, extended logistic mapping and Hénon mapping are used to generate a chaotic matrix. After multiplying the encoding matrix and the chaotic matrix, and then multiplying the matrix obtained by multiplication with the lower triangular matrix after one rotation, the encryption matrix can be obtained. It can be understood that the rotation operation of the lower triangular matrix after one rotation introduces nonlinear transformation, which further increases the complexity of the key generation process.
[0068] Exemplarily, the encoding rules are shown in Table 1, based on which the characters involved in the key seed in the above-mentioned embodiment are converted into numerical values that can be used for vector operations:
[0069]
[0070]
[0071] Table 1
[0072] Exemplarily, in one embodiment of the present invention, the cryptographic key is: Convert it to Finally, we encode based on Table 1 and get the key vector [35, 39, 22, 40, 27, 27, 126, 59, 76, 70, 27, 27, 96, 91, 111, 130, 93, 27, 27, 91, 110, 92, 67, 101, 93, 27, 27, 19, 19, 19, 19, 17].
[0073] Exemplarily, the embodiment of the present invention uses 1D sine mapping, which is a variation of the sine function, which converts the input from [0, π] to [0, 1] while maintaining the original output range of [0, 1]. The process can be expressed as:
[0074] Si(t+1)=Q×[sin(π×Si(t))]······(1)
[0075] Where Q represents a control parameter. Since 1D sinusoidal mapping includes fewer variables, the efficiency of 1D sinusoidal mapping can be twice that of HD chaotic mapping, thereby increasing the speed of the speech encryption process.
[0076] Furthermore, the extended Logistic map can be extended from two dimensions using the following equations (2) and (3):
[0077] Ai(t+1)=ε1×Ai(t)×(1-Ai(t))+σ1×Bi(t) 2 ······(2)
[0078] Bi(t+1)=ε2×Bi(t)×(1-Bi(t))+σ2×(Bi(t) 2 +Ai(t)×Bi(t))······(3)
[0079] This mapping has chaotic behavior when the variables meet the following conditions: 2.75<ε1<3.4, 2.7<ε2<3.45, 0.15<σ1<0.21, and 0.13<σ2<0.15. The values of Ai(0) and Bi(0) are in the range of [0,1]. In the embodiment of the present invention, an encryption method based on 2D extended mapping is adopted. By using 2D extended Logistic mapping to increase the total number of variables and the complexity of the Logistic mapping architecture, the encoding level can be improved.
[0080] Furthermore, the Hénon chaotic mapping in the embodiment of the present invention is a two-dimensional mapping analysis method, which can be derived by the following formulas (4) and (5):
[0081]
[0082] Di(t+1)=Ci(t)······(5)
[0083] Two variables: θ, which determines the degree of stretching, and Used to adjust the thickness of the fold. In practice, when θ = 1.4 and The Hénon function exhibits chaotic behavior when . These two variables are provided as strange attractors and are initial parameters, and the initial position is (C(0), D(0)). This method will be able to map every point in the image (C(t), D(t))) to a new point.
[0084] In addition, in one embodiment, Figure 1 Step S300 in the illustrated embodiment also includes but is not limited to the following steps:
[0085] Step S310, dividing the original audio signal into a plurality of first value blocks, wherein each first value block includes N characters, where N is a positive integer;
[0086] Step S320, generating an index key based on quantum logistic chaotic mapping, wherein the index key includes a plurality of samples, and the number of the samples is equal to the number of characters in the first value block;
[0087] Step S330, reordering the position of each character in each first value block based on the order of samples in the index key to obtain a plurality of primary scrambling vectors;
[0088] Step S340: Generate a primary scrambled audio based on all the primary scrambling vectors.
[0089] It should be noted that step S310 to step S340 are the first scrambling of the original audio signal based on quantum logistic chaotic mapping. In the embodiment of the present invention, the first numerical block is to divide the original audio signal into a plurality of equal-length blocks, each block consisting of a plurality of numerical characters. The quantum logistic mapping generates a key, which can be defined as follows:
[0090] A(n+1)=μ×(A(n)-|A(n)| 2 )-μ×B(n)······(6)
[0091] B(n+1)=-B(n)×e -2γ +e -γ ×μ[(2-A(n)-A(n) * )×B(n)-A(n)×C(n) * -A(n) * C(n)]····(7)
[0092] C(n+1)=-C(n)×e -2γ +e -γ ×μ[(2(1-A(n) * )×C(n)-2×A(n)×B(n)-A(n)]····(8)
[0093] Wherein γ represents a dissipation parameter, c represents a control parameter, and the initial conditions (A(n), B(n), C(n)) are set to real numbers to satisfy the interaction criterion. After the index key is generated based on equations (5), (6), and (7), since the characters in the index key have a certain order, the numbers in the first numerical block can be reordered according to the order to obtain a scrambling vector, and scrambled audio is generated based on the scrambling vector.
[0094] In addition, in one embodiment, Figure 1 In step S300 of the illustrated embodiment, the following steps are also included but not limited to step S350, dividing the primary scrambled audio into a plurality of second value blocks, wherein each second value block includes 2N characters, where N is a positive integer;
[0095] Step S360, converting all second value blocks from floating point format to binary format, and converting a first preset number segment in each second value block into a DNA sequence, wherein the first preset number segment is composed of a continuous segment of characters in the second value block;
[0096] Step S370: After the conversion is completed, all second data blocks are restored to floating point format, and a scrambled audio signal is generated based on all second value blocks.
[0097] It should be noted that in step S250 to step S270, the original audio signal is scrambled for the second time based on the dynamic DNA sequence. In an embodiment of the present invention, the second numerical block is to divide the first scrambled signal into a plurality of equal-length blocks, each block consisting of a plurality of numerical characters. Since the dynamic DNA sequence is used for encoding, the number of numerical characters in the second data block is twice the number of numerical characters in the first numerical block. Exemplarily, there are four basic nucleotides in DNA, called A, T, C and G, in which only A and T and C and G are allowed to pair, so when the principle of DNA sequence is applied to cryptographic coding. Since it is necessary to form a data structure similar to base pairs in the DNA coding process, this coding scheme has a total of 24 different versions, but the program must follow the pairing standard. The pairing standard stipulates that the A base must be paired with T and the C base must be paired with G, so only eight different types of programs are valid. The specific corresponding relationship is shown in Table 2.
[0098]
[0099] Table 2
[0100] The dynamic DNA sequence used in the second stage of scrambling the voice file depends on the bases A, G, T and C, which form many of the rules listed in Table 2. This approach means that recovering the voice sample will be more difficult and can effectively prevent the encrypted audio from being cracked by others.
[0101] In addition, in one embodiment, Figure 1 Step S400 in the illustrated embodiment also includes but is not limited to the following steps:
[0102] Step S410, converting all the values constituting the scrambled audio vector from a floating point format into a binary format, generating an audio mark based on a second preset number segment in the scrambled audio vector, and segmenting a first vector based on a third preset number segment in the scrambled audio vector, wherein the second preset number segment and the third preset number segment are both composed of a continuous segment of characters in the scrambled audio vector, and the second preset number segment and the third preset number segment are adjacent to each other;
[0103] Step S420, performing an XOR operation on each first vector and each key vector to generate multiple second vectors, wherein an XOR operation is performed on one first vector and one key vector.
[0104] It should be noted that in step S410 to step S420, in order to encrypt the scrambled audio vector, it is necessary to associate the key vector of the above-mentioned embodiment with the scrambled audio vector by means of an XOR operation. In the embodiment of the present invention, each value in the scrambled audio vector is first converted from a floating point format to a binary format, and the 1st to 8th characters, that is, the second preset number segment, in each scrambled audio vector are separated, and these bits are saved as flag values to be used as corresponding key flags for each second numerical block based on the scrambled audio signal. Furthermore, it is also necessary to separate the 9th to 24th bits of each scrambled audio signal, that is, the third preset number segment, and store it in a binary vector, and finally perform an XOR budget on the vector of the separated third preset number segment and the key vector to complete the association. It can be understood that the second preset number segment and the third preset number segment are not limited to the 1st to 8th bits and the 9th to 24th bits, and can be taken at any position; convert the floating point format numerical characters into a binary format, in order to facilitate the XOR operation between vectors.
[0105] In addition, in one embodiment, Figure 1 Step S400 in the illustrated embodiment also includes but is not limited to the following steps:
[0106] Step S430, converting all the second vectors into third value blocks, and re-adding each third value block to the scrambled audio vector based on the audio flag to obtain a plurality of encrypted audio vectors, wherein the position of the third value block is the same as the position of the third preset number segment;
[0107] Step S440, converting all numerical values constituting the scrambled audio vector from binary format to floating point format.
[0108] It should be noted that, in the above-mentioned embodiments, after the third preset number segment is synthesized with the key vector, the combined vector needs to be re-merged into the scrambled audio vector. At this time, the third numerical block needs to be re-added to the scrambled audio vector according to the corresponding relationship between the audio flag and the scrambled audio vector to generate an encrypted audio vector. Finally, the binary format numerical characters in the scrambled audio vector are converted back to floating point format to complete the entire encryption process.
[0109] In addition, in one embodiment, the audio signal processing system provided by the present invention further includes an audio signal decryption module, the audio signal decryption module is communicatively connected with the audio signal encryption module, and after the audio signal encryption module generates an encrypted audio signal based on the encrypted audio vector, the audio signal encryption method further includes but is not limited to the following steps:
[0110] Step S510, the audio signal encryption module sends the encrypted audio signal to the audio signal decryption module;
[0111] Step S520, the audio signal decryption module converts all second vectors in the encrypted audio vector into first vectors based on the encrypted audio vector, the audio flag and the key vector to obtain a scrambled audio signal;
[0112] Step S530: the audio signal decryption module descrambles the scrambled audio signal to obtain an original audio signal.
[0113] It should be noted that in step S510 to step S530, after the receiving end obtains the encrypted audio signal, it is necessary to reversely execute the encryption method of the embodiment of the above aspect for decryption, specifically including dividing the encrypted audio signal into multiple encrypted audio vectors, and then converting the numerical characters of the encrypted audio vector into binary format, dividing the 1st to 8th bits as flag bits, dividing the 9th to 24th bits, and performing corresponding vector XOR operations based on the 9th to 24th bits and re-merging the obtained results with the flag bits to obtain a scrambled audio signal, and then performing two descrambling operations to obtain the original audio signal. It can be understood that the embodiment of the present invention can also improve the security of audio data transmission by transmitting the key seed and the encrypted audio in batches, and prevent the key and the encrypted audio from being intercepted at the same time.
[0114] The following is a specific embodiment of the present invention:
[0115] Reference Figure 2 , first generate a key based on the key seed. The specific steps include:
[0116] 1- Enter the seed for the cryptographic key, 32 characters long.
[0117] 2-Take each character in the password as a vertex, and connect every two vertices with an edge to form a path graph.
[0118] 3- Encode the password characters using the encoding method in Table 3.
[0119] 4- Calculate the adjacency matrix A of dimension 32×32.
[0120] 5- Generate a lower triangular matrix C of dimension 32×32.
[0121] 6- Generate 1024 random integer values using a multi-chaotic map based on a 1D sine map, a 2D extended logistic map, and a 2D Hénon map, and save these random integer values in a vector V. The specific steps are as follows:
[0122] a- Repeat the sinusoidal mapping process in formula (1) until a total of 1024 non-repeating items are generated.
[0123] b- Pass the result of the previous step as input to the extended logistic map in formula (2) to generate 1024 independent values.
[0124] c- Process the result of step (b) using the Hénon mapping process of formula (3) to obtain 1024 independent values.
[0125] d- Store the results of step (c) in vector V as integer values.
[0126] 7- Convert the vector V into a two-dimensional matrix B containing 32×32 values.
[0127] 8-Multiply matrices A and B, and then multiply the result with the rotated matrix C. The resulting matrix D is then randomly split into 16 vectors to be used as the encryption key.
[0128] 9-Convert the encryption key matrix into an encryption key vector Ek.
[0129] After the key is generated, the input voice signal is scrambled in two steps: in the first step, the decimal format voice samples are mixed using quantum logistic mapping, and in the second step, the binary format samples are shuffled using dynamic DNA coding. The scrambling process is described as follows:
[0130] 1. Scrambling based on quantum logistic mapping: Receive the original speech signal in .WAV format; divide the original speech signal into multiple blocks of 128 values; use quantum logistic chaotic mapping to generate the index key of each block. The index key IK consists of N samples. MK(k), k = 1, 2, ..., 128; shuffle the values of each position in each block based on the index key result IK generated by the quantum logistic chaotic mapping; merge the results of all blocks into one signal for the next scrambling process.
[0131] 2. Scrambling based on dynamic DNA coding: Read the input scrambled speech signal in .WAV format; divide the original speech signal into multiple blocks (each block contains 256 values); convert the sampled speech signal in each block from floating point format to binary format with 64 bits; convert bits 9-24 in the binary format into a DNA sequence based on the block index using dynamic DNA coding, as described in Table 2; after completing the dynamic DNA coding, convert the resulting files of each block sample into binary format to recover the floating point values in binary encoded form; merge the results of all blocks into one signal for the encryption process.
[0132] After the scrambled audio signal is obtained through two scramblings, the scrambled audio signal is divided into a plurality of vectors consisting of 64 samples; the values in each scrambled vector are converted into binary format; bits 1 to 8 are divided from each scrambled vector, and these bits are saved as flag values to be used as flags in a random encryption key Ek selected from the encryption keys generated for each block; bits 9 to 24 (a total of 16 bits) are divided from each scrambled vector, and stored in a binary vector SampV; an XOR operation is performed between the SampV and EK vectors, and the result is saved in binary format as a vector ResV; ResV (16 bits) is returned to bits 9 to 24 in the scrambled vector; each value in the scrambled vector is converted from binary to floating point format; the multi-vector encrypted speech signal is converted into a single vector, and stored as a constructed encrypted audio signal; and the encrypted audio signal is transmitted.
[0133] Finally, the receiving end obtains the original audio signal based on the reverse process of the above encryption process, which specifically includes: dividing the encrypted voice signal samples into multiple vectors consisting of 64 samples; converting the values in each scrambling vector into binary format (64 bits); dividing the 1st to 8th bits from each scrambling vector, and saving these bits as flag values to be used as flags in the random encryption key EK (16 bits) selected from the encryption keys generated for each block; dividing the 9th to 24th bits (a total of 16 bits) from each scrambling vector, and storing them in a binary vector SampV; performing an XOR operation between the SampV and EK vectors, and saving the result in binary format as a vector ResV; returning ResV (16 bits) to the 9th to 24th bits in the scrambling vector; converting each value in each scrambling vector from binary to floating point format; descrambling each vector based on the reverse process of the scrambling algorithm described above; converting the multi-vector decrypted voice signal into a single vector, and storing it as a constructed new signal; transmitting the decrypted voice signal.
[0134] Finally, the security analysis of the encryption algorithm provided by the embodiment of the present invention is as follows: First, the key space is analyzed based on the key space. Key space evaluation is a basic tool for evaluating the efficiency of a security system. A successful algorithm must have a large key space and be sensitive to the key value. The key space of the encryption system must be large enough to withstand brute force attacks. It is generally believed that a key space greater than 2128 is mathematically guaranteed to resist such attacks. (i) The proposed method uses a 32-byte key; (ii) The sine map has one control parameter; (iii) The extended logistic map has four control parameters; (iv) The Hénon map has two control parameters; and (v) The quantum chaos map has five initial requirements and two control parameters. The key space of this scheme is 32×1×4×2×5×2=2560, which meets these requirements. Therefore, this method meets the criteria for cryptographic systems to resist brute force attacks.
[0135] Encryption and decryption speed analysis: In order to optimize the use of the proposed technique in real time, we focus on generating keys that are difficult to predict. In addition, the scrambling stage is separated from the encryption stage to reduce the time required for the encryption and decryption stages. Only a subset of the bits are encrypted (only 16 bits out of 64 bits in each speech signal sample). Table 3 shows the encryption and decryption time for five speech signal files. It can be seen that the time required increases with the increase in the number of samples in the speech stream. By comparing the results of this paper with the results of various studies in Table 3, the method proposed in this paper can output results faster.
[0136]
[0137] Table 3
[0138] Multiple scrambling techniques that rely on bits and blocks make brute force attacks on the speech encryption process more difficult. This distinguishes the present method from existing schemes. The present method is evaluated by comparing it with other methods that use syllables of different lengths or durations. The comparison results also show that the present method is better, as shown in Table 4.
[0139]
[0140]
[0141] Table 4
[0142] like Figure 3 As shown, Figure 3 : is a structural diagram of a control device provided by an embodiment of the present invention. The present invention also provides a control device, including:
[0143] The processor 801 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0144] The memory 802 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 802 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 802, and the processor 801 calls and executes the encryption method of the audio signal in the embodiment of the present application;
[0145] Input / output interface 803, used to implement information input and output;
[0146] The communication interface 804 is used to realize the communication interaction between the present apparatus and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0147] A bus 805 that transmits information between the various components of the device (e.g., the processor 801, the memory 802, the input / output interface 803, and the communication interface 804);
[0148] The processor 801 , the memory 802 , the input / output interface 803 and the communication interface 804 are connected to each other in communication within the device via a bus 805 .
[0149] An embodiment of the present application also provides an electronic device, including the control device as described above.
[0150] An embodiment of the present application further provides a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the above-mentioned audio signal encryption method is implemented.
[0151] As a non-transient computer-readable storage medium, the memory can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and are implemented to be located in one place, or may also be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0152] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media generally include computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0153] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions under the shared conditions without violating the spirit of the present invention. These equivalent deformations or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A method for encrypting an audio signal, characterized in that: Applied to an audio signal processing system, the system includes a transmitting end and a receiving end, and the encryption transmission method includes: The audio signal encryption module obtains a key seed, converts the key seed into an encryption matrix based on a preset encoding rule and a chaotic matrix, and divides the encryption matrix into a plurality of key vectors, wherein the chaotic matrix is generated based on a sine map, an extended logistic map, and a Hénon map; The audio signal encryption module obtains an original audio signal and divides the original audio signal into a plurality of original audio vectors; The audio signal encryption module scrambles all the original audio vectors to obtain multiple scrambled audio vectors, obtains an audio flag and a first vector from each of the scrambled audio vectors, and encrypts the first vector based on the key vector, wherein one first vector corresponds to one key vector; The audio signal encryption module resynthesizes all corresponding scrambled audio vectors with the first vector based on the audio flag to obtain multiple encrypted audio vectors, and generates an encrypted audio signal based on the encrypted audio vectors.
2. The method for encrypting an audio signal according to claim 1, characterized in that: The audio signal encryption module obtains a key seed and converts the key seed into an encryption matrix based on a preset encoding rule and a chaotic matrix, including: Taking each character in the key seed as a vertex and connecting every two vertices with an edge, generating a path graph, and encoding all characters in the path graph based on the encoding rule; Obtaining an adjacency matrix based on the encoded path graph by calculation, wherein the dimension of the adjacency matrix is equal to the string length of the key seed; Generate a plurality of random integer values based on a sine map, process all the integer values in turn through an extended logistic map and a Hénon map to obtain a plurality of independent values, and generate a chaotic vector based on the independent values; Converting the chaotic vector into the chaotic matrix, wherein the dimension of the chaotic matrix is equal to the string length of the key seed; The encoding matrix and the chaotic matrix are multiplied together, and the matrix obtained by the multiplication is multiplied with the lower triangular matrix that has been rotated once to obtain the encryption matrix.
3. The method for encrypting an audio signal according to claim 1, characterized in that: The audio signal encryption module scrambles all the original audio vectors to obtain a plurality of scrambled audio vectors, including: Divide the original audio signal into a plurality of first value blocks, wherein each of the first value blocks includes N characters, where N is a positive integer; Generate an index key based on a quantum logistic chaotic map, wherein the index key includes a plurality of samples, and the number of the samples is equal to the number of the characters of the first value block; Based on the order of the samples in the index key, reorder the position of each character in each of the first value blocks to obtain a plurality of primary scrambling vectors; A primary scrambled audio is generated based on all the primary scrambling vectors.
4. The method for encrypting an audio signal according to claim 3, characterized in that: The audio signal encryption module scrambles all the original audio vectors to obtain a plurality of scrambled audio vectors, and further comprises: Divide the primary scrambled audio into a plurality of the second value blocks, wherein each of the second value blocks includes 2N characters, where N is a positive integer; Convert all the second value blocks from floating point format to binary format, and convert a first preset number segment in each second value block into a DNA sequence, wherein the first preset number segment is composed of a continuous segment of characters in the second value block; After the conversion is completed, all the second data blocks are restored to a floating point format, and the scrambled audio signal is generated based on all the second value blocks.
5. The method for encrypting an audio signal according to claim 1, characterized in that: The obtaining an audio flag and a first vector from each of the scrambled audio vectors, and encrypting the first vector based on the key vector, comprises: Convert all the values constituting the scrambled audio vector from a floating point format to a binary format, generate the audio flag based on a second preset number segment in the scrambled audio vector, and segment the first vector based on a third preset number segment in the scrambled audio vector, wherein the second preset number segment and the third preset number segment are both composed of a continuous segment of characters in the scrambled audio vector, and the second preset number segment and the third preset number segment are adjacent to each other; An XOR operation is performed on each of the first vectors and each of the key vectors to generate a plurality of the second vectors, wherein an XOR operation is performed on one of the first vectors and one of the key vectors.
6. The method for encrypting an audio signal according to claim 5, characterized in that: The step of resynthesizing all corresponding scrambled audio vectors with the first vector based on the audio flag to obtain a plurality of encrypted audio vectors includes: Convert all the second vectors into third value blocks, and re-add each of the third value blocks to the scrambled audio vector based on the audio flag to obtain a plurality of the encrypted audio vectors, wherein the position of the third value block is the same as the position of the third preset number segment; All numerical values constituting the scrambled audio vector are converted from binary format to floating point format.
7. The method for encrypting an audio signal according to claim 6, characterized in that: The audio signal processing system further includes an audio signal decryption module, the audio signal decryption module is communicatively connected with the audio signal encryption module, and after the audio signal encryption module generates an encrypted audio signal based on the encrypted audio vector, the method further includes: The audio signal encryption module sends the encrypted audio signal to the audio signal decryption module; The audio signal decryption module converts all the second vectors in the encrypted audio vector into the first vector based on the encrypted audio vector, the audio flag and the key vector to obtain the scrambled audio signal; The audio signal decryption module performs descrambling processing on the scrambled audio signal to obtain the original audio signal.
8. A control device, characterized in that: It includes at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute the encryption method of the audio signal as described in any one of claims 1 to 7.
9. An electronic device, characterized in that: Comprising the control device as claimed in claim 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the audio signal encryption method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Image encryption and decryption method employing DNA scrambling coding and chaotic mapping
CN107798708A
Image encryption method synchronously realized by fractional order complex system based on mixed time lag
CN112199690A
Data processing method, system and device and storage medium
CN117010009A
Chaotic map-based digital chaotic encryption method
WO2018153317A1
Cited By
Audio signal encryption method and apparatus, and electronic device and storage medium
WO2026077179A1