A voice-aware hash authentication method based on smart contracts

Through the speech-aware hash authentication method that combines smart contracts and interstellar file systems, the spectral flux and spectral entropy characteristics of the speech signal are extracted, and a hash value is generated, which solves the security problem of cloud speech data in storage and transmission, and achieves Efficient authentication and secure storage of voice data.

CN115296820BActive Publication Date: 2024-10-25NORTHWEST NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211005594.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-22
Publication Date
2024-10-25
Estimated Expiration
2042-08-22

AI Technical Summary

Technical Problem

Existing technologies cannot effectively protect the integrity and authenticity of voice data, which is especially vulnerable to theft and tampering during cloud storage and transmission, and traditional hash cryptography technology cannot meet the needs of voice users.

Method used

A speech-aware hash authentication method based on smart contracts is used to pre-emphasize, frame and window the speech signal to extract spectral flux and improved spectral entropy method features to generate a speech-aware hash value, combined with Ethereum intelligence Contract and interstellar file system realize safe storage and authentication of voice files.

Benefits of technology

This method improves the security and robustness of voice data, can maintain the robustness and distinction of operations in the presence of environmental noise, resampling and compression, solves the problem of easy tampering and loss of cloud storage, and satisfies the cloud storage requirements. The need for speech-aware hash authentication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115296820B_ABST
    Figure CN115296820B_ABST
Patent Text Reader

Abstract

The present invention discloses a speech perception hash authentication method based on smart contracts, which pre-processes the input speech signal to obtain the processed speech signal; performs spectral flux feature extraction and improved spectral entropy feature extraction on the processed speech signal, performs inner product on the extracted features to obtain speech perception features; binarizes the speech perception features; and the smart contract is automatically executed, either successfully executed or all state changes are revoked. When a transaction is sent to a blockchain, if the triggering conditions of the smart contract are met, the preset logic is automatically executed. After the majority of verification nodes in the blockchain reach a consensus, the smart contract will be successfully executed. The main functional modules include key processing mechanisms such as uploading contracts, digital signatures, updating contracts, and searching contracts. The authentication method has more human perception characteristics, can better reflect the characteristics of speech signals, is suitable for signal transmission in complex environments, is more reliable, more fair, and can well protect the security of voice data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of voice authentication and relates to a voice-aware hash authentication method based on smart contracts. Background Art

[0002] With the rapid development of cloud computing, Internet technology and mobile technology, multimedia applications have also spread widely. Voice, as one of the most typical and popular multimedia information, is also the most direct and convenient tool for obtaining information. It has the characteristics of high redundancy and low confidentiality. However, in certain specific cases, voice data may be attacked by theft, malicious tampering, etc. during storage and transmission, which will seriously affect the authenticity and integrity of voice. How to effectively protect the integrity and authenticity of voice is receiving increasing attention.

[0003] With the continuous development of hash cryptography, traditional hash cryptography has long been unable to meet the needs of voice users. In 2001, Ton Kalker first proposed the concept of "Perceptual Hashing". Perceptual hashing, also known as robust hashing and digital fingerprinting, is a new hash cryptography technology that combines human perception characteristics. It selects feature parameters with perceptual significance, and hashes the perceptual feature parameters and voice features to generate perceptual hash values, which have the characteristics of anti-collision, unidirectionality, randomness, and easy retrieval. It not only has the advantages of cryptographic hash functions, but also has the robustness of maintaining voice content after operation and the ability to distinguish different voice content. It has gradually become one of the important technologies for multimedia content authentication, and has also been widely used in cloud retrieval and authentication. However, with the rapid development of science and technology, cloud storage in existing technologies has the disadvantages of low security, high cost, and slow transmission speed, and can no longer guarantee the security of voice files. Summary of the invention

[0004] The purpose of the present invention is to provide a voice-aware hash authentication method based on smart contracts, which can meet the current needs of cloud-based voice-aware hash authentication.

[0005] To achieve the above purpose, the technical solution adopted by the present invention is: a voice-aware hash authentication method based on smart contracts, specifically:

[0006] For speech signals:

[0007] Step 1: Input speech signal x ( n ) After pre-emphasis, framing and windowing, the processed speech signal is obtained x′ ( n );

[0008] Step 2: Process the speech signal x′ (n ) to extract the spectral flux feature and the improved spectral entropy feature extraction:

[0009] Spectral flux feature extraction:

[0010] Calculated spectral flux characteristics SF = SF ( i )| i =1,2,…, N},in, i For the i The sample value of the frame ,N is the length of the hash sequence.

[0011] Improved spectral entropy feature extraction:

[0012] 1) After preprocessing i The frame speech signal is , then the DFT transform formula is:

[0013]

[0014] In the formula, X i ( k ) is the short-time Fourier transform of; j and k are all constants;

[0015] 2) Calculate subband energy:

[0016] Each frame signal is divided into several sub-bands, the number of sub-bands is N b , then i The first b The energy of the subband is E b ( b , i )for:

[0017]

[0018] In the formula, Y i ( k ) is the k Energy spectrum of the frequency components of each spectral line;

[0019] 3) Improved spectral entropy feature extraction:

[0020] First calculate the subband energy probability, then calculate the subband spectral entropy, so as to obtain the improved spectral entropy method characteristics H b = H b ( i )|i =1,2,…, N}, i For the i frame, N is the length of the hash sequence; where the subband energy probability p b ( b , i )for:

[0021]

[0022] Then the improved spectral entropy method features H b ( i )for:

[0023]

[0024] Step 3: Speech-aware hash generation:

[0025] 1) Speech perception features

[0026] The spectral flux characteristics SF With the improved spectral entropy method features H b Perform inner product to obtain speech perception features G = G ( i )| i =1,2,…, N},in i For the i frame, N is the hash sequence length;

[0027] G= SF × H b

[0028] 2) Hash construction

[0029] Binarize the speech perception features to generate a speech perception hash of a sequence of 0 and 1 z = z ( i )| i =1,2,…, N},in i For the i frame, z ( i ) is the i The hash value of the frame, N is the hash sequence length;

[0030] For smart contracts:

[0031] System initialization: The system generates a safety parameter λ by using a random function by clicking a button. λ ) Function output system public parameters pp ; Then enter the user attribute set S u , user identity set ID and system public parameters pp , by GKey( S u , ID , pp ) function determines whether the account has been registered and randomly selects a collision-resistant Hash hash, and outputs the voice user key set K =( K pv , K pb , K s ) and user state variable δ, where K pv is the user's private key, K pb is the user's public key, K s is the search key. Finally, the key set is sent through a secure communication channel K Return to the voice owner VO , and broadcast the voice user identity information to the blockchain;

[0032] Upload contract: Extract spectrum flux features separately off-chain SF With the improved spectral entropy method features H b , followed by feature fusion, and then binarization to generate speech-aware hash z = z ( i )| i =1,2,…, N At the same time, the audio file is uploaded to the InterPlanetary File System (IPFS), and the authentication hash is returned. V , will be aware of the hash z and the authentication hash V Spliced ​​transaction information msg , voice owner VO Using the contract account address addr After submitting the upload permission application, obtain the user key set K and user state variable δ, by function Upload( addr , K ,δ) first to the voice owner VO Perform identity verification. If the identity verification is passed, execute the digital signature Φ={ addr , K , msg, sig Generate signature information, where addr is the account address, K is the user key set, msg For transaction information, sig It is to split the state variables; finally, the transaction is carried out through the contract to calculate the fuel (GAS) consumed by the block upload. If there is not enough balance in the account to pay, the system will roll back;

[0033] Update contract: contract setting account address addr Mapping relationship with user ID: addr →ID, get key set K , enter the update token u , by the function Update( addr , token u , K , umsg ) First, to the voice owner VO Perform identity verification and operation authority verification, then update the contract to determine whether to broadcast the token to the blockchain based on the mapping relationship and digital signature Φ, update the block to calculate the GAS fee and output the transaction information after the updated signature. You can also call Delete( addr , token d , K ) function to perform the deletion operation, verify the authority to find the on-chain index position to be deleted and spend GAS to operate it. If there is not enough balance in the account to pay, the system rolls back;

[0034] Search Contract: Voice User VU Submit search token s and search key K s Apply for permissions. If not satisfied, an error identifier ⊥ is output. If satisfied, the transaction Tx is sent to the address of the search smart contract, and the Search (token) of the search smart contract is called. s , K s , msg) function to search, detect whether the keywords in the token are the same as the keywords in the search, whether the user attributes meet the access structure, and output digital summary information msg , sign and decrypt it, according to the voice owner VO Public Key K pb and address addr Decrypt the signature information and output the transaction information Tx to the voice user VU Used for off-chain voice hash authentication.

[0035] In order to solve the shortcomings of voice authentication data being easily tampered with and lost in cloud storage, the Ethereum smart contract and Inter Planetary File System (IPFS) are combined to store voice perception hash data. Ethereum is a distributed application platform for smart contracts, which expands the functions of Bitcoin, supports Turing-complete scripting languages, and is a programmable blockchain system. Smart contracts are assembly languages ​​programmed on the blockchain, which use a section of computer instructions to achieve self-verification, automatic execution, and generate verifiable evidence to prove the validity of contract operations without human interference. The InterPlanetary File System is a network transmission protocol designed to create persistent and distributed storage and shared files. It is a content-addressable peer-to-peer hypermedia distribution protocol.

[0036] The speech-aware hash authentication method of the present invention integrates the Ethereum smart contract and the speech-aware hash authentication method. The interplanetary file system distributed mechanism and blockchain technology are used to realize the storage of voice files and voice hashes, and the Ethereum smart contract is used to execute the signature, retrieval and authentication of the voice hash. Trusted transactions can be carried out without a third party, ensuring the security of voice data. At the same time, the speech-aware hash authentication method generated by the fusion of spectral flux and improved spectral entropy method features has very good robustness, discrimination and security for environmental noise, resampling, MP3 compression and other content-keeping operations, which solves the problems of easy tampering and loss of data in centralized server voice authentication, and can meet the needs of cloud-based speech-aware hash authentication at this stage.

[0037] Compared with the prior art, the authentication method of the present invention has the following advantages:

[0038] 1) Using speech-aware hashing to extract speech features has more human-perceptual characteristics than traditional speech features extracted from the original domain and can better reflect the characteristics of speech signals.

[0039] 2) The operation is very robust to speech content preservation, especially in the case of resampling, low-pass filtering, noise and MP3 compression.

[0040] 3) Use smart contracts to realize cloud transmission of voice, and realize the addition, deletion, modification and query of voice-aware hashes on smart contracts. No third-party human interference is required, and it is strictly executed according to the conditions of the contract, with the following characteristics.

[0041] 4) Use Interstellar File System for voice cloud storage. It is a distributed storage system that can store uploaded files in blocks in nearby network nodes. When needed, the node information is obtained according to the authentication hash value to splice the required voice file, which is more secure and tamper-proof.

[0042] 5) In order to improve the cloud voice data from possible theft and tampering attacks during transmission and storage, the distributed storage features of Ethereum smart contracts and Interstellar File System (IPFS) are used. First, the voice is preprocessed, framed and windowed, and then the average difference between two adjacent audio frames in the spectrum is calculated to obtain the spectrum flux and the improved spectral entropy method for feature fusion to generate perceptual hash. Finally, the smart contract is used to execute the signature, retrieval and authentication of the voice hash and store the voice file in the IPFS Interstellar File System, Ethereum smart contract and IPFS. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 This is a flow chart of the voice-aware hash authentication method based on smart contracts of the present invention.

[0044] Figure 2 This is a framework diagram for speech-aware hash feature fusion extraction in the authentication method of the present invention.

[0045] Figure 3 This is the BER distribution law of the perceptual hash algorithm in the authentication method of the present invention.

[0046] Figure 4 This is a FAR error rate diagram of the perceptual hash algorithm in the authentication method of the present invention.

[0047] Figure 5 It is the FAR-FRR curve diagram of the perceptual hash algorithm in the authentication method of the present invention and the FAR-FRR curve diagrams of three perceptual hash algorithms in the prior art.

[0048] Figure 6 It is the Hamming distance graph of correct key decryption and incorrect key decryption of speech-aware hash in the authentication method of the present invention.

[0049] Figure 7 It is a scatter plot before and after speech perception hash encryption in the authentication method of the present invention. DETAILED DESCRIPTION

[0050] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0051] The present invention provides a voice-aware hash authentication method based on smart contracts, the flow chart of which is as follows: Figure 1 As shown, the specific steps are as follows:

[0052] For speech signals:

[0053] Speech-aware hash feature extraction fusion, its framework diagram, such as Figure 2 ;

[0054] Step 1: Speech signal preprocessing:

[0055] Get the input voice signalx ( n ), and then the speech signal x ( n ) After pre-emphasis, framing and windowing, the processed speech signal is obtained x′ ( n );

[0056] Pre-emphasis is a signal processing method that compensates the high-frequency components of the input signal at the transmitting end. It is to compensate for the loss of high-frequency components and enhance the high-frequency components. Framing and windowing are to make the speech signal periodic and form a stable speech signal. The windowing function generally selects the Hamming window.

[0057] Step 2: Process the speech signal x′ ( n ) to extract the spectral flux feature and the improved spectral entropy feature extraction:

[0058] Spectral flux feature extraction:

[0059] Since speech signals are composed of unvoiced and voiced sounds, the energy mutation between adjacent frames is relatively large, and the spectral flux can well characterize the characteristics of speech signals.

[0060] Spectral flux is the average value of the difference between all two adjacent audio frames in the spectrum. It can be used to describe the spectral energy change of a certain speech signal and can show the mutation degree of speech signal energy, which is beneficial to improve the retrieval accuracy of the system. The spectral flux feature is calculated SF = SF ( i )| i =1,2,…, N},in, i For the i The sample value of the frame ,N is the length of the hash sequence.

[0061] Spectral flux characteristics SF Calculation:

[0062]

[0063] In the formula, Z ( i , k ) is the preprocessed speech signal x′ ( n ) After Fourier transformation i The periodic signal of the frame; K are the coefficients of the discrete Fourier transform; N is the length of the hash sequence; k is a constant;

[0064] Improved spectral entropy feature extraction:

[0065] 1) In order to eliminate the influence of noise on the amplitude of the spectrum line after the fast Fourier transform (FFT) of each frame signal, the spectrum entropy of each spectrum line is changed to the spectrum entropy of the sub-band; each frame signal is divided into several sub-bands, and then the spectrum entropy of each sub-band is calculated, so that the interference of noise on the amplitude of each spectrum line is eliminated. i The frame speech signal is Then the DFT transform formula is:

[0066]

[0067] In the formula, X i ( k )yes The short-time Fourier transform of j and k are all constants.

[0068] 2) Calculate subband energy:

[0069] The sub-band energy reflects the distribution of the signal's spectral energy in the entire spectrum; each sub-band consists of 4 spectral lines, and the number of sub-bands is N b , then i The first b The energy of the subband is E b ( b , i )for:

[0070]

[0071] In the formula, Y i ( k ) is the k Energy spectrum of the frequency components of each spectral line;

[0072] 3) Improved spectral entropy feature extraction:

[0073] First calculate the subband energy probability, then calculate the subband spectral entropy, so as to obtain the improved spectral entropy method characteristics H b = H b ( i )| i =1,2,…, N}, i For the i frame, N is the length of the hash sequence; where the subband energy probability p b ( b , i )for:

[0074]

[0075] Then the improved spectral entropy method features H b ( i )for:

[0076]

[0077] Step 3: Speech-aware hash generation:

[0078] 1) Speech perception features

[0079] The extracted spectral flux features SF With the improved spectral entropy method features H b Perform inner product to obtain speech perception features G = G ( i )| i =1,2,…, N},in i For the i frame, N is the length of the hash sequence. The fusion formula is: G= SF × H b

[0080] 2) Hash construction

[0081] Binarize the speech perception features to generate a speech perception hash of a sequence of 0 and 1 z = z ( i )| i =1,2,…, N},in i For the i frame, z ( i ) is the i The hash value of the frame, N is the length of the hash sequence; the hash construction formula is as follows:

[0082]

[0083] in, i For the i frame, N is the hash sequence length.

[0084] For smart contracts:

[0085] Smart contracts are assembly language programmed on the blockchain. They are automatically executed. They are either successfully executed or all state changes are revoked. No human control is required. When a transaction is sent to the blockchain, if the triggering conditions of the smart contract are met, the pre-set logic will be automatically executed. After the majority of verification nodes in the blockchain reach a consensus, the smart contract will be successfully executed. The main functional modules of the present invention are: uploading contracts, digital signatures, updating contracts, searching contracts and other key processing mechanisms. The specific scheme is as follows:

[0086] System initialization: The system generates a safety parameter λ by using a random function by clicking a button. λ ) Function output system public parameters pp . Then enter the user attribute set S u , user identity set ID and system public parameters pp , by GKey( S u , ID , pp ) function determines whether the account has been registered and randomly selects a collision-resistant Hash hash, and outputs the voice user key set K =( K pv , K pb , K s ) and user state variable δ, where K pv is the user's private key, K pb is the user's public key, K s is the search key. Finally, the key set is sent through a secure communication channel K Return to the voice owner VO , and broadcast the voice user identity information to the blockchain.

[0087] Upload contract: Extract spectrum flux features separately off-chain SF With the improved spectral entropy method features H b , followed by feature fusion, and then binarization to generate speech-aware hash z = z ( i )| i =1,2,…, N At the same time, the audio file is uploaded to the InterPlanetary File System (IPFS), and the authentication hash is returned. V , will be aware of the hash z and the authentication hash V Spliced ​​transaction information msg , voice owner VO Using the contract account address addr After submitting the upload permission application, obtain the user key set K and user state variable δ, by function Upload( addr , K ,δ) first to the voice owner VO Perform identity verification. If the identity verification is passed, execute the digital signature Φ={ addr , K , msg , sig Generate signature information, where addr is the account address, K is the user key set, msg For transaction information, sig It is the state variable of the segmentation. Finally, the transaction is carried out through the contract to calculate the fuel (GAS) consumed by the block upload. If there is not enough balance in the account to pay, the system will roll back.

[0088] Update contract: contract setting account address addr Mapping relationship with user ID: addr →ID, get key set K , enter the update token u , by the function Update( addr , token u , K , umsg ) First, to the voice owner VO Perform identity verification and operation authority verification, then update the contract to determine whether to broadcast the token to the blockchain based on the mapping relationship and digital signature Φ, update the block to calculate the GAS fee and output the transaction information after the updated signature. You can also call Delete( addr , token d , K ) function to perform the deletion operation, verify the authority to find the on-chain index position to be deleted and spend GAS to operate it. If there is not enough balance in the account to pay, the system rolls back.

[0089] Search Contract: Holds Voice Owner VO Voice user of voice message VU Submit search token s and search key K s Apply for permissions. If not satisfied, an error identifier ⊥ is output. If satisfied, the transaction Tx is sent to the address of the search smart contract, and the Search (token) of the search smart contract is called. s , K s, msg) function to search, detect whether the keywords in the token are the same as the keywords in the search, whether the user attributes meet the access structure, and output digital summary information msg , sign and decrypt it, according to the voice owner VO Public Key K pb and address addr Decrypt the signature information and output the transaction information Tx to the voice user VU Used for off-chain voice hash authentication.

[0090] Voice owner VO: A user who holds voice data and plans to upload the voice data to the cloud through a smart contract.

[0091] Voice user VU: A user who holds the authentication information or voice information of the voice owner VO. It is planned to authenticate the cloud voice data of the voice owner VO to determine whether the cloud voice data is the voice of the voice owner VO.

[0092] Experimental analysis

[0093] A simulated Ethereum network is built locally through Ganache software. The smart contract adopts solidity language, Meta Mask is used to implement the user wallet transaction function, and the script written in JavaScript interacts with the smart contract to realize the storage, update and search functions. At the same time, the authentication method of the present invention is experimentally evaluated by analyzing the distinguishability and robustness of the speech-aware hash algorithm. The processor used in the simulation experiment is AMD Ryzen74800H 2.90GHz, and the operating system is Microsoft Windows 1064-bit with 16G memory. The data set used in the experiment comes from TIMIT (Texas Instruments and Massachusetts Institute of Technology) and TTS (Text to Speech) voice library. There are 1200 different voice clips in the original voice database. The format of each voice clip is wav, the length is 4s, 16-bit PCM, mono, and the sampling frequency is 16khz. In order to meet the experimental needs, a voice library with a total of 1,200 voices was established. According to the voice transmission environment, content preservation operations were performed on the original voice library, and a voice library of 14,400 segments with different content preservation operations was established, which included twelve content preservation operations such as echo, noise, low-pass filter, resampling, and MP3 compression.

[0094] Discrimination Testing and Analysis:

[0095] Discrimination is the reliability of different people or the same person reading different speech contents. The bit error rate of the perceptual hash value of speech with different contents basically follows Normal distribution, where; N is the length of the perceptual hash sequence. The perceptual hash sequence length of the speech segment in the present invention is N=798. By performing pairwise matching of perceptual hash values ​​of 1200 speech segments, 7.194×10 5 The bit error rate (BER) data is used to introduce the BER normal probability graph distribution into the discrimination test and analysis. The BER of the perceptual hash values ​​of different content speech basically obeys the normal distribution. Figure 3 Theoretical and experimental values ​​of the mean and standard deviation of the normal distribution are described.

[0096] According to the Moivre-Laplace central limit theorem, the theoretical normal distribution parameter mean μ=0.5 and standard deviation δ=0.0177 can be calculated. The experimental data yields mean μ=0.4966 and standard deviation δ=0.0181. It can be seen that the actual value is very close to the theoretical value. Therefore, the hash sequence of the authentication method of the present invention has randomness and anti-collision properties.

[0097] In order to further verify the correctness of the experiment, the false acceptance rate (FAR) of the authentication method is calculated. The false acceptance rate is a commonly used indicator to evaluate the discriminability of speech perceptual hashing systems. The lower the false acceptance rate of the perceptual hashing algorithm, the better the discriminability of the perceptual hashing algorithm. The possibility that two speech segments with different perceptual hash contents are judged by the system as having the same perceptual content is increased. Under the same bit error rate threshold, the smaller the FAR value, the stronger the algorithm's anti-collision ability. Figure 4 is the FAR curve of the authentication method of the present invention, and the FAR calculation formula is:

[0098]

[0099] In the formula, τ is the perceptual hash threshold; μ is the BER mean; δ is the BER standard deviation.

[0100] It can be seen that the actual value of the normal distribution parameter obtained by the authentication method of the present invention is relatively close to the theoretical value, indicating that the authentication method of the present invention has good discrimination. In order to better reflect the recognition ability of the present invention under different thresholds, the thresholds under different hash lengths are analyzed, as shown in Table 1.

[0101] Table 1 FAR comparison under different lengths and different thresholds

[0102]

[0103] It can be seen from Table 1 that the authentication method of the present invention has a small error recognition rate for different hash sequence lengths, which means that the authentication method of the present invention has good anti-collision capability, that is, it has good distinguishability and can meet the authentication requirements.

[0104] The entropy rate (ER) is often used in statistics to measure the uncertainty of random events. It is a comprehensive indicator for evaluating the discriminability of perceptual hash algorithms, which can overcome the disadvantage that the algorithm is easily affected by the sequence size. The formula is as follows:

[0105] ER=-[ q log2 q +(1- q )log2(1- q )]

[0106] in

[0107]

[0108] In the formula, σ and σ 1 are the standard deviations of BER theory and experiment, respectively. q The ER value of the authentication method of the present invention is calculated to be 0.9838, which is close to 1, further illustrating that the authentication method of the present invention has good discrimination.

[0109] Robustness testing and analysis:

[0110] Generally, after the speech signal is processed by compression, resampling, volume increase or decrease, and noise addition, the specific changes in the digital representation of the speech signal do not affect the content expression. The robustness of perceptual hashing means that the BER between the original speech data and the BER processed by the content preservation operation is less than the preset threshold. In other words, after some content preservation operations on the original speech data, the perceptual hash sequence of the speech signal should be consistent with the perceptual hash value of the original speech data. In order to evaluate the robustness of the perceptual hashing algorithm, the 1200 voices in the speech library are subjected to the content preservation operation shown in Table 2, and then the mean and maximum BER after each content preservation operation are calculated.

[0111] Table 2 BER mean and maximum values ​​of the proposed algorithm

[0112]

[0113] It can be seen from Table 2 that the BER mean and maximum values ​​under the 12 content-preserving operations do not exceed 0.2306, especially at signal-to-noise ratios of 40 dB and 50 dB, which have obvious advantages. Therefore, the authentication method of the present invention has good robustness.

[0114] In order to comprehensively evaluate the discriminability and robustness of the speech-aware hashing of the present invention, the authentication method of the present invention is compared with three algorithms: discrete wavelet transform (DWT), linear prediction minimum mean square error (LP-MMSE), and non-negative matrix factorization of linear prediction coefficients (LPC-NMF) by FAR-FRR. The comparison curve is shown in the figure. Figure 5 As shown, Figure 5 a is the authentication method of the present invention, Figure 5 b is the discrete wavelet transform (DWT), Figure 5 c is the non-negative matrix factorization of linear prediction coefficients (LPC-NMF), Figure 5 d is the linear prediction minimum mean square error (LP-MMSE).

[0115] Depend on Figure 5 It can be seen that in the FAR-FRR curve of the non-negative matrix decomposition of the linear prediction coefficient and the FAR-FRR curve of the linear prediction minimum mean square error, the two curves intersect, indicating that the discrimination and robustness are poor, and the decision interval of the discrete wavelet transform is small, indicating that the discrimination is poor, while the FAR-FRR curve of the authentication method of the present invention obviously does not intersect and the decision interval is large, so the authentication method of the present invention has good discrimination and robustness.

[0116] Security Analysis:

[0117] In order to verify the one-way nature of the bio-hash algorithm with trapdoor, 400 voices were randomly selected to calculate the Hamming distance between the features under the correct key and the wrong key, as shown in the figure. Figure 6 shown.

[0118] Depend on Figure 6 It can be seen that the correct key Hamming distance range is (3×10 -18 , 10×10 -18 )( Figure 6 a), the range of Hamming distance of wrong key is (0.10, 0.25) ( Figure 6 b) It verifies that the bio-hash algorithm is irreversible with a trapdoor, and also proves the security of the bio-hash algorithm.

[0119] In order to further verify the security of the bio-hash algorithm, the Selperman correlation coefficient is used ρ Calculate the correlation before and after the speech data sampling point. First, randomly select a speech and select 3.2×10 4 sampling points, with adjacent sampling points as horizontal and vertical coordinates, a scatter plot of speech sampling points is obtained, such as Figure 7 As shown ( Figure 7 a is the scatter plot of voice correlation before encryption, Figure 7 b is the correlation scatter plot of the encrypted speech). It can be obtained that the speech before encryption ρ=1, after encryption ρ =-0.0046, so the correlation between the sampling points of the voice after encryption is very low, which further proves that the authentication method of the present invention has good security.

[0120] Performance evaluation analysis:

[0121] The performance of the proposed framework is evaluated by using Ganache built-in accounts for transactions. The average running time and Gas fee of each module in the smart contract are also counted. The following is a summary of the Gas and time spent by the contract functions of the four modules, as shown in Table 3.

[0122] Table 3 Performance evaluation cost

[0123]

[0124] It can be seen from Table 3 that the Gas and running time consumed by the authentication method of the present invention are within an acceptable range, indicating that the contract has high efficiency and can meet the needs of voice users.

Claims

1. A voice-aware hash authentication method based on smart contracts, It is characterized in that The authentication method is as follows: For speech signals: Step 1: Input speech signal x ( n ) After pre-emphasis, framing and windowing, the processed speech signal is obtained x′ ( n ); Step 2: Process the speech signal x′ ( n ) to extract the spectral flux feature and the improved spectral entropy feature extraction: Spectral flux feature extraction: Calculated spectral flux characteristics SF = SF ( i )| i =1,2,…, N },in, i For the i The sample value of the frame ,N is the length of the hash sequence; Improved spectral entropy feature extraction: 1) After preprocessing i The frame speech signal is , then the DFT transform formula is: In the formula, X i ( k )yes The short-time Fourier transform of j and k are all constants; 2) Calculate subband energy: Each frame signal is divided into several sub-bands, the number of sub-bands is N b , then i The first b The energy of the subband is E b ( b , i )for: In the formula, Y i ( k ) is the k Energy spectrum of the frequency components of each spectral line; 3) Improved spectral entropy feature extraction: First calculate the subband energy probability, then calculate the subband spectral entropy, so as to obtain the improved spectral entropy method characteristics H b = H b ( i )| i =1,2,…, N }, i For the i frame, N is the length of the hash sequence; where the subband energy probability p b ( b , i )for: Then the improved spectral entropy method features H b ( i )for: Step 3: Speech-aware hash generation: 1) Speech perception features The spectral flux characteristics SF With the improved spectral entropy method features H b Perform inner product to obtain speech perception features G = G ( i )| i =1,2,…, N },in i For the i frame, N is the hash sequence length; G= SF × H b 2) Hash construction Binarize the speech perception features to generate a speech perception hash of a sequence of 0 and 1 z = z ( i )| i =1,2,…, N },in i For the i frame, z ( i ) is the i The hash value of the frame, N is the hash sequence length; For smart contracts: System initialization: The system generates a safety parameter λ by using a random function by clicking a button. λ ) Function output system public parameters pp ; Then enter the user attribute set S u , user identity set ID and system public parameters pp , by GKey( S u , ID , pp ) function determines whether the account has been registered and randomly selects a collision-resistant Hash hash, and outputs the voice user key set K =( K pv , K pb , K s ) and user state variable δ, where K pv is the user's private key, K pb is the user's public key, K s is the search key; Finally, the key set is transmitted through a secure communication channel K Return to the voice owner VO , and broadcast the voice user identity information to the blockchain; Upload contract: Extract spectrum flux features separately off-chain SF With the improved spectral entropy method features H b , followed by feature fusion, and then binarization to generate speech-aware hash z = z ( i )| i =1,2,…, N }; At the same time, the voice file is uploaded to the Interstellar File System and the authentication hash is returned V , will be aware of the hash z and the authentication hash V Spliced ​​transaction information msg , voice owner VO Using the contract account address addr After submitting the upload permission application, obtain the user key set K and user state variable δ, by function Upload( addr , K ,δ) first to the voice owner VO Perform identity verification. If the identity verification is passed, execute the digital signature Φ={ addr , K , msg , sig Generate signature information, where addr is the account address, K is the user key set, msg For transaction information, sig It is to split the state variables; finally, the transaction is carried out through the contract to calculate the fuel consumed by the block upload. If there is not enough balance in the account to pay, the system will roll back; Update contract: contract setting account address addr Mapping relationship with user ID: addr →ID, get key set K , enter the update token u , by the function Update( addr , token u , K , umsg ) First, to the voice owner VO Conduct identity review and operation authority review, then update the contract to determine whether to broadcast the token to the blockchain based on the mapping relationship and digital signature Φ, update the block to calculate the GAS fee and output the transaction information after the update signature; You can also call Delete( addr , token d , K ) function to perform the deletion operation, verify the authority to find the on-chain index position to be deleted and spend GAS to operate it. If there is not enough balance in the account to pay, the system rolls back; Search Contract: Voice User VU Submit search token s and search key K s Apply for permissions. If not satisfied, an error identifier ⊥ is output. If satisfied, the transaction Tx is sent to the address of the search smart contract, and the Search (token) of the search smart contract is called. s , K s , msg) function to search, detect whether the keywords in the token are the same as the keywords in the search, whether the user attributes meet the access structure, and output digital summary information msg , sign and decrypt it, according to the voice owner VO Public Key K pb and address addr Decrypt the signature information and output the transaction information Tx to the voice user VU Used for off-chain voice hash authentication.

2. The voice-aware hash authentication method based on smart contracts as claimed in claim 1, It is characterized in that In step 2, the spectrum flux characteristics SF Calculation: In the formula, Z ( i , k ) is the preprocessed speech signal x′ ( n ) After Fourier transformation i The periodic signal of the frame; K are the coefficients of the discrete Fourier transform; N is the length of the hash sequence; k is a constant.

3. The voice-aware hash authentication method based on smart contracts as claimed in claim 1, It is characterized in that In step 2) of step 3, the hash construction formula is: in, i For the i frame, N is the hash sequence length.