CN117979051B - Audio anti-counterfeiting method, equipment and medium - Google Patents
Audio anti-counterfeiting method, equipment and medium Download PDFInfo
- Publication number
- CN117979051B CN117979051B CN202410067271.2A CN202410067271A CN117979051B CN 117979051 B CN117979051 B CN 117979051B CN 202410067271 A CN202410067271 A CN 202410067271A CN 117979051 B CN117979051 B CN 117979051B
- Authority
- CN
- China
- Prior art keywords
- audio
- audio data
- secret key
- encryption
- algorithm
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/233—Processing of audio elementary streams
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/22—Procedures used during a speech recognition process, e.g. man-machine dialogue
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/008—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols involving homomorphic encryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0618—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
- H04L9/0631—Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/065—Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3
- H04L9/0656—Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher
- H04L9/0662—Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher with particular pseudorandom sequence generator
- H04L9/0668—Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher with particular pseudorandom sequence generator producing a non-linear pseudorandom sequence
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0819—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
- H04L9/0822—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using key encryption key
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/2347—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving video stream encryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/439—Processing of audio elementary streams
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4408—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video stream encryption, e.g. re-encrypting a decrypted video stream for redistribution in a home network
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/22—Procedures used during a speech recognition process, e.g. man-machine dialogue
- G10L2015/223—Execution procedure of a spoken command
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Acoustics & Sound (AREA)
- Human Computer Interaction (AREA)
- Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Nonlinear Science (AREA)
- Storage Device Security (AREA)
Abstract
The invention relates to the field of audio encryption verification, and particularly discloses an audio anti-counterfeiting method, equipment and a medium, which comprise the steps of obtaining audio data and generating a spectrogram of the audio data; according to the time dimension of the audio data, randomly acquiring random sampling values of high frequency, medium frequency and low frequency from a spectrogram through a random algorithm, and generating a chained password according to the random sampling values through an encryption algorithm; encrypting the time dimension by using a homomorphic encryption algorithm to generate a first secret key, encrypting the chained password to generate a second secret key, and homomorphic encrypting the audio data by adopting the first secret key and the second secret key to obtain encrypted audio; when playing, homomorphic decryption is performed first, and then chained passwords are used for verifying the authenticity of the audio data. The invention can accurately verify whether the audio file is tampered, effectively prevent tools such as AI and the like from imitating and stealing sound to maliciously tamper with the audio data, and increase the safety coefficient of the instruction by a layer of encryption authentication mechanism when the instruction is transmitted through voice.
Description
Technical Field
The invention relates to the field of audio encryption verification, in particular to an audio anti-counterfeiting method, equipment and a medium.
Background
With the development of AI technology and speech synthesis technology, the cost and the technical threshold for processing audio are lower and lower, a large amount of audio biological information is abused or stolen, and the audio biological information is used for video disfiguring or illegal activities, so that a great deal of adverse effects are generated on social order.
The existing audio encryption and verification mode can only verify whether the audio file is a source file, and is difficult to play a role in verifying whether the audio file is tampered or not when conventional operations such as automatic transcoding, breakpoint playing, compression, interception and the like of a video website or an audio website are met. Therefore, how to provide more various encryption modes, to encrypt and authenticate audio with high efficiency, so as to prevent the biological information of sound from being replaced and falsified, and to facilitate the verification of the authenticity of audio by the platform and the video software is becoming the focus of increasing attention.
Disclosure of Invention
In order to solve the problem that the existing audio biological information is easy to misuse and misappropriate, the invention provides an audio anti-counterfeiting method, equipment and a medium.
The invention provides an audio anti-counterfeiting method, which comprises the following steps:
acquiring audio data and generating a spectrogram of the audio data;
According to the time dimension of the audio data, randomly acquiring random sampling values of high frequency, medium frequency and low frequency from a spectrogram through a random algorithm, and generating a chained password according to the random sampling values through an encryption algorithm;
encrypting the time dimension by using a homomorphic encryption algorithm to generate a first secret key, encrypting the chained password to generate a second secret key, and homomorphic encrypting the audio data by adopting the first secret key and the second secret key to obtain encrypted audio;
when the authenticity of the encrypted audio needs to be verified, homomorphic decryption is carried out on the encrypted audio by using the first secret key and the second secret key, and decrypted audio is obtained;
verifying the authenticity of the decrypted audio through a chained password according to the time dimension of the audio file;
if the verification result is true, outputting the information that the audio data is not falsified and forged, and playing the audio data;
otherwise, outputting the falsified information of the audio data.
Preferably, the random algorithm adopts a kernel entropy pool Entropy Pool to generate random numbers, and obtains random sampling values of high frequency, medium frequency and low frequency from a spectrogram according to the generated random numbers.
Preferably, the encryption algorithm generates a chained password according to the random sampling value, specifically:
Dividing each frequency spectrum chain block into a data block, and generating a chain password corresponding to each data block according to the random sampling value by using a block password algorithm.
Preferably, the block cipher algorithm is an AES algorithm.
Preferably, the first key and the second key are each a Paillier homomorphic encryption key structure.
The invention also provides an audio anti-counterfeiting device, comprising: an encryption terminal and a playing terminal;
the encryption terminal comprises a frequency spectrum module, a random sampling module and a homomorphic encryption module;
the frequency spectrum module is used for acquiring audio data and generating a frequency spectrum chart of the audio data;
The random sampling module is used for randomly acquiring random sampling values of high frequency, medium frequency and low frequency from a spectrogram through a random algorithm according to the time dimension of the audio data, and generating a chained password according to the random sampling values through an encryption algorithm;
the homomorphic encryption module is used for encrypting the time dimension to generate a first secret key by using a homomorphic encryption algorithm, encrypting the chained password to generate a second secret key, and homomorphic encrypting the audio data by adopting the first secret key and the second secret key to obtain encrypted audio;
The encryption terminal is used for verifying the authenticity of the encrypted audio when the encrypted audio needs to be played, and homomorphic decryption is carried out on the encrypted audio by using the first secret key and the second secret key to obtain decrypted audio; verifying the authenticity of the decrypted audio through a chained password according to the time dimension of the audio file; if the verification result is true, outputting the information that the audio data is not falsified and forged, and playing the audio data; otherwise, outputting the falsified information of the audio data.
The invention provides a terminal device, which comprises a processor and a storage device, wherein the storage device is used for storing one or more programs; the processor implements the above-described audio anti-counterfeiting method when the one or more programs are executed by the processor.
The invention provides a computer readable storage medium, which comprises a stored computer program, wherein when the computer program runs, equipment where the computer readable storage medium is located is controlled to execute the audio anti-counterfeiting method.
The beneficial effects of the invention are as follows:
(1) The chain type password for verification is generated by combining a random sampling algorithm and an encryption algorithm, and the audio file is encrypted by homomorphic encryption, so that whether the audio file is tampered or not can be accurately verified, tools such as an AI (analog input) and the like are effectively prevented from imitating and stealing sound to maliciously tamper with the audio data, a layer of encryption authentication mechanism is added when an instruction is conveyed through voice, and the instruction safety coefficient is improved.
Drawings
The invention will be further described with reference to the accompanying drawings, in which:
FIG. 1 is a flow chart of a method according to a first embodiment of the invention;
fig. 2 is a schematic diagram of a random sampling value of a tile according to a second embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, as a first implementation of the present invention, an audio anti-counterfeiting method is disclosed, comprising the steps of:
s1, acquiring audio data and generating a spectrogram of the audio data;
S2, according to the time dimension of the audio data, randomly acquiring random sampling values of high frequency, medium frequency and low frequency from a spectrogram through a random algorithm, and generating a chain type password according to the random sampling values through an encryption algorithm;
S3, encrypting the time dimension by using a homomorphic encryption algorithm to generate a first key, encrypting the chained password to generate a second key, and homomorphic encrypting the audio data by adopting the first key and the second key to obtain encrypted audio;
s4, when the authenticity of the encrypted audio needs to be verified, homomorphic decryption is carried out on the encrypted audio by using the first secret key and the second secret key, and decrypted audio is obtained;
S5, verifying the authenticity of the decrypted audio through a chained password according to the time dimension of the audio file;
S51, if the verification result is true, outputting information that the audio data is not falsified and forged, and playing the audio data;
And S52, otherwise, outputting the information that the audio data is falsified.
The step S2 is to randomly acquire the random sampling values of high frequency, medium frequency and low frequency from the spectrogram through a random algorithm, wherein a random number is generated through the random algorithm, and the value of the random number is used for determining whether the value of the high frequency, the value of the low frequency or the value of the medium frequency should be corresponding to a certain moment in the spectrogram.
In this embodiment, homomorphic encryption is only one of available encryption algorithms, and the homomorphic encryption is adopted in this scheme, because any operation that can be performed on plaintext can be performed on encrypted data without decryption, so that the encrypted information can still be deeply and infinitely analyzed, without affecting confidentiality, and is not irreplaceable. The same technical effect of the application can be achieved by using other encryption modes with high safety coefficients as long as the encryption safety of the audio key can be ensured.
Therefore, even if an audio file is transcoded, compressed, breakpoint played or intercepted, the audio file can be decrypted homomorphically according to the time dimension of the audio file in the complete audio, and the authenticity of the audio can be verified and decrypted through the chained password.
The method and the device for verifying the audio file by using the encryption algorithm can accurately verify whether the audio file is tampered or not by combining a random sampling algorithm and the encryption algorithm to generate a chain type password for verification and encrypting the audio file by homomorphic encryption, can be used for important government affairs, military affairs, business and other directions requiring confidential audio-video call, can effectively prevent tools such as AI and the like from imitating and stealing sound to maliciously tamper with and forge audio data, and can increase the safety coefficient of the instruction by a one-layer encryption authentication mechanism when the instruction is conveyed by voice.
The embodiment also discloses an audio anti-counterfeiting device, which comprises: an encryption terminal and a playing terminal;
the encryption terminal comprises a frequency spectrum module, a random sampling module and a homomorphic encryption module;
the frequency spectrum module is used for acquiring audio data and generating a frequency spectrum chart of the audio data;
The random sampling module is used for randomly acquiring random sampling values of high frequency, medium frequency and low frequency from the spectrogram through a random algorithm according to the time dimension of the audio data, and generating a chained password according to the random sampling values through an encryption algorithm;
the homomorphic encryption module is used for encrypting the time dimension to generate a first secret key by using a homomorphic encryption algorithm, encrypting the chained password to generate a second secret key, and homomorphic encrypting the audio data by adopting the first secret key and the second secret key to obtain encrypted audio;
The encryption terminal is used for playing the encrypted audio, verifying the authenticity of the encrypted audio, and homomorphic decryption is carried out on the encrypted audio by using the first secret key and the second secret key to obtain decrypted audio; verifying the authenticity of the decrypted audio through a chained password according to the time dimension of the audio file; if the verification result is true, outputting the information that the audio data is not falsified and forged, and playing the audio data; otherwise, outputting the falsified information of the audio data.
The audio data is homomorphic encrypted and the secret key for verification is generated in the recording, forwarding or generating process of the audio file by adopting a module such as an encryption chip, the audio data is homomorphic decrypted and true and false verified by a decryption circuit at a playing end, and the audio can be automatically realized
The following is a second implementation of the present invention, and this embodiment is one of the more specific embodiments of the first embodiment. The present embodiment employs a Paillier homomorphic encryption key structure and demonstrates how the key pair is generated.
Referring to fig. 2, the random algorithm of the present embodiment uses a kernel entropy pool Entropy Pool to generate random numbers, and obtains random sampling values of high frequency, intermediate frequency and low frequency from a spectrogram according to the generated random numbers. The arrow in the figure is the schematic representation of the value of the random sampling value in the spectrogram.
Entropy Pool are derived from the activity and environment of the system. Entropy Pool in some operating systems, a mechanism called an "entropy pool" is provided for accumulating entropy (randomness) of various sources, such as mouse movements, keyboard strokes, disk activity, etc. sources. Such a mechanism can be found in the Linux system/dev/random and/dev/urandom.
In this example, the encryption algorithm in step S2 generates a chain password according to the random sampling value, specifically:
S21, dividing each frequency spectrum chain block into a data block, and generating a chain type password corresponding to each data block according to the random sampling value by using a block password algorithm.
This ensures confidentiality of the spectrum chain.
The block cipher algorithm of this embodiment adopts the AES algorithm.
AES (advanced encryption standard), which is a symmetric encryption algorithm, uses the same key to encrypt and decrypt data, uses multiple rounds of substitution and permutation operations to obfuscate the data, increasing the complexity and security of the encryption. As a high-performance encryption algorithm, AES can perform fast encryption and decryption operations, and is widely regarded as a secure encryption algorithm, which has passed many rounds of cryptographic examination and tests in practical applications.
AES supports different key lengths including 128 bits, 192 bits and 256 bits. The choice of key length will affect the strength of encryption, longer keys being generally more secure. The data to be encrypted is divided into fixed-size blocks (128 bits), and then an encryption operation is performed on each block. This block size is an important feature of AES.
In addition to the basic implementation of AES, there are different encryption modes available, including electronic codebook mode (ECB), cipher block chaining mode (CBC), counter mode (CTR), etc. The choice of encryption mode depends on the specific security requirements.
The homomorphic encryption key data structure depends on the homomorphic encryption algorithm used, and the first key and the second key of this embodiment are each Paillier homomorphic encryption key structures.
Paillier is a public key cryptosystem supporting addition homomorphism, and is the optimal scheme of the current Paillier scheme. Among many PHE schemes, the Paillier scheme is widely used in various big-roof meetings and practical applications due to the characteristics of high efficiency and complete security certification, and is one of the most common PHE instantiation schemes in privacy computing scenes. The Paillier scheme meets the standard security definition of encryption schemes: semantic security, i.e., indistinguishability of ciphertext under selective plaintext attack (IND-CPA), intuitively, is that ciphertext does not reveal any information in plaintext.
The Paillier homomorphic encryption algorithm uses a public key and a private key to perform homomorphic encryption and decryption operations. The following is a specific description of the key structure:
public Key (Public Key):
modulus (n): this is a large integer, typically the product of two large primes. It defines the strength of the encryption and decryption operations. n is a part of the public key for encryption operations.
Generator (g): this is another integer that is used with n for encryption and decryption operations. g is also part of the public key.
Other parameters: the public key may include other parameters to aid in the performance of the encryption operation, such as the seed of a random number generator, etc.
Private key (PRIVATE KEY):
lambda (Lambda) and Mu (Mu): these parameters are part of the private key used for the decryption operation. They are associated with modules (n) of the public key, but are kept secret for decrypting homomorphic encrypted ciphertext.
Other privacy parameters: the private key may include other security parameters to ensure the security of the decryption operation.
The following is an example of generating a Paillier homomorphic encryption key pair, which is generated using Python:
from phe import Paillier # generation of Paillier Key pair
Public_key, private_key=PAILLIER. Generate_PAILLIER_ keypair () # access parameters in public and private keys
n=public_key.n#Modulus
g=public_key.g#Generator
lambda_=private_key.lmbda#Lambda
mu=private_key.mu#Mu
print("Public Key(n,g):",n,g)
print("Private Key(Lambda,Mu):",lambda_,mu)
This example uses the phe library, which is a Python library for Paillier homomorphic encryption. The generated key pair may be used for encryption and decryption operations to perform homomorphic encryption.
The homomorphic encryption process of the embodiment is specifically as follows:
and (3) key generation: two large prime numbers p and q are chosen, n=p×q and λ=lcm (p-1, q-1) are calculated. A random number g is selected such that gcd (L (gλmod n 2), n) =1, where L (u) = (u-1)/n; the public key is (n, g) and the private key is lambda.
Encryption: given plaintext m (0 < =m < n) and public key (n, g), random number r is chosen such that gcd (r, n) =1. Ciphertext c=gm×r n mod n 2.
Decryption: given ciphertext c and private key λ, plaintext m=l (c λmod n 2) μmod n, where μ= (L (g λmod n 2)) -1 mod n is calculated.
The third embodiment of the present invention is a specific example for explaining how the second embodiment is applied to the anti-counterfeit of audio data.
And (3) key generation:
p and q: these are two large prime numbers that are used to generate the RSA modulus n and lambda parameters.
N: RSA modulus, n=p×q, for encryption and decryption operations.
Lambda: lambda is an abbreviation for lambda (p-1, q-1), which is the least common multiple of p-1 and q-1, also used for decryption operations.
G: this is a random number used to perform encryption and decryption operations; it must meet certain conditions to ensure homogeneity.
Public key (n, g): the public key consists of n and g, which is used to encrypt the plaintext.
Private key:
lambda: the private key includes a lambda parameter for decrypting the ciphertext.
Mu: μ is a parameter related to λ, which is also used for decryption.
Encryption process:
Plaintext m (0 < = m < n) and public key (n, g) are chosen.
A random number r is chosen that ensures gcd (r, n) =1 (i.e., r and n are mutually prime).
Calculating ciphertext c= (g ζr) mod n 2, this ciphertext being used to protect the audio data.
Decryption:
given ciphertext c and private key lambda.
The plaintext m=l (c λmod n 2) μmod n is calculated, where μ= (L (g λmod n 2)) -1 mod n.
The final plaintext m will be the original audio data, and the authenticity of the audio can be verified according to a specific threshold or flag.
One specific calculation procedure of the present embodiment is exemplified as follows:
two large prime numbers p and q are chosen, e.g., p=61 and q=53.
N=p×q=61×53=3233 is calculated.
Calculate λ=lcm (p-1, q-1) =lcm (60,52) =780.
A random number g is selected to satisfy gcd (L (gλmod n 2), n) =1.
The public key is (n, g) = (3233, g).
The private key is (λ, μ) = (780, μ).
Now, assume that a piece of audio data is represented by plaintext m. The audio data may be encrypted using the public key to obtain ciphertext c. The ciphertext is then decrypted using the private key, restoring plaintext m. The authenticity of the audio can be verified by comparing the restored plaintext with the original audio data.
The invention also discloses a terminal device, which comprises a processor and a storage device, wherein the storage device is used for storing one or more programs; the processor implements the audio anti-counterfeiting method described above when one or more programs are executed by the processor. The Processor may be a central processing unit (Central Processing Unit, CPU), other general purpose Processor, digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), off-the-shelf Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, referred to as a control center for the test equipment, that interfaces and lines to various parts of the overall test equipment.
The storage means may be used for storing computer programs and/or modules, and the processor may implement various functions of the terminal device by running or executing the computer programs and/or modules stored in the storage means, and invoking data stored in the storage means. The storage device may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the terminal device, etc. In addition, the storage device may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart memory card (SMART MEDIA CARD, SMC), secure Digital (SD) card, flash memory card (FLASH CARD), at least one disk storage device, flash memory device, or other volatile solid state storage device.
Wherein the integrated modules/units of the audio anti-counterfeit device, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the present invention may implement all or part of the flow of the method of the above-described embodiments, or may be implemented by a computer program to instruct related hardware, and the computer program may be stored in at least one computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, executable files or in some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
It should be noted that the embodiments of the apparatus and device described above are only schematic, where the units described as separate units may or may not be physically separated, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Claims (7)
1. An audio anti-counterfeiting method, comprising:
acquiring audio data and generating a spectrogram of the audio data;
According to the time dimension of the audio data, randomly acquiring random sampling values of high frequency, medium frequency and low frequency from a spectrogram through a random algorithm, and generating a chained password according to the random sampling values through an encryption algorithm;
encrypting the time dimension by using a homomorphic encryption algorithm to generate a first secret key, encrypting the chained password to generate a second secret key, and homomorphic encrypting the audio data by adopting the first secret key and the second secret key to obtain encrypted audio;
when the authenticity of the encrypted audio needs to be verified, homomorphic decryption is carried out on the encrypted audio by using the first secret key and the second secret key, and decrypted audio is obtained;
verifying the authenticity of the decrypted audio through a chained password according to the time dimension of the audio file;
if the verification result is true, outputting the information that the audio data is not falsified and forged, and playing the audio data;
otherwise, outputting the falsified information of the audio data.
2. The audio anti-counterfeiting method according to claim 1, wherein the random algorithm is to generate random numbers by using a kernel entropy pool Entropy Pool, and obtain random sampling values of high frequency, medium frequency and low frequency from a spectrogram according to the generated random numbers.
3. The audio anti-counterfeiting method according to claim 1, wherein the encryption algorithm generates a chained password according to the random sampling value, specifically:
Dividing each frequency spectrum chain block into a data block, and generating a chain password corresponding to each data block according to the random sampling value by using a block password algorithm.
4. An audio anti-counterfeiting method according to claim 3, wherein the block cipher algorithm is AES algorithm.
5. The audio anti-counterfeit method of claim 1, wherein said first key and said second key are each a Paillier homomorphic encryption key structure.
6. An audio anti-counterfeiting device, comprising: an encryption terminal and a playing terminal;
the encryption terminal comprises a frequency spectrum module, a random sampling module and a homomorphic encryption module;
the frequency spectrum module is used for acquiring audio data and generating a frequency spectrum chart of the audio data;
The random sampling module is used for randomly acquiring random sampling values of high frequency, medium frequency and low frequency from a spectrogram through a random algorithm according to the time dimension of the audio data, and generating a chained password according to the random sampling values through an encryption algorithm;
the homomorphic encryption module is used for encrypting the time dimension to generate a first secret key by using a homomorphic encryption algorithm, encrypting the chained password to generate a second secret key, and homomorphic encrypting the audio data by adopting the first secret key and the second secret key to obtain encrypted audio;
The encryption terminal is used for verifying the authenticity of the encrypted audio when the encrypted audio needs to be played, and homomorphic decryption is carried out on the encrypted audio by using the first secret key and the second secret key to obtain decrypted audio; verifying the authenticity of the decrypted audio through a chained password according to the time dimension of the audio file; if the verification result is true, outputting the information that the audio data is not falsified and forged, and playing the audio data; otherwise, outputting the falsified information of the audio data.
7. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored computer program, wherein the computer program, when run, controls a device in which the computer readable storage medium is located to perform an audio anti-counterfeit method according to any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410067271.2A CN117979051B (en) | 2024-01-17 | 2024-01-17 | Audio anti-counterfeiting method, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410067271.2A CN117979051B (en) | 2024-01-17 | 2024-01-17 | Audio anti-counterfeiting method, equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117979051A CN117979051A (en) | 2024-05-03 |
CN117979051B true CN117979051B (en) | 2024-07-09 |
Family
ID=90850638
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410067271.2A Active CN117979051B (en) | 2024-01-17 | 2024-01-17 | Audio anti-counterfeiting method, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117979051B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112668031A (en) * | 2021-03-15 | 2021-04-16 | 尤尼泰克(嘉兴)信息技术有限公司 | Coding and decoding method and device for network file protection |
CN116132149A (en) * | 2023-01-06 | 2023-05-16 | 珠海格力电器股份有限公司 | Anti-tampering communication method, device, server, smart home and terminal equipment |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FR3048102B1 (en) * | 2016-02-24 | 2018-03-09 | Commissariat A L'energie Atomique Et Aux Energies Alternatives | METHOD FOR CONFIDENTIAL EXECUTION OF A PROGRAM OPERATING ON DATA COMPRISING A HOMOMORPHIC NUMBER |
CN116418503B (en) * | 2023-04-27 | 2024-07-02 | 广东保伦电子股份有限公司 | Audio copyright protection method, system and medium |
CN117275494B (en) * | 2023-11-21 | 2024-02-20 | 科大讯飞(苏州)科技有限公司 | Audio watermark embedding method, audio watermark extracting method and audio detecting method |
-
2024
- 2024-01-17 CN CN202410067271.2A patent/CN117979051B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112668031A (en) * | 2021-03-15 | 2021-04-16 | 尤尼泰克(嘉兴)信息技术有限公司 | Coding and decoding method and device for network file protection |
CN116132149A (en) * | 2023-01-06 | 2023-05-16 | 珠海格力电器股份有限公司 | Anti-tampering communication method, device, server, smart home and terminal equipment |
Also Published As
Publication number | Publication date |
---|---|
CN117979051A (en) | 2024-05-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12101415B2 (en) | Method of RSA signature or decryption protected using a homomorphic encryption | |
CN106161034B (en) | RSA decryption using multiplicative secret sharing | |
US8681975B2 (en) | Encryption method and apparatus using composition of ciphers | |
US10097342B2 (en) | Encoding values by pseudo-random mask | |
US10469455B2 (en) | Dynamic encryption method | |
US10158613B1 (en) | Combined hidden dynamic random-access devices utilizing selectable keys and key locators for communicating randomized data together with sub-channels and coded encryption keys | |
US10686764B2 (en) | Executable coded cipher keys | |
CN117499160B (en) | Network security protection method and system based on electronic file | |
Shah et al. | An efficient audio encryption scheme based on finite fields | |
CN117979051B (en) | Audio anti-counterfeiting method, equipment and medium | |
US20190334879A1 (en) | Combined hidden dynamic random-access devices utilizing selectable keys and key locators for communicating randomized data together with sub-channels and coded encryption keys | |
Abdulkarim et al. | An enhanced cloud based security system using RSA as digital signature and image steganography | |
KR20110042419A (en) | Block cipher operation method applicable to multimedia environment | |
CN113902431A (en) | Block chain transaction method and device, storage medium and electronic equipment | |
Wu | Faster yet Safer: Logging System via Fixed-Key Blockcipher | |
JP2005027358A (en) | Common key encryption method and apparatus | |
Mohammed et al. | Cryptography and Network Security in Modern Era | |
Hafsa et al. | Hardware Implementation of an Improved Hybrid Cryptosystem for Numerical Image Encryption and Authenticity | |
CN117708881A (en) | Cross-mechanism blacklist sharing method and system based on reusable confusion circuit | |
CN117221878A (en) | Information security control method and device based on wireless network equipment | |
Sohana et al. | Agent command manipulation system using two keys encryption model | |
WO2018231765A1 (en) | Executable coded cipher keys | |
WO2018231773A1 (en) | Combined hidden dynamic random-access devices utilizing selectable keys and key locators for communicating randomized data together with sub-channels and coded encryption keys | |
Chirgaiya | A Review of Modern Hill Cipher Techniques | |
Adenowo et al. | Cipher: A Crypto Model for Improving Confidentiality and Non-Tampering of Data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |