Audio encryption method based on SM4 and dynamic S-box

Through the audio encryption method based on SM4 and dynamic S box, the SM4 algorithm is improved by using chaotic sequences and dynamic S box, and the problems of small key space and weak security in the existing audio encryption method are solved, achieving efficient and secure audio data transmission.

CN114598444BActive Publication Date: 2024-11-29CHINA UNIV OF MINING & TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210201709.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-03
Publication Date
2024-11-29
Estimated Expiration
2042-03-03

AI Technical Summary

Technical Problem

The existing audio encryption methods have problems such as small key space, lossy encryption process or weak security, making it difficult to effectively protect the security of audio data.

Method used

Using the audio encryption method based on SM4 and dynamic S box, encrypted audio is generated through the steps of integerizing phonemes, generating chaotic sequences, audio confusion, chaotic sequence integerization, generating dynamic S box, SM4 algorithm improvement and audio diffusion, etc., and using the steps of Chen's Chaos system generates the same chaos sequence for decryption.

Benefits of technology

It improves the security and efficiency of audio encryption, and the generated ciphertext data has good dynamics and reliability. The decryption process is lossless, which significantly improves the transmission security of audio data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114598444B_ABST
    Figure CN114598444B_ABST
Patent Text Reader

Abstract

An audio encryption method based on SM4 and dynamic S-box. At present, people are increasingly relying on mobile phones and other tools for communication, and the security of audio data is becoming more and more serious. In order to ensure the security of audio network transmission, an audio encryption method based on SM4 and dynamic S-box is proposed. First, the phonemes are integerized and scrambled by the chaotic sequence generated by Logistic mapping; secondly, the dynamic S-box is generated by Chen chaos; thirdly, the phoneme matrix is ​​diffused by the improved SM4 algorithm; finally, the phonemes are decimalized. Method analysis and experimental results show that the new method has high security and can resist common attacks such as statistical attacks, differential attacks and exhaustive attacks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an information encryption technology, in particular to an audio encryption method. Background Art

[0002] In today's rapidly evolving information age, people are increasingly reliant on mobile phones and other tools for communication, and audio data security issues are becoming increasingly serious. However, due to the open and shared nature of the internet, audio transmission over the internet still faces the risk of illegal theft and dissemination, as well as the leakage of personal privacy. The security of audio information transmission and storage is receiving widespread attention and attention.

[0003] Audio encryption primarily involves phoneme scrambling and phoneme diffusion. Scrambling disrupts the positions of phonemes, while diffusion modifies their values. To improve the security of audio encryption and ensure efficient audio transmission, a dynamic S-box is generated by combining SM4 and chaos. This method, based on SM4 and dynamic S-boxes, is proposed, which features a lossless decryption process. Furthermore, the dynamic S-boxes generated by the chaotic system are sensitive to initial values ​​and highly reliable, further enhancing the method's dynamic nature. Summary of the Invention

[0004] The purpose of the present invention is to propose an audio encryption method based on SM4 and dynamic S-box to address the problems of small key space, lossy encryption process or weak security in existing audio encryption methods.

[0005] Technical solution of the present invention: To achieve the above-mentioned purpose of the invention, the technical solution adopted is an audio encryption method based on SM4 and dynamic S-box, and the encryption steps are detailed as follows:

[0006] Step 1: Phoneme integerization: Let the original audio be P 1 , whose size is k ×1, P 1 The value range of the elements in is [-1,1], and the rounding operation is performed on them:

[0007] P 2 = floor (( P 1 +1)×128), (1)

[0008] in, floor (·) is a function that rounds down to an integer. According to the formula, we can get the integer phoneme sequence P 2 , P 2 The value range of the elements in is [0, 256];

[0009] Step 2: Generate chaotic sequence: Chen chaotic system is:

[0010] , (2)

[0011] Among them, when the control parameter a =35, b =3 and c =28, the system is in a chaotic state; the initial value of the chaotic system is randomly selected x 0, y 0, z 0, according to formula (1), iterate 356 times to generate three chaotic sequences with length 356. X 1 , Y 1 , Z 1 , remove X 1 , Y 1 , Z 1 The first 100 values ​​of , we can get 3 new sequences with length 256 X 2 , Y 2 , Z 2 ; Logstic mapping is:

[0012] x n+1 =μ x n (1+ x n ), n =0, 1, …, k , (3)

[0013] Among them, μ∈[3.57, 4) is the control parameter, x 0∈(0, 1), randomly select μ and initial value x 0, iterate formula (3) k times, we can get a length of k Chaotic sequence Q 1 ,right Q 1 Arrange in ascending order to get a new chaotic sequence Q 2 ;

[0014] Step 3: Audio Scrambling: Exploit Q 1 andQ 2 The corresponding relationship between element positions P 2 Perform scrambling and get the scrambled matrix P 3 ;

[0015] Step 4: Integerization of chaotic sequence: Calculation:

[0016] X 3 = uint 8(( X 2 -min ( X 2 )) / ( max ( X 2 ) -min ( X 2 ))×255), (4)

[0017] Y 3 =uint 8(( Y 2 -min ( Y 2 )) / ( max ( Y 2 ) -min ( Y 2 ))×255), (5)

[0018] Z 3 = uint 8(( Z 2 -min ( Z 2 )) / ( max ( Z 2 ) -min ( Z 2 ))×255), (6)

[0019] in, unit 8(·) is a function that converts a double-precision variable into an 8-bit unsigned integer. max (·) is the function to access the maximum element of the array, min (·) is a function that accesses the minimum element of an array,X 3 , Y 3 , Z 3 is an integer chaotic sequence;

[0020] Step 5: Generate dynamic S-box: Calculate:

[0021] S X = reshape ( X 3 , 16, 16), (7)

[0022] S Y = reshape ( Y 3 , 16, 16), (8)

[0023] S Z =reshape ( Z 3 , 16, 16), (9)

[0024] in, S X , S Y , S Z The three dynamic S-boxes generated are all 16×16 in size. reshape (·) is the array reconstruction function, and Table 1 is the original static S-box of the SM4 algorithm. S o,

[0025] calculate:

[0026] S d 1 = S o⊕ S X , (10)

[0027] S d 2 = S o⊕ S Y , (11)

[0028] S d 3 = S o⊕ S Z, (12)

[0029] Among them, ⊕ is an XOR operation, and we can get three dynamic S-boxes of size 16×16. S d 1 , S d 2 , S d 3 ;

[0030] Step 6: SM4 algorithm improvement: plaintext data U 1 is 128 bits, U 1 is divided into 4 equal parts of 32 bits X 0, X 1, X 2, X 3, that is U 1=( X 0, X 1, X 2, X 3) Calculation:

[0031] A = X i+1 ⊕ X i+2 ⊕ X i+3 ⊕ R i , i =0, 1, …, 31, (13)

[0032] in, R i is the round key, A is a 32-bit binary number. A Split into four equal parts of 8 bits a 0, a 1, a 2, a 3, that is A =( a 0, a 1, a 2, a 3) Calculation:

[0033] B = t ( A )=( Sbox ( a 0), Sbox ( a 1), Sbox ( a 2),Sbox ( a 3)), (14)

[0034] in, Sbox (·) is the S-box transformation, t (·) is a nonlinear transformation, which is essentially a parallel S-box transformation. The S-box transformation converts the value formed by the combination of the first 2 bits and the last 2 bits of the input 8-bit byte into a hexadecimal number as the row of the S-box, and the value formed by the middle 4 bits into a hexadecimal number as the column of the S-box. The number in the S-box determined by the row and column is the output of the S-box transformation. Here, the S-box is randomly selected. S d 1 , S d 2 or S d 3 One of the a 0, a 1, a 2, a 3 Perform S-box transformation respectively to generate 8-bit binary numbers b 0, b 1, b 2, b 3, that is B = ( b 0, b 1, b 2, b 3);

[0035] L ( B )= B ⊕( B <<2)⊕( B <<10)⊕( B <<18)⊕( B <<24), (15)

[0036] in, L (·) is a linear transformation, << is a bit left shift operation; L The output of (·) is the same as X i XOR, complete a round of iteration,

[0037] X i+4 = X i ⊕ T ( A ), i =0, 1, …, 31, (16)

[0038] in,T (·)= L ( t (·)) t (·)and L (·) constitutes a composite function; after a total of 32 rounds of iteration, the output results are: X 4, X 5, …, X 35 ; U 2= ​​( X 35 , X 34 , X 33 , X 32 ) is the ciphertext data;

[0039] Table 1 Original static S-box of SM4 algorithm S o:

[0040]

[0041] Step 7: Audio Diffusion: In a certain way, P 3 Divide into groups of 128 lengths, use the algorithm in step 6 to perform diffusion operation on the grouped data, and obtain the diffused sequence P 4 , P 4 The value range of the elements in is [0, 256];

[0042] Step 8: Decimalization of Phonemes: Calculation:

[0043] P 5 = P 4 / 128-1, (17)

[0044] Encrypted audio available P 5 .

[0045] The decryption process is the reverse process of the encryption process. In the decryption process, the same chaotic sequence is generated by using Chen chaos to decrypt the original audio.

[0046] Beneficial effects: (1) Three dynamic S-boxes were generated using the Chen chaotic system, and an improved method of SM4 was proposed; (2) An audio encryption method based on SM4 and dynamic S-boxes was proposed; (3) Method analysis and experimental results show that the proposed new method has good security and encryption efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 :Audio encryption flow chart based on SM4 and dynamic S-box;

[0048] Figure 2 : Original audio histogram

[0049] Figure 3 : Encrypted audio histogram. DETAILED DESCRIPTION

[0050] The embodiments of the present invention are further described in detail below with reference to specific drawings and examples.

[0051] The programming software used is Matlab R2019b. The selected audio is encrypted. The proposed audio encryption method based on SM4 and dynamic S-box is adopted. The encryption process is detailed as follows.

[0052] Step 1: Phoneme integerization: Let the original audio be P 1 , whose size is 73113×1, P 1 The value range of the elements in is [-1, 1]; according to formula (1) P 1 Integerization to obtain integer phoneme sequence P 2 , P 2 The value range of the elements in is [0, 256];

[0053] Step 2: Generate chaotic sequence: Select the initial value of the Chern chaotic system x 0=2, y 0=1, z 0=3 and control parameters a =35, b =3 and c =28, and according to formula (2), iterating 356 times, three chaotic sequences with lengths of 1×356 can be generated. X 1 , Y 1 , Z 1 , remove X 1 , Y 1 , Z 1 The first 100 values ​​of , we can get 3 new sequences with length 256 X 2 , Y 2 , Z 2; Select μ=3.80204630113246 and initial value x 0=0.603652021432561, iterate formula (3) 73113 times, and you can get a chaotic sequence with a length of 73113 Q 1 ,right Q 1 Arrange in ascending order to get a new chaotic sequence Q 2 ;

[0054] Step 3: Audio Scrambling: Exploit Q 1 and Q 2 The corresponding relationship between element positions P 2 Perform scrambling and get the scrambled matrix P 3 ;

[0055] Step 4: Integerization of chaotic sequence: According to formulas (4)-(6), X 2 , Y 2 , Z 2 Perform calculations to generate three integer chaotic sequences of length 1×256 X 3 , Y 3 , Z 3 ;

[0056] Step 5: Generate dynamic S-boxes: Generate three dynamic S-boxes of size 16×16 according to formulas (7)-(9) S X , S Y , S Z , after XOR operation with the dynamic S-box given in the table above, we can get three dynamic S-boxes of size 16×16 S d 1 , S d 2 , S d 3 ;

[0057] Step 6: SM4 algorithm improvement: plaintext data U 1 is 128 bits, U 1 is divided into 4 equal parts of 32 bits X 0,X 1, X 2, X 3. Calculate the 32-bit binary number according to formula (13) A ,Will A Split into four equal parts of 8 bits a 0, a 1, a 2, a 3. According to formula (14), a 0, a 1, a 2, a 3 Perform S-box transformation respectively to generate 8-bit binary numbers b 0, b 1, b 2, b 3. After linear transformation according to formula (15), iterate according to formula (16). After a total of 32 rounds of iteration, the output results are as follows: X 4, X 5, …, X 35 ; U 2= ​​( X 35 , X 34 , X 33 , X 32 ) is the ciphertext data;

[0058] Step 7: Audio Diffusion: In a certain way, P 3 Divide into groups of 128 lengths, use the algorithm in step 6 to perform diffusion operation on the grouped data, and obtain the diffused sequence P 4 , P 4 The value range of the elements in is [0, 256];

[0059] Step 8: Decimalization of phonemes: According to the above formula (17), P 4 By decimalizing, we can get the encrypted audio P 5 .

[0060] The decryption process is the reverse process of the encryption process. In the decryption process, the same chaotic sequence is generated by using Chen chaos to decrypt the original audio.

Claims

1. An audio encryption method based on SM4 and dynamic S-box, characterized in that: The encryption process includes the following steps: Step 1: Phoneme integerization: Let the original audio be P 1 , whose size is k ×1, P 1 The value range of the elements in is [-1, 1], and the rounding operation is performed on them: P 2 = floor (( P 1 +1)×128), (1) in, floor (·) is a function that rounds down to an integer, and we get an integer phoneme sequence. P 2 , P 2 The value range of the elements in is [0,256]; Step 2: Generate chaotic sequence: Chen chaotic system is: , (2) Among them, when the control parameter a =35, b =3 and c =28, the system is in a chaotic state; the initial value of the chaotic system is randomly selected x 0, y 0, z 0, according to formula (1), iterate 356 times to generate three chaotic sequences with a length of 356. X 1 , Y 1 , Z 1 , remove X 1 , Y 1 , Z 1 The first 100 values ​​of , we can get 3 new sequences with length 256 X 2 , Y 2 , Z 2 ; Logistic mapping is: x n+1 =m x n (1+ x n ), n =0, 1, …, k , (3) Among them, μ∈[3.57, 4) is the control parameter, x 0∈(0, 1), randomly select μ and initial value x 0, iterate formula (3) k times, we can get a length of k Chaotic sequence Q 1 ,right Q 1 Arrange in ascending order to get a new chaotic sequence Q 2 ; Step 3: Audio Scrambling: Exploitation Q 1 and Q 2 The corresponding relationship between the element positions P 2 Scramble and get the scrambled matrix P 3 ; Step 4: Integerization of chaotic sequence: Calculation: X 3 = uint 8(( X 2 -min ( X 2 )) / ( max ( X 2 ) -min ( X 2 ))×255), (4) Y 3 =uint 8(( Y 2 -min ( Y 2 )) / ( max ( Y 2 ) -min ( Y 2 ))×255), (5) Z 3 = uint 8(( Z 2 -min ( Z 2 )) / ( max ( Z 2 ) -min ( Z 2 ))×255), (6) in, unit 8(·) is a function that converts a double-precision variable into an 8-bit unsigned integer. max (·) is the function to access the maximum element of the array, min (·) is the function to access the smallest element of an array, X 3 , Y 3 , Z 3 is an integer chaotic sequence; Step 5: Generate dynamic S-box: Calculate: S X = reshape ( X 3 , 16, 16), (7) S Y = reshape ( Y 3 , 16, 16), (8) S Z =reshape ( Z 3 , 16, 16), (9) in, S X , S Y , S Z To generate three dynamic S-boxes of size 16×16, reshape (·) is the array reconstruction function. The following table shows the original static S-box of SM4 algorithm. S o, calculate: S d 1 = S o⊕ S X ,(10) S d 2 = S o⊕ S Y , (11) S d 3 = S o⊕ S Z , (12) Among them, ⊕ is an XOR operation, and we can get three dynamic S-boxes of size 16×16 S d 1 , S d 2 , S d 3 ; Step 6: SM4 algorithm improvement: plaintext data U 1 is 128 bits, U 1 is divided into 4 equal parts of 32 bits X 0, X 1, X 2, X 3, namely U 1=( X 0, X 1, X 2, X 3) Calculation: A = X i+1 ⊕ X i+2 ⊕ X i+3 ⊕ R i , i =0, 1, …, 31, (13) in, R i is the round key, A is a 32-bit binary number. A Split into four equal parts of 8 bits a 0, a 1, a 2, a 3, namely A =( a 0, a 1, a 2, a 3) Calculation: B = t ( A )=( Sbox ( a 0), Sbox ( a 1), Sbox ( a 2), Sbox ( a 3)), (14) in, Sbox (·) is the S-box transformation, t (·) is a nonlinear transformation, which is essentially a parallel S-box transformation. The S-box transformation converts the value formed by the combination of the first 2 bits and the last 2 bits of the input 8-bit byte into a hexadecimal number as the row of the S-box, and the value formed by the middle 4 bits into a hexadecimal number as the column of the S-box. The number in the S-box determined by the row and column is the output of the S-box transformation. Here, the S-box is randomly selected. S d 1 , S d 2 or S d 3 One of them, yes a 0, a 1, a 2, a 3 Perform S-box transformation respectively to generate 8-bit binary numbers b 0, b 1, b 2, b 3, namely B = ( b 0, b 1, b 2, b 3); L ( B )= B ⊕( B <<2)⊕( B <<10)⊕( B <<18)⊕( B <<24), (15) in, L (·) is a linear transformation, << is a bitwise left shift operation; L The output of (·) is the same as X i XOR, complete a round of iteration, X i+4 = X i ⊕ T ( A ), i =0, 1, …, 31, (16) in, T (·)= L ( t (·)) t (·)and L (·) composed of a composite function; after a total of 32 rounds of iterations, the output results are: X 4, X 5, …, X 35 ; U 2= ​​( X 35 , X 34 , X 33 , X 32 ) is the ciphertext data; Step 7: Audio Diffusion: In a certain way, P 3 Divide into groups of length 128, use the algorithm in step 6 to perform diffusion operation on the grouped data, and obtain the diffused sequence P 4 , P 4 The value range of the elements in is [0, 256]; Step 8: Decimalization of phonemes: Calculation: P 5 = P 4 / 128-1, (17) Encrypted audio available P 5 .

Citation Information

Patent Citations

  • WSN (Wireless Sensor Network) dynamic composite chaotic encryption method based on S-box

    CN109412784A

  • Bit-level audio encryption method based on chaos

    CN111682930A

  • Multi-audio encryption method based on chaos and Zigbee transformation

    CN111865553A