WO2018000640A1 - Voice encryption testing method and testing device - Google Patents

Voice encryption testing method and testing device Download PDF

Info

Publication number
WO2018000640A1
WO2018000640A1 PCT/CN2016/100635 CN2016100635W WO2018000640A1 WO 2018000640 A1 WO2018000640 A1 WO 2018000640A1 CN 2016100635 W CN2016100635 W CN 2016100635W WO 2018000640 A1 WO2018000640 A1 WO 2018000640A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
voice data
terminal
voice
encrypted
Prior art date
Application number
PCT/CN2016/100635
Other languages
French (fr)
Chinese (zh)
Inventor
钟焰涛
傅文治
蒋罗
Original Assignee
宇龙计算机通信科技(深圳)有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 宇龙计算机通信科技(深圳)有限公司 filed Critical 宇龙计算机通信科技(深圳)有限公司
Publication of WO2018000640A1 publication Critical patent/WO2018000640A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • H04W12/033Protecting confidentiality, e.g. by encryption of the user plane, e.g. user's traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/26Testing cryptographic entity, e.g. testing integrity of encryption key or encryption algorithm

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a voice encryption test method and a test device.
  • the functions of smart terminals are also increasing.
  • many smart terminals have a voice encryption function, and the smart terminal can encrypt the call voice.
  • the test device provided by the third-party organization is generally used to test the voice encryption of the smart terminal to test whether the smart terminal has the voice encryption function.
  • the current voice encryption test method is: the terminal sends the initial voice data and the first voice data obtained after the initial voice data is encrypted by the smart terminal to the test device, and the test device encrypts the initial voice device after receiving the initial voice data, and obtains the first And encrypting the voice data, when the first voice encrypted data and the second voice encrypted data match, determining that the smart terminal has a voice encryption function.
  • the embodiment of the invention provides a test method and a test device for voice encryption, which can accurately detect whether a terminal has a voice encryption function.
  • a method for testing voice encryption including:
  • Transmitting the source voice data packet to the terminal where the source voice data packet is used by the terminal to encrypt the source voice data packet by using a voice encryption algorithm, and obtain a first encrypted voice data packet, where the voice encryption algorithm is a test device Pre-negotiated with the terminal;
  • the method further includes:
  • the voice encryption algorithm encrypts the source voice data packet and obtains a third encrypted voice data packet, where the voice encryption algorithm is pre-negotiated by the third-party testing device, the testing device, and the terminal;
  • the method before the sending the source voice data packet to the terminal, the method further includes:
  • the step of transmitting the source voice data packet to the terminal is performed.
  • the negotiating a voice encryption algorithm with the terminal includes:
  • the voice encryption algorithm supported by the test device and the terminal is used as a voice encryption algorithm pre-negotiated by the test device and the terminal.
  • the method before the sending the source voice data packet to the terminal, the method also includes:
  • the source voice data packet is extracted from voice data acquired by a recording device in the test device, or the source voice data packet is extracted from voice data pre-stored in the test device .
  • the method before the sending the source voice data packet to the terminal, the method also includes:
  • the key is used by the terminal to encrypt the first encrypted voice data packet by using the key to obtain a first key encrypted voice data packet; the key is used by the test device to utilize the Deriving the key to decrypt the first key encrypted voice data packet to obtain the first encrypted voice data packet.
  • test apparatus comprising:
  • a first sending unit configured to send a source voice data packet to the terminal, where the source voice data packet is used by the terminal to encrypt the source voice data packet by using a voice encryption algorithm, and obtain a first encrypted voice data packet, where
  • the speech encryption algorithm is pre-negotiated by the test device with the terminal;
  • a first receiving unit configured to receive the first encrypted voice data packet sent by the terminal
  • the encryption unit is configured to encrypt the source voice data packet by using a voice encryption algorithm pre-negotiated with the test device and the terminal to obtain a second encrypted voice data packet;
  • a verification unit configured to verify whether the first encrypted voice data packet matches the second encrypted voice data packet
  • the determining unit is configured to determine that the terminal passes the voice encryption test when the verification unit verifies that the result is yes.
  • the testing device further includes:
  • a second sending unit configured to: when the first encrypted voice data packet matches the second encrypted voice data packet, send the source voice data packet to a third-party testing device, where the source voice data packet is used
  • the third-party test device encrypts the source voice data packet by using the voice encryption algorithm, and obtains a third encrypted voice data packet, where the voice encryption algorithm is the third-party test device, the test device, and the Said terminal pre-negotiated;
  • a second receiving unit configured to receive the third encrypted voice data packet sent by the third-party testing device
  • a determining unit configured to determine whether the third encrypted voice data packet matches the first encrypted voice data packet or the second encrypted voice data packet
  • the determining unit is further configured to: when the determining unit determines that the result is yes, determine that the terminal passes the voice encryption test.
  • the testing device further includes:
  • a negotiating unit configured to negotiate a voice encryption algorithm with the terminal
  • the first sending unit is further configured to send the source voice data packet to the terminal after the negotiation unit successfully negotiates the voice encryption algorithm with the terminal.
  • the negotiating unit includes:
  • a first determining subunit configured to determine whether a voice encryption algorithm supported by the test device is the same as a voice encryption algorithm supported by the terminal;
  • a second determining subunit configured to: when the first determining subunit determines whether the voice encryption algorithm supported by the testing device is the same as the voice encryption supported by the terminal, the testing device and the terminal jointly support The voice encryption algorithm is used as a voice encryption algorithm pre-negotiated by the test device with the terminal.
  • the testing device further includes:
  • An acquiring unit configured to acquire a source voice data packet, where the source voice data packet is extracted from voice data acquired by a recording device in a test device, before the first sending unit sends the source voice data packet to the terminal, Or the source voice data packet is extracted from voice data pre-stored in the test device.
  • the testing device further includes:
  • a key agreement unit configured to negotiate a key with the terminal
  • the first sending unit is further configured to: after the key negotiating unit is configured to negotiate a key with the terminal, send a source voice data packet to the terminal; wherein the key is used for the The terminal encrypts the first encrypted voice data packet by using the key to obtain a first key encrypted voice data packet; the key is used by the test device to use the key to the first key The encrypted voice data packet is decrypted to obtain the first encrypted voice data packet.
  • the test device sends the source voice data packet to the terminal, and the terminal and the test device respectively encrypt the source voice data packet by using a negotiated voice encryption algorithm to obtain the first encrypted voice data packet and the second encrypted voice data packet respectively.
  • the test device verifies that the first encrypted voice data packet matches the second encrypted voice data packet, it is determined that the terminal passes the voice encryption test.
  • the test device provides the source voice data packet for testing, which can prevent the terminal from spoofing the test device due to the source voice data packet provided by the terminal, so that the terminal can accurately detect whether the terminal has the voice encryption function.
  • FIG. 1 is a schematic structural diagram of a system disclosed in an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a method for testing voice encryption according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of another method for testing voice encryption according to an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart diagram of another method for testing voice encryption according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a test device according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of another test device according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of another test device according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of another test device according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of another test device according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of another test device according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of still another testing device according to an embodiment of the present invention.
  • the embodiment of the invention provides a test method and a test device for voice encryption, which can accurately detect whether a terminal has a voice encryption function. The details are described below separately.
  • FIG. 1 is a schematic diagram of a system architecture disclosed in an embodiment of the present invention.
  • the test device and the terminal are included, wherein the test device and the terminal can be connected through a wired connection (for example, through a headphone interface on the terminal, a USB interface, or a test device), or through a wireless connection (for example, through Bluetooth).
  • a wired connection for example, through a headphone interface on the terminal, a USB interface, or a test device
  • a wireless connection for example, through Bluetooth
  • the test device may include a voice codec module, a voice encryption and decryption module, an audio processing module, a data transceiver module, etc.
  • the voice codec module is configured to encode and decode the audio data
  • the voice encryption and decryption module is set to
  • the audio data is encrypted and decrypted
  • the audio processing module can perform recording
  • the data transceiver module can transmit and receive data.
  • the terminal may include a device such as a mobile phone, a computer, or a tablet computer that can perform voice processing. By implementing the system architecture shown in FIG. 1, the test device can accurately detect whether the terminal has voice encryption function.
  • FIG. 2 is a schematic flowchart diagram of a method for testing voice encryption according to an embodiment of the present invention. As shown in FIG. 2, the test method for voice encryption described in this embodiment includes the following steps.
  • the test device sends the source voice data packet to the terminal, where the source voice data packet is used by the terminal to encrypt the source voice data packet by using a voice encryption algorithm, and obtains the first encrypted voice data packet, where the voice encryption algorithm pre-negotiates the test device with the terminal. of.
  • the source voice data packet may be extracted from the audio acquired by the test device in real time, for example, a recording device obtained by the testing device in real time through the recording device, a segment of the voice downloaded by the testing device on the network, and the like.
  • the recording a speech is converted into a digital signal by analog-to-digital conversion, and the source voice data packet can be obtained; the source voice data packet can also be pre-stored by the test device, for example, can be pre-stored in the non-volatile memory of the test device.
  • the test device when the test device needs to send the source voice data packet, randomly extracting one voice data from the plurality of voice data, and performing the analog-to-digital conversion on the voice data.
  • the source voice data packet can be obtained by obtaining a digital signal.
  • the terminal After the test device sends the source voice data packet to the terminal, the terminal encrypts the source voice data packet by using a voice encryption algorithm and obtains the first encrypted voice data packet, wherein the terminal uses the voice encryption algorithm to source the voice data packet (binary data stream). Processing is performed to obtain a first encrypted voice data packet (a binary data stream after being processed by a voice encryption algorithm).
  • the above voice encryption algorithm is an algorithm supported by the test device and the terminal, that is, the same voice encryption algorithm that the test device and the terminal must support together.
  • the voice encryption algorithm is pre-negotiated between the test device and the terminal. Before the step 201 is performed, the test device pre-negotiates with the terminal to pre-negotiate a voice encryption algorithm supported by the test device and the terminal. The terminal and the test device respectively perform voice encryption by using the voice encryption algorithm supported by the foregoing.
  • test device and the terminal need to establish a connection, and the test device and the terminal can be connected through a wired connection (for example, through a headphone interface, a USB interface on the terminal, or a test device), or through a wireless connection (for example, , via Bluetooth connection, WiFi connection, etc.).
  • a wired connection for example, through a headphone interface, a USB interface on the terminal, or a test device
  • a wireless connection for example, via Bluetooth connection, WiFi connection, etc.
  • step 201 Before performing step 201, the following steps may be performed:
  • the source voice data packet is obtained, and the source voice data packet is extracted from the voice data acquired by the recording device in the test device, or the source voice data packet is extracted from the voice data pre-stored in the test device.
  • the source voice data packet may be extracted from the voice data acquired by the recording device in the test device.
  • a test device obtains a piece of recording in real time through the recording device, and the test device extracts part of the recorded data from the previous recording.
  • the part of the recorded data is converted into a digital signal to obtain a source voice data packet;
  • the source voice data packet may also be extracted from the voice data pre-stored in the test device, for example, may be pre-arranged in the non-volatile memory of the test device.
  • a plurality of voice data for example, a song, a ringtone, etc.
  • the test device needs to send the source voice data packet, randomly extracting one voice data from the plurality of voice data, and extracting from a randomly selected voice data Part of the voice data, the partial voice data is converted into a digital signal, and the source voice data packet is obtained.
  • the test device receives the first encrypted voice data packet sent by the terminal.
  • the terminal after the terminal encrypts the source voice data packet by using the voice encryption algorithm and obtains the first encrypted voice data packet, the terminal sends the first encrypted voice data packet to the test device, and the test device receives the first sent by the terminal.
  • An encrypted voice packet After the terminal encrypts the source voice data packet by using the voice encryption algorithm and obtains the first encrypted voice data packet, the terminal sends the first encrypted voice data packet to the test device, and the test device receives the first sent by the terminal.
  • An encrypted voice packet After the terminal encrypts the source voice data packet by using the voice encryption algorithm and obtains the first encrypted voice data packet, the terminal sends the first encrypted voice data packet to the test device, and the test device receives the first sent by the terminal. An encrypted voice packet.
  • the test device encrypts the source voice data packet by using a voice encryption algorithm pre-negotiated with the test device and the terminal to obtain a second encrypted voice data packet.
  • the test device after the test device receives the first encrypted voice data packet sent by the terminal, the test device encrypts the source voice data packet by using a voice encryption algorithm pre-negotiated by the test device and the terminal to obtain a second encrypted voice data packet.
  • the test device processes the source voice data packet (binary data stream) using a voice encryption algorithm to obtain a second encrypted voice data packet (a binary data stream processed by the voice encryption algorithm).
  • the above voice encryption algorithm is an algorithm supported by the test device and the terminal, that is, the same voice encryption algorithm that the test device and the terminal must support together.
  • the voice encryption algorithm is pre-negotiated between the test device and the terminal.
  • the test device verifies whether the first encrypted voice data packet matches the second encrypted voice data packet. If yes, go to step 205. If no, go to step 206.
  • the test device verifies whether the first encrypted voice data packet matches the second encrypted voice data packet.
  • the source voice data packet is a binary data stream
  • the test device processes the source voice data packet (binary data stream) by using a voice encryption algorithm to obtain a second encrypted voice data packet (a binary data stream processed by the voice encryption algorithm).
  • the test device verifies whether the first encrypted voice data packet matches the second encrypted voice data packet, and can compare each binary number in the first encrypted voice data packet (binary data stream) and the second encrypted voice data packet (binary data stream) Is it the same, when the same ratio of the binary number in the first encrypted voice data packet (binary data stream) and the second encrypted voice data packet (binary data stream) reaches a preset threshold, then the first encrypted voice data packet is determined to be the second
  • the encrypted voice data packet is matched, and the preset threshold may be 80%, 85%, 90%, 95%, etc., because the data packet is transmitted between the terminal and the test device, packet loss occurs, etc., and the first encrypted voice is often used.
  • the data packet and the second encrypted voice data packet cannot be completely matched, and the voice encryption test can be considered as long as the preset threshold is reached.
  • the test device determines that the terminal passes the voice encryption test.
  • the test device determines that the terminal does not pass the voice encryption test.
  • the test device sends the source voice data packet to the terminal, and the terminal and the test device respectively encrypt the source voice data packet by using a negotiated voice encryption algorithm to obtain the first encrypted voice data packet and the second encrypted voice data packet respectively.
  • the test device verifies that the first encrypted voice data packet matches the second encrypted voice data packet, it is determined that the terminal passes the voice encryption test.
  • the test device provides the source voice data packet for testing, which can prevent the terminal from spoofing the test device due to the source voice data packet provided by the terminal, thereby accurately detecting whether the terminal has the voice encryption function and improving the test result. Accuracy.
  • FIG. 3 is a schematic flowchart diagram of another method for testing voice encryption according to an embodiment of the present invention. As shown in FIG. 3, the test method for voice encryption described in this embodiment includes the following steps.
  • the test device sends the source voice data packet to the terminal, where the source voice data packet is used by the terminal to encrypt the source voice data packet by using a voice encryption algorithm, and obtains the first encrypted voice data packet, where the voice encryption algorithm pre-negotiates the test device with the terminal. of.
  • the test device receives the first encrypted voice data packet sent by the terminal.
  • the test device encrypts the source voice data packet by using a voice encryption algorithm pre-negotiated with the test device and the terminal to obtain a second encrypted voice data packet.
  • test device verifies whether the first encrypted voice data packet matches the second encrypted voice data packet. If yes, go to step 305. If no, end this process.
  • the test device sends the source voice data packet to the third-party test device, and the source voice data packet is used by the third-party test device to encrypt the source voice data packet by using a voice encryption algorithm, and obtain a third encrypted voice data packet, where the voice encryption algorithm is Third-party test equipment, test equipment, and terminals are pre-negotiated.
  • the voice encryption algorithm is Third-party test equipment, test equipment, and terminals are pre-negotiated.
  • the test device when the test device verifies that the first encrypted voice data packet matches the second encrypted voice data packet, the test device sends the source voice data packet to the third-party test device, and the third-party test device may be another test.
  • the device after the third-party test device receives the source voice data packet, the third-party test device encrypts the source voice data packet by using a voice encryption algorithm and obtains a third encrypted voice data packet.
  • the source voice data packet may be extracted from the audio acquired by the test device in real time. For example, a test device obtains a piece of sound recorded in real time through the recording device, and the test device downloads a piece of voice on the network, etc., and the above-mentioned one piece of recording and one piece of voice are recorded.
  • the source voice data packet can be obtained by analog-to-digital conversion and converted into a digital signal; the source voice data packet can also be pre-stored by the test device, for example, a plurality of voice data can be pre-stored in the non-volatile memory of the test device. (for example, a song, a ringtone, etc.), when the test device needs to send the source voice data packet, randomly extract a voice data from the plurality of voice data, and perform the digital conversion by the analog-to-digital conversion of the voice data. That is, the source voice data packet can be obtained.
  • the third-party test device After the test device sends the source voice data packet to the third-party test device, the third-party test device encrypts the source voice data packet by using a voice encryption algorithm and obtains a third encrypted voice data packet, where the third-party test device utilizes a voice encryption algorithm pair.
  • the source voice data packet (binary data stream) is processed to obtain a third encrypted voice data packet (a binary data stream processed by the voice encryption algorithm).
  • the above-mentioned voice encryption algorithm is an algorithm supported by a third-party test device, a test device, and a terminal, that is, a third-party test device, a test device, and a terminal must have the same voice encryption algorithm supported by the same.
  • the voice encryption algorithm is pre-negotiated by the third-party test equipment, the test equipment, and the terminal.
  • the test device receives a third encrypted voice data packet sent by the third-party test device.
  • the testing device determines whether the third encrypted voice data packet matches the first encrypted voice data packet or the second encrypted voice data packet. If yes, step 307 is performed, and if no, step 308 is performed.
  • the test device determines whether the third encrypted voice data packet matches the first encrypted voice data packet or the second encrypted voice data packet.
  • the source voice data packet is a binary data stream, and the test device processes the source voice data packet (binary data stream) by using a voice encryption algorithm to obtain a second encrypted voice data packet (a binary data stream processed by the voice encryption algorithm).
  • the test device determines whether the third encrypted voice data packet matches the first encrypted voice data packet or the second encrypted voice data packet, and can compare the third encrypted voice data packet (binary data stream) with the first encrypted voice data packet (binary data) Whether each binary number in the stream or the second encrypted voice data packet (binary data stream) is the same, when the third encrypted voice data packet (binary data stream) and the first encrypted voice data packet (binary data stream) have a binary number When the same ratio reaches a preset threshold, or the same ratio of the binary number in the third encrypted voice data packet (binary data stream) and the second encrypted voice data packet (binary data stream) reaches a preset threshold, the first encrypted voice data is determined.
  • the packet matches the second encrypted voice data packet, and the preset threshold may be 80%, 85%, 90%, 95%, etc., since the data packet is transmitted between the terminal and the test device, the test device and the third-party test device, In the case of packet loss, etc., the third encrypted voice data packet and the first encrypted voice data packet or the second encrypted voice data are often used. Not completely match, only reaches a preset threshold can be considered by voice encryption tests.
  • the test can be performed by two test devices. When both test devices pass the test, it is determined that the terminal passes the voice encryption test, which can further improve the accuracy of the test result. It can detect more accurately whether the terminal has voice encryption.
  • the test device determines that the terminal passes the voice encryption test.
  • the test device determines that the terminal does not pass the voice encryption test.
  • Steps 301 to 304 shown in FIG. 3 may refer to step 201 to step 204 shown in FIG. 2, and steps 308 to 309 shown in FIG. 3 may refer to step 205 to step 206 shown in FIG. 2, which are embodiments of the present invention. No longer.
  • the test can be performed by two test devices.
  • both test devices pass the test, it is determined that the terminal passes the voice encryption test, which can further improve the accuracy of the test result. Sex, so that it can more accurately detect whether the terminal has voice encryption.
  • FIG. 4 is a schematic flowchart diagram of another method for testing voice encryption according to an embodiment of the present invention. As shown in FIG. 4, the test method for voice encryption described in this embodiment includes the following steps.
  • test device negotiates a voice encryption algorithm with the terminal. If the negotiation is successful, step 402 is performed. If the negotiation is unsuccessful, the process ends.
  • the test device before the test device sends the source voice data packet to the terminal, the test device negotiates a voice encryption algorithm with the terminal, that is, determines an encryption algorithm supported by both the test device and the terminal, to test the encryption supported by both the device and the terminal.
  • the algorithm performs a voice encryption test.
  • step 401 can include the following steps:
  • the test device determines whether the voice encryption algorithm supported by the test device is the same as the voice encryption algorithm supported by the terminal;
  • test device uses the voice encryption algorithm supported by the test device and the terminal as a voice encryption algorithm pre-negotiated by the test device and the terminal.
  • both the test device and the terminal can support some voice encryption algorithms.
  • the test device supports four voice encryption algorithms A, B, C, and D.
  • the terminal only supports the voice encryption algorithm A, and the test device negotiates with the terminal.
  • the voice encryption algorithm is A; for example, the test device supports four voice encryption algorithms A, B, C, and D.
  • the terminal only supports the voice encryption algorithms A and B, and the voice encryption algorithms negotiated between the test device and the terminal are A and B. Then, the test device and the terminal respectively use the voice encryption algorithm for A and the voice encryption algorithm to perform voice encryption test for B.
  • step 402 the following steps may also be performed:
  • the test device negotiates the key with the terminal; if the negotiation is successful, step 402 is performed.
  • the key is used by the terminal to encrypt the first encrypted voice data packet by using the key to obtain the first key encrypted voice data packet; the key is used by the test device to decrypt the first key encrypted voice data packet by using the key. , obtaining the first encrypted voice data packet.
  • the test device and the terminal pre-negotiate the key, and the terminal encrypts the first encrypted voice data packet by using the above-mentioned key to obtain the first key encryption.
  • the voice data packet after the test device receives the first key encrypted voice data packet, the test device decrypts the first key encrypted voice data packet by using the key to obtain the first encrypted voice data packet.
  • the embodiment of the present invention can improve the security of voice encryption by negotiating a key encryption method.
  • the test device sends the source voice data packet to the terminal, where the source voice data packet is used by the terminal to encrypt the source voice data packet by using a voice encryption algorithm, and obtains the first encrypted voice data packet, where the voice encryption algorithm pre-negotiates the test device with the terminal. of.
  • the test device receives the first encrypted voice data packet sent by the terminal.
  • the test device encrypts the source voice data packet by using a voice encryption algorithm pre-negotiated with the test device and the terminal to obtain a second encrypted voice data packet.
  • test device verifies whether the first encrypted voice data packet matches the second encrypted voice data packet. If yes, go to step 406. If no, end the process.
  • the test device sends the source voice data packet to the third-party test device, and the source voice data packet is used by the third-party test device to encrypt the source voice data packet by using a voice encryption algorithm, and obtain a third encrypted voice data packet, where the voice encryption algorithm is Third-party test equipment, test equipment, and terminals are pre-negotiated.
  • the voice encryption algorithm is Third-party test equipment, test equipment, and terminals are pre-negotiated.
  • the test device receives a third encrypted voice data packet sent by the third-party test device.
  • the test device determines whether the third encrypted voice data packet matches the first encrypted voice data packet or the second encrypted voice data packet. If yes, step 409 is performed, and if no, step 410 is performed.
  • the test device determines that the terminal passes the voice encryption test.
  • the test device determines that the terminal does not pass the voice encryption test.
  • the implementation of the embodiment shown in FIG. 4 can pre-negotiate the voice encryption algorithm and the key, and can encrypt the voice data through the negotiated voice encryption algorithm and the key, accurately detect whether the terminal has the voice encryption function, and improve the accuracy of the test result. .
  • FIG. 5 is a schematic structural diagram of a test device according to an embodiment of the present invention.
  • the test device described in this embodiment includes a first sending unit 501, a first receiving unit 502, an encrypting unit 503, a verifying unit 504, and a determining unit 505, where:
  • the first sending unit 501 is configured to send the source voice data packet to the terminal, and the source voice data packet is used by the terminal to encrypt the source voice data packet by using a voice encryption algorithm to obtain a first encrypted voice data packet, and the voice encryption algorithm is a test device. Pre-negotiated with the terminal.
  • the first receiving unit 502 is configured to receive the first encrypted voice data packet sent by the terminal.
  • the encryption unit 503 is configured to encrypt the source voice data packet by using a voice encryption algorithm pre-negotiated with the test device and the terminal to obtain a second encrypted voice data packet.
  • the verification unit 504 is configured to verify whether the first encrypted voice data packet matches the second encrypted voice data packet.
  • the determining unit 505 is configured to determine that the terminal passes the voice encryption test when the verification unit 504 verifies that the result is YES.
  • FIG. 6 is a schematic structural diagram of another testing device according to an embodiment of the present invention. As shown in FIG. 6, the testing device further includes an acquiring unit 506, where:
  • the obtaining unit 506 is configured to: before the first sending unit 501 sends the source voice data packet to the terminal, acquire the source voice data packet, where the source voice data packet is extracted from the voice data acquired by the recording device in the testing device, or the source The voice data packet is extracted from the voice data pre-stored in the test device.
  • FIG. 7 is a schematic structural diagram of another testing device according to an embodiment of the present invention.
  • FIG. 7 includes a second transmitting unit 507, a second transmitting unit 501, a first receiving unit 502, an encrypting unit 503, a verifying unit 504, and a determining unit 505, as shown in FIG.
  • the receiving unit 508 and the determining unit 509 wherein:
  • the second sending unit 507 is configured to: when the first encrypted voice data packet matches the second encrypted voice data packet, send the source voice data packet to the third party testing device, and the source voice data packet is used by the third party testing device to use the voice
  • the encryption algorithm encrypts the source voice data packet and obtains a third encrypted voice data packet, and the voice encryption algorithm is pre-negotiated for the third-party test equipment, the test equipment, and the terminal.
  • the second receiving unit 508 is configured to receive a third encrypted voice data packet sent by the third-party testing device.
  • the determining unit 509 is configured to determine whether the third encrypted voice data packet matches the first encrypted voice data packet or the second encrypted voice data packet.
  • the determining unit 505 is further configured to determine that the terminal passes the voice encryption test when the determination unit 509 determines that the result is YES.
  • FIG. 8 is a schematic structural diagram of another testing device according to an embodiment of the present invention.
  • FIG. 8 includes, in addition to the first transmitting unit 501, the first receiving unit 502, the encrypting unit 503, the verifying unit 504, the determining unit 505, the second transmitting unit 507, and the second receiving unit 508 shown in FIG.
  • the negotiating unit 510 is further included, wherein:
  • the negotiating unit 510 is arranged to negotiate a speech encryption algorithm with the terminal.
  • the first sending unit 501 is further configured to send the source voice data packet to the terminal after the negotiation unit 510 successfully negotiates the voice encryption algorithm with the terminal.
  • FIG. 9 is a schematic structural diagram of another testing apparatus according to an embodiment of the present disclosure, and FIG. 9 is further optimized based on FIG. 8 , where the negotiating unit 510 in FIG. 9 includes a first determining subunit 5101 and a second determining subunit 5102, wherein:
  • the first determining subunit 5101 is configured to determine whether the voice encryption algorithm supported by the test device is the same as the voice encryption algorithm supported by the terminal;
  • the second determining subunit 5102 is configured to: when the first determining subunit 5101 determines whether the voice encryption algorithm supported by the testing device is the same as the voice encryption supported by the terminal, the voice encryption algorithm supported by the testing device and the terminal is used as the testing device and the terminal. Pre-negotiated speech encryption algorithm.
  • FIG. 10 is a schematic structural diagram of another testing apparatus according to an embodiment of the present invention, and FIG. 10 is further optimized based on FIG. 5, and FIG. 10 includes FIG.
  • a key negotiating unit 511 is further included, wherein:
  • the key agreement unit 511 is arranged to negotiate a key with the terminal.
  • the first sending unit 501 is further configured to: after the key negotiation unit 511 is configured to negotiate the key successfully with the terminal, send the source voice data packet to the terminal; wherein the key is used by the terminal to use the key pair to the first encrypted voice data.
  • the packet is encrypted to obtain a first key encrypted voice data packet; the key is used by the test device to decrypt the first key encrypted voice data packet by using the key to obtain a first encrypted voice data packet.
  • the testing device shown in FIG. 5 to FIG. 10 is implemented, and the test device provides the source voice data packet for testing, which can prevent the terminal from fooling the test device due to the source voice data packet provided by the terminal, thereby accurately detecting whether the terminal has the voice encryption function. Improve the accuracy of test results.
  • FIG. 11 is a schematic structural diagram of still another testing device according to an embodiment of the present invention.
  • the testing device described in this embodiment includes: a network interface 1000; at least one processor 2000, such as a CPU; and a memory 3000.
  • the network interface 1000, the processor 2000, and the memory 3000 are connected by a bus 4000.
  • the network interface 1000 may be an AUI interface, a BNC interface, a console interface, etc., for receiving and transmitting voice data packets.
  • the above memory 3000 may be a high speed RAM memory, or may be a non-volatile memory such as a disk memory or a nonvolatile memory.
  • the above memory 3000 is used to store a set of program codes, and the processor 2000 is used to call the program code stored in the memory 3000 to perform the following operations:
  • the source voice data packet is sent to the terminal, and the source voice data packet is used by the terminal to encrypt the source voice data packet by using the voice encryption algorithm to obtain the first encrypted voice data packet, and the voice encryption algorithm is pre-negotiated by the test device and the terminal;
  • the processor 2000 described in the embodiment of the present invention may implement the implementation manner described in the method for testing the voice encryption shown in FIG. 2 to FIG.
  • the implementation of the test device described in FIG. 5 to FIG. 10 is not described herein again.
  • modules or sub-modules in all embodiments of the present invention may be implemented by a general-purpose integrated circuit, such as a CPU (Central Processing Unit), or by an ASIC (Application Specific Integrated Circuit).
  • a general-purpose integrated circuit such as a CPU (Central Processing Unit), or by an ASIC (Application Specific Integrated Circuit).
  • the units in the apparatus of the embodiment of the present invention may be combined, divided, and deleted according to actual needs.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)
  • Telephone Function (AREA)

Abstract

Disclosed in the embodiment of the invention are a testing method and a test device for voice encryption. The method comprises: sending a source voice packet to a terminal, the source voice packet being used for the terminal to encrypt the source voice packet by using a voice encryption algorithm and to obtain a first encrypted voice packet, the voice encryption algorithm being pre-negotiated with the terminal by the test device; receiving the first encrypted voice packet transmitted from a receiving terminal; encrypting the source voice packet with the voice encryption algorithm pre-negotiated with the terminal by the test device to obtain a second encrypted voice packet; verifying whether the first encrypted voice packet matches the second encrypted voice packet; and if yes, then determining that the terminal passes the voice encryption test. According to the present invention, it is possible to accurately detect whether or not the terminal has a voice encryption function.

Description

一种语音加密的测试方法及测试设备Voice encryption test method and test equipment
本申请要求于2016年6月30日提交中国专利局,申请号为201610505815.4、发明名称为“一种语音加密的测试方法及测试设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to Chinese Patent Application No. 201610505815.4, entitled "A Test Method and Test Equipment for Voice Encryption", which is filed on June 30, 2016, the entire contents of which are incorporated by reference. In this application.
技术领域Technical field
本发明涉及通信技术领域,具体涉及一种语音加密的测试方法及测试设备。The present invention relates to the field of communications technologies, and in particular, to a voice encryption test method and a test device.
背景技术Background technique
随着手机等智能终端的普及,智能终端的功能也越来越多。为了保证智能终端的通话安全,许多智能终端都具有语音加密功能,智能终端可以对通话语音进行加密。智能终端在出厂之前,一般会使用第三方机构提供的测试设备对智能终端进行语音加密的测试,以测试智能终端是否具有语音加密功能。目前的语音加密测试方法为:终端向测试设备发送初始语音数据和初始语音数据经过智能终端加密后得到的第一加密语音数据,测试设备接收到初始语音数据后对初始语音设备进行加密,得到第二加密语音数据,当第一语音加密数据和第二语音加密数据匹配时,确定智能终端具备语音加密功能。With the popularity of smart terminals such as mobile phones, the functions of smart terminals are also increasing. In order to ensure the security of the call of the smart terminal, many smart terminals have a voice encryption function, and the smart terminal can encrypt the call voice. Before the smart terminal is shipped from the factory, the test device provided by the third-party organization is generally used to test the voice encryption of the smart terminal to test whether the smart terminal has the voice encryption function. The current voice encryption test method is: the terminal sends the initial voice data and the first voice data obtained after the initial voice data is encrypted by the smart terminal to the test device, and the test device encrypts the initial voice device after receiving the initial voice data, and obtains the first And encrypting the voice data, when the first voice encrypted data and the second voice encrypted data match, determining that the smart terminal has a voice encryption function.
然而,有些智能终端并不具备语音加密功能,有些不良厂商在智能终端中预先导入需要进行测试的初始语音数据和已经加密好的加密语音数据,即可骗过测试设备。可见,目前的测试设备往往无法准确检测智能终端是否具备加密功能。However, some smart terminals do not have voice encryption function. Some bad manufacturers can pre-inject the initial voice data and the encrypted voice data that have been encrypted in the smart terminal to fool the test equipment. It can be seen that the current test equipment often cannot accurately detect whether the smart terminal has the encryption function.
发明内容Summary of the invention
本发明实施例提供一种语音加密的测试方法及测试设备,可以准确检测终端是否具备语音加密功能。The embodiment of the invention provides a test method and a test device for voice encryption, which can accurately detect whether a terminal has a voice encryption function.
第一方面,提供了一种语音加密的测试方法,包括:In a first aspect, a method for testing voice encryption is provided, including:
将源语音数据包发送至终端,所述源语音数据包用于所述终端利用语音加密算法对所述源语音数据包进行加密并得到第一加密语音数据包,所述语音加密算法为测试设备与所述终端预先协商的;Transmitting the source voice data packet to the terminal, where the source voice data packet is used by the terminal to encrypt the source voice data packet by using a voice encryption algorithm, and obtain a first encrypted voice data packet, where the voice encryption algorithm is a test device Pre-negotiated with the terminal;
接收所述终端发送的所述第一加密语音数据包;Receiving the first encrypted voice data packet sent by the terminal;
利用与所述测试设备与所述终端预先协商的语音加密算法对所述源语音数据包进行加密,得到第二加密语音数据包;Encrypting the source voice data packet by using a voice encryption algorithm pre-negotiated with the test device and the terminal to obtain a second encrypted voice data packet;
验证所述第一加密语音数据包与所述第二加密语音数据包是否匹配;Verifying whether the first encrypted voice data packet matches the second encrypted voice data packet;
若是,则确定所述终端通过语音加密测试。If so, it is determined that the terminal passes the voice encryption test.
结合第一方面,在第一方面的第一种实现方式中,所述验证所述第一加密语音数据包与所述第二加密语音数据包是否匹配之后,所述方法还包括:With the first aspect, in a first implementation manner of the first aspect, after the verifying whether the first encrypted voice data packet matches the second encrypted voice data packet, the method further includes:
若所述第一加密语音数据包与所述第二加密语音数据包匹配,则将所述源语音数据包发送至第三方测试设备,所述源语音数据包用于所述第三方测试设备利用所述语音加密算法对所述源语音数据包进行加密并得到第三加密语音数据包,所述语音加密算法为所述第三方测试设备、所述测试设备和所述终端预先协商的;And if the first encrypted voice data packet matches the second encrypted voice data packet, sending the source voice data packet to a third-party testing device, where the source voice data packet is used by the third-party testing device The voice encryption algorithm encrypts the source voice data packet and obtains a third encrypted voice data packet, where the voice encryption algorithm is pre-negotiated by the third-party testing device, the testing device, and the terminal;
接收所述第三方测试设备发送的所述第三加密语音数据包;Receiving the third encrypted voice data packet sent by the third-party testing device;
判断所述第三加密语音数据包与所述第一加密语音数据包或所述第二加密语音数据包是否匹配;Determining whether the third encrypted voice data packet matches the first encrypted voice data packet or the second encrypted voice data packet;
若是,则执行所述确定所述终端通过语音加密测试的步骤。If yes, performing the step of determining that the terminal passes the voice encryption test.
结合第一方面的第一种实现方式,在第一方面的第二种实现方式中,所述将源语音数据包发送至终端之前,所述方法还包括:With the first implementation of the first aspect, in a second implementation manner of the first aspect, before the sending the source voice data packet to the terminal, the method further includes:
与所述终端协商语音加密算法;Negotiating a voice encryption algorithm with the terminal;
若协商成功,则执行所述将源语音数据包发送至终端的步骤。If the negotiation is successful, the step of transmitting the source voice data packet to the terminal is performed.
结合第一方面的第二种实现方式,在第一方面的第三种实现方式中,所述与所述终端协商语音加密算法,包括:With the second implementation of the first aspect, in a third implementation manner of the first aspect, the negotiating a voice encryption algorithm with the terminal includes:
确定测试设备支持的语音加密算法与所述终端支持的语音加密算法是否相同;Determining whether the voice encryption algorithm supported by the test device is the same as the voice encryption algorithm supported by the terminal;
若是,则将所述测试设备与所述终端共同支持的语音加密算法作为所述测试设备与所述终端预先协商的语音加密算法。If yes, the voice encryption algorithm supported by the test device and the terminal is used as a voice encryption algorithm pre-negotiated by the test device and the terminal.
结合第一方面或第一方面的第一种至第三种中任一种实现方式,在第一方面的第四种实现方式中,所述将源语音数据包发送至终端之前,所述方法还包括:With reference to the first aspect, or any one of the first to the third aspect of the first aspect, in the fourth implementation manner of the first aspect, before the sending the source voice data packet to the terminal, the method Also includes:
获取源语音数据包,所述源语音数据包是从测试设备中的录音设备获取的语音数据中提取的,或者所述源语音数据包是从所述测试设备中预先存储的语音数据中提取的。Acquiring a source voice data packet, the source voice data packet is extracted from voice data acquired by a recording device in the test device, or the source voice data packet is extracted from voice data pre-stored in the test device .
结合第一方面或第一方面的第一种至第三种中任一种实现方式,在第一方面的第五种实现方式中,所述将源语音数据包发送至终端之前,所述方法还包括:With reference to the first aspect, or any one of the first to the third aspects of the first aspect, in a fifth implementation manner of the first aspect, before the sending the source voice data packet to the terminal, the method Also includes:
与所述终端协商密钥;Negotiating a key with the terminal;
若协商成功,执行所述将源语音数据包发送至终端的步骤;If the negotiation is successful, performing the step of sending the source voice data packet to the terminal;
其中,所述密钥用于所述终端利用所述密钥对所述第一加密语音数据包进行加密,得到第一密钥加密语音数据包;所述密钥用于所述测试设备利用所述密钥对所述第一密钥加密语音数据包进行解密,得到所述第一加密语音数据包。The key is used by the terminal to encrypt the first encrypted voice data packet by using the key to obtain a first key encrypted voice data packet; the key is used by the test device to utilize the Deriving the key to decrypt the first key encrypted voice data packet to obtain the first encrypted voice data packet.
第二方面,提供了一种测试设备,包括:In a second aspect, a test apparatus is provided, comprising:
第一发送单元,设置为将源语音数据包发送至终端,所述源语音数据包用于所述终端利用语音加密算法对所述源语音数据包进行加密并得到第一加密语音数据包,所述语音加密算法为测试设备与所述终端预先协商的;a first sending unit, configured to send a source voice data packet to the terminal, where the source voice data packet is used by the terminal to encrypt the source voice data packet by using a voice encryption algorithm, and obtain a first encrypted voice data packet, where The speech encryption algorithm is pre-negotiated by the test device with the terminal;
第一接收单元,设置为接收所述终端发送的所述第一加密语音数据包;a first receiving unit, configured to receive the first encrypted voice data packet sent by the terminal;
加密单元,设置为利用与所述测试设备与所述终端预先协商的语音加密算法对所述源语音数据包进行加密,得到第二加密语音数据包;The encryption unit is configured to encrypt the source voice data packet by using a voice encryption algorithm pre-negotiated with the test device and the terminal to obtain a second encrypted voice data packet;
验证单元,设置为验证所述第一加密语音数据包与所述第二加密语音数据包是否匹配;a verification unit, configured to verify whether the first encrypted voice data packet matches the second encrypted voice data packet;
确定单元,设置为当所述验证单元验证结果为是时,确定所述终端通过语音加密测试。The determining unit is configured to determine that the terminal passes the voice encryption test when the verification unit verifies that the result is yes.
结合第二方面,在第二方面的第一种实现方式中,所述测试设备还包括:With reference to the second aspect, in a first implementation manner of the second aspect, the testing device further includes:
第二发送单元,设置为当所述第一加密语音数据包与所述第二加密语音数据包匹配时,则将所述源语音数据包发送至第三方测试设备,所述源语音数据包用于所述第三方测试设备利用所述语音加密算法对所述源语音数据包进行加密并得到第三加密语音数据包,所述语音加密算法为所述第三方测试设备、所述测试设备和所述终端预先协商的;a second sending unit, configured to: when the first encrypted voice data packet matches the second encrypted voice data packet, send the source voice data packet to a third-party testing device, where the source voice data packet is used The third-party test device encrypts the source voice data packet by using the voice encryption algorithm, and obtains a third encrypted voice data packet, where the voice encryption algorithm is the third-party test device, the test device, and the Said terminal pre-negotiated;
第二接收单元,设置为接收所述第三方测试设备发送的所述第三加密语音数据包;a second receiving unit, configured to receive the third encrypted voice data packet sent by the third-party testing device;
判断单元,设置为判断所述第三加密语音数据包与所述第一加密语音数据包或所述第二加密语音数据包是否匹配;a determining unit, configured to determine whether the third encrypted voice data packet matches the first encrypted voice data packet or the second encrypted voice data packet;
所述确定单元,还设置为当所述判断单元判断结果为是时,确定所述终端通过语音加密测试。The determining unit is further configured to: when the determining unit determines that the result is yes, determine that the terminal passes the voice encryption test.
结合第二方面的第一种实现方式,在第二方面的第二种实现方式中,所述测试设备还包括:With reference to the first implementation of the second aspect, in a second implementation manner of the second aspect, the testing device further includes:
协商单元,设置为与所述终端协商语音加密算法;a negotiating unit, configured to negotiate a voice encryption algorithm with the terminal;
所述第一发送单元,还设置为当所述协商单元与所述终端协商语音加密算法成功之后,将源语音数据包发送至所述终端。The first sending unit is further configured to send the source voice data packet to the terminal after the negotiation unit successfully negotiates the voice encryption algorithm with the terminal.
结合第二方面的第二种实现方式,在第二方面的第三种实现方式中,所述协商单元包括:With the second implementation of the second aspect, in a third implementation manner of the second aspect, the negotiating unit includes:
第一确定子单元,设置为确定测试设备支持的语音加密算法与所述终端支持的语音加密算法是否相同;a first determining subunit, configured to determine whether a voice encryption algorithm supported by the test device is the same as a voice encryption algorithm supported by the terminal;
第二确定子单元,设置为当所述第一确定子单元确定所述测试设备支持的语音加密算法与所述终端支持的语音加密是否相同时,将所述测试设备与所述终端共同支持的语音加密算法作为所述测试设备与所述终端预先协商的语音加密算法。a second determining subunit, configured to: when the first determining subunit determines whether the voice encryption algorithm supported by the testing device is the same as the voice encryption supported by the terminal, the testing device and the terminal jointly support The voice encryption algorithm is used as a voice encryption algorithm pre-negotiated by the test device with the terminal.
结合第二方面或第二方面的第一种至第三种中任一种实现方式,在第二方面的第四种实现方式中,所述测试设备还包括:With reference to the second aspect, or any one of the first to the third aspect of the second aspect, in the fourth implementation manner of the second aspect, the testing device further includes:
获取单元,设置为在所述第一发送单元将源语音数据包发送至终端之前,获取源语音数据包,所述源语音数据包是从测试设备中的录音设备获取的语音数据中提取的,或者所述源语音数据包是从所述测试设备中预先存储的语音数据中提取的。An acquiring unit, configured to acquire a source voice data packet, where the source voice data packet is extracted from voice data acquired by a recording device in a test device, before the first sending unit sends the source voice data packet to the terminal, Or the source voice data packet is extracted from voice data pre-stored in the test device.
结合第二方面或第二方面的第一种至第三种中任一种实现方式,在第二方面的第五种实现方式中,所述测试设备还包括:With reference to the second aspect, or any one of the first to the third aspect of the second aspect, in the fifth implementation manner of the second aspect, the testing device further includes:
密钥协商单元,设置为与所述终端协商密钥;a key agreement unit, configured to negotiate a key with the terminal;
所述第一发送单元,还设置为当所述密钥协商单元设置为与所述终端协商密钥成功之后,将源语音数据包发送至所述终端;其中,所述密钥用于所述终端利用所述密钥对所述第一加密语音数据包进行加密,得到第一密钥加密语音数据包;所述密钥用于所述测试设备利用所述密钥对所述第一密钥加密语音数据包进行解密,得到所述第一加密语音数据包。The first sending unit is further configured to: after the key negotiating unit is configured to negotiate a key with the terminal, send a source voice data packet to the terminal; wherein the key is used for the The terminal encrypts the first encrypted voice data packet by using the key to obtain a first key encrypted voice data packet; the key is used by the test device to use the key to the first key The encrypted voice data packet is decrypted to obtain the first encrypted voice data packet.
本发明实施例中,测试设备发送源语音数据包给终端,终端和测试设备用协商的语音加密算法分别对源语音数据包进行加密,分别得到第一加密语音数据包和第二加密语音数据包,当测试设备验证第一加密语音数据包与第二加密语音数据包匹配时,则确定终端通过语音加密测试。实施本发明实施例,由测试设备提供源语音数据包进行测试,可以防止由于终端提供源语音数据包导致终端骗过测试设备,从而可以准确检测终端是否具备语音加密功能。In the embodiment of the present invention, the test device sends the source voice data packet to the terminal, and the terminal and the test device respectively encrypt the source voice data packet by using a negotiated voice encryption algorithm to obtain the first encrypted voice data packet and the second encrypted voice data packet respectively. When the test device verifies that the first encrypted voice data packet matches the second encrypted voice data packet, it is determined that the terminal passes the voice encryption test. By implementing the embodiment of the present invention, the test device provides the source voice data packet for testing, which can prevent the terminal from spoofing the test device due to the source voice data packet provided by the terminal, so that the terminal can accurately detect whether the terminal has the voice encryption function.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
图1是本发明实施例公开的一种系统架构示意图;1 is a schematic structural diagram of a system disclosed in an embodiment of the present invention;
图2是本发明实施例公开的一种语音加密的测试方法的流程示意图;2 is a schematic flowchart of a method for testing voice encryption according to an embodiment of the present invention;
图3是本发明实施例公开的另一种语音加密的测试方法的流程示意图;3 is a schematic flowchart of another method for testing voice encryption according to an embodiment of the present invention;
图4是本发明实施例公开的另一种语音加密的测试方法的流程示意图;4 is a schematic flowchart diagram of another method for testing voice encryption according to an embodiment of the present invention;
图5是本发明实施例公开的一种测试设备的结构示意图;FIG. 5 is a schematic structural diagram of a test device according to an embodiment of the present invention; FIG.
图6是本发明实施例公开的另一种测试设备的结构示意图;6 is a schematic structural diagram of another test device according to an embodiment of the present invention;
图7是本发明实施例公开的另一种测试设备的结构示意图;7 is a schematic structural diagram of another test device according to an embodiment of the present invention;
图8是本发明实施例公开的另一种测试设备的结构示意图;8 is a schematic structural diagram of another test device according to an embodiment of the present invention;
图9是本发明实施例公开的另一种测试设备的结构示意图;9 is a schematic structural diagram of another test device according to an embodiment of the present invention;
图10是本发明实施例公开的另一种测试设备的结构示意图;10 is a schematic structural diagram of another test device according to an embodiment of the present invention;
图11是本发明实施例提供的又一种测试设备的结构示意图。FIG. 11 is a schematic structural diagram of still another testing device according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施方式中的附图,对本发明实施方式中的技术方案进行清楚、完整地描述。显然,所描述的实施方式是本发明的一部分实施方式,而不是全部实施方式。基于本发明中的实施方式,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施方式,都应属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described in the following with reference to the accompanying drawings. It is apparent that the described embodiments are part of the embodiments of the invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of the present invention.
本发明的说明书和权利要求书以及说明书附图中的术语“第一”、“第二”和“第三”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选的还包括没有列出的步骤或单元,或可选的还包括对这些过程、方法、产品或设备固有的其他步骤或单元。The terms "first", "second", and "third" and the like in the specification and claims of the present invention and the drawings are used to distinguish different objects, and are not intended to describe a specific order. Moreover, the terms "comprises" and "comprising" and "comprising" are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that comprises a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units not listed, or alternatively includes Other steps or units inherent to these processes, methods, products or equipment.
本发明实施例提供一种语音加密的测试方法及测试设备,可以准确检测终端是否具备语音加密功能。以下分别进行详细说明。The embodiment of the invention provides a test method and a test device for voice encryption, which can accurately detect whether a terminal has a voice encryption function. The details are described below separately.
为了更好的理解本发明实施例,下面先对本发明实施例适用的一种系统架构进行描述。请参阅图1,图1是本发明实施例公开的一种系统架构示意图。如图1所示,包括测试设备和终端,其中,测试设备与终端可以通过有线连接(例如,通过终端上的耳机接口、USB接口与测试设备连接),也可以通过无线连接(例如,通过蓝牙连接、WiFi连接等),测试设备可以包括语音编解码模块、语音加解密模块、音频处理模块、数据收发模块等,语音编解码模块设置为对音频数据进行编码和解码,语音加解密模块设置为对音频数据进行加密和解密,音频处理模块可以进行录音,数据收发模块可以进行数据的发送和接收。终端可以包括手机、电脑、平板电脑等可以进行语音处理的设备。实施图1所示的系统架构,可以通过测试设备准确检测终端是否具备语音加密功能。For a better understanding of the embodiments of the present invention, a system architecture to which the embodiments of the present invention are applied is described below. Please refer to FIG. 1. FIG. 1 is a schematic diagram of a system architecture disclosed in an embodiment of the present invention. As shown in FIG. 1 , the test device and the terminal are included, wherein the test device and the terminal can be connected through a wired connection (for example, through a headphone interface on the terminal, a USB interface, or a test device), or through a wireless connection (for example, through Bluetooth). The connection, the WiFi connection, and the like, the test device may include a voice codec module, a voice encryption and decryption module, an audio processing module, a data transceiver module, etc., the voice codec module is configured to encode and decode the audio data, and the voice encryption and decryption module is set to The audio data is encrypted and decrypted, the audio processing module can perform recording, and the data transceiver module can transmit and receive data. The terminal may include a device such as a mobile phone, a computer, or a tablet computer that can perform voice processing. By implementing the system architecture shown in FIG. 1, the test device can accurately detect whether the terminal has voice encryption function.
请参阅图2,图2是本发明实施例公开的一种语音加密的测试方法的流程示意图。如图2所示,本实施例中所描述的语音加密的测试方法,包括如下步骤。Please refer to FIG. 2. FIG. 2 is a schematic flowchart diagram of a method for testing voice encryption according to an embodiment of the present invention. As shown in FIG. 2, the test method for voice encryption described in this embodiment includes the following steps.
201,测试设备将源语音数据包发送至终端,源语音数据包用于终端利用语音加密算法对源语音数据包进行加密并得到第一加密语音数据包,语音加密算法为测试设备与终端预先协商的。201. The test device sends the source voice data packet to the terminal, where the source voice data packet is used by the terminal to encrypt the source voice data packet by using a voice encryption algorithm, and obtains the first encrypted voice data packet, where the voice encryption algorithm pre-negotiates the test device with the terminal. of.
本发明实施例中,源语音数据包可以是从测试设备实时获取的音频中提取的,例如,测试设备通过录音设备实时获取的一段录音,测试设备在网络上下载的一段语音等,将上述一段录音、一段语音经过模数转换,转换为数字信号,即可得到源语音数据包;源语音数据包也可以是测试设备预先存储的,例如,可以在测试设备的非易失性存储器中预先存储多个语音数据(例如,一段歌曲、一段手机铃声等),当测试设备需要发送源语音数据包时,从上述多个语音数据中随机抽取一个语音数据,将上述一个语音数据经过模数转换,得到数字信号,即可以得到源语音数据包。测试设备将源语音数据包发送至终端之后,终端利用语音加密算法对源语音数据包进行加密并得到第一加密语音数据包,其中,终端利用语音加密算法对源语音数据包(二进制数据流)进行处理,得到第一加密语音数据包(经过语音加密算法处理之后的二进制数据流)。上述语音加密算法为测试设备与终端共同支持的算法,即测试设备和终端必须有共同支持的同一种语音加密算法。其中,语音加密算法为测试设备与终端预先协商的。在执行步骤201之前,测试设备与终端预先协商可以预先协商一种测试设备和终端共同支持的语音加密算法,终端和测试设备以上述共同支持的语音加密算法分别进行语音加密。显然的,在执行步骤201之前,测试设备与终端需要建立连接,测试设备与终端可以通过有线连接(例如,通过终端上的耳机接口、USB接口与测试设备连接),也可以通过无线连接(例如,通过蓝牙连接、WiFi连接等)。In the embodiment of the present invention, the source voice data packet may be extracted from the audio acquired by the test device in real time, for example, a recording device obtained by the testing device in real time through the recording device, a segment of the voice downloaded by the testing device on the network, and the like. The recording, a speech is converted into a digital signal by analog-to-digital conversion, and the source voice data packet can be obtained; the source voice data packet can also be pre-stored by the test device, for example, can be pre-stored in the non-volatile memory of the test device. a plurality of voice data (for example, a song, a ringtone, etc.), when the test device needs to send the source voice data packet, randomly extracting one voice data from the plurality of voice data, and performing the analog-to-digital conversion on the voice data. The source voice data packet can be obtained by obtaining a digital signal. After the test device sends the source voice data packet to the terminal, the terminal encrypts the source voice data packet by using a voice encryption algorithm and obtains the first encrypted voice data packet, wherein the terminal uses the voice encryption algorithm to source the voice data packet (binary data stream). Processing is performed to obtain a first encrypted voice data packet (a binary data stream after being processed by a voice encryption algorithm). The above voice encryption algorithm is an algorithm supported by the test device and the terminal, that is, the same voice encryption algorithm that the test device and the terminal must support together. The voice encryption algorithm is pre-negotiated between the test device and the terminal. Before the step 201 is performed, the test device pre-negotiates with the terminal to pre-negotiate a voice encryption algorithm supported by the test device and the terminal. The terminal and the test device respectively perform voice encryption by using the voice encryption algorithm supported by the foregoing. Obviously, before performing step 201, the test device and the terminal need to establish a connection, and the test device and the terminal can be connected through a wired connection (for example, through a headphone interface, a USB interface on the terminal, or a test device), or through a wireless connection (for example, , via Bluetooth connection, WiFi connection, etc.).
可选的,在执行步骤201之前,可以执行如下步骤:Optionally, before performing step 201, the following steps may be performed:
获取源语音数据包,源语音数据包是从测试设备中的录音设备获取的语音数据中提取的,或者源语音数据包是从测试设备中预先存储的语音数据中提取的。The source voice data packet is obtained, and the source voice data packet is extracted from the voice data acquired by the recording device in the test device, or the source voice data packet is extracted from the voice data pre-stored in the test device.
其中,源语音数据包可以是从测试设备中的录音设备获取的语音数据中提取的,例如,测试设备通过录音设备实时获取的一段录音,测试设备从上述一段录音中提取部分录音数据,将上述部分录音数据转换为数字信号,即可得到源语音数据包;源语音数据包也可以是从测试设备中预先存储的语音数据中提取的,例如,可以在测试设备的非易失性存储器中预先存储多个语音数据(例如,一段歌曲、一段手机铃声等),当测试设备需要发送源语音数据包时,从上述多个语音数据中随机抽取一个语音数据,从随机抽取的一个语音数据中提取部分语音数据,将上述部分语音数据转换为数字信号,即可得到源语音数据包。The source voice data packet may be extracted from the voice data acquired by the recording device in the test device. For example, a test device obtains a piece of recording in real time through the recording device, and the test device extracts part of the recorded data from the previous recording. The part of the recorded data is converted into a digital signal to obtain a source voice data packet; the source voice data packet may also be extracted from the voice data pre-stored in the test device, for example, may be pre-arranged in the non-volatile memory of the test device. Storing a plurality of voice data (for example, a song, a ringtone, etc.), when the test device needs to send the source voice data packet, randomly extracting one voice data from the plurality of voice data, and extracting from a randomly selected voice data Part of the voice data, the partial voice data is converted into a digital signal, and the source voice data packet is obtained.
202,测试设备接收终端发送的第一加密语音数据包。202. The test device receives the first encrypted voice data packet sent by the terminal.
本发明实施例中,当终端利用语音加密算法对源语音数据包进行加密并得到第一加密语音数据包之后,终端将上述第一加密语音数据包发送至测试设备,测试设备接收终端发送的第一加密语音数据包。In the embodiment of the present invention, after the terminal encrypts the source voice data packet by using the voice encryption algorithm and obtains the first encrypted voice data packet, the terminal sends the first encrypted voice data packet to the test device, and the test device receives the first sent by the terminal. An encrypted voice packet.
203,测试设备利用与测试设备与终端预先协商的语音加密算法对源语音数据包进行加密,得到第二加密语音数据包。203. The test device encrypts the source voice data packet by using a voice encryption algorithm pre-negotiated with the test device and the terminal to obtain a second encrypted voice data packet.
本发明实施例中,当测试设备接收终端发送的第一加密语音数据包之后,测试设备利用测试设备与终端预先协商的语音加密算法对源语音数据包进行加密,得到第二加密语音数据包。测试设备利用语音加密算法对源语音数据包(二进制数据流)进行处理,得到第二加密语音数据包(经过语音加密算法处理之后的二进制数据流)。上述语音加密算法为测试设备与终端共同支持的算法,即测试设备和终端必须有共同支持的同一种语音加密算法。其中,语音加密算法为测试设备与终端预先协商的。In the embodiment of the present invention, after the test device receives the first encrypted voice data packet sent by the terminal, the test device encrypts the source voice data packet by using a voice encryption algorithm pre-negotiated by the test device and the terminal to obtain a second encrypted voice data packet. The test device processes the source voice data packet (binary data stream) using a voice encryption algorithm to obtain a second encrypted voice data packet (a binary data stream processed by the voice encryption algorithm). The above voice encryption algorithm is an algorithm supported by the test device and the terminal, that is, the same voice encryption algorithm that the test device and the terminal must support together. The voice encryption algorithm is pre-negotiated between the test device and the terminal.
204,测试设备验证第一加密语音数据包与第二加密语音数据包是否匹配。若是,执行步骤205,若否,执行步骤206。204. The test device verifies whether the first encrypted voice data packet matches the second encrypted voice data packet. If yes, go to step 205. If no, go to step 206.
本发明实施例中,当测试设备得到第一加密语音数据包与第二加密语音数据包之后,测试设备验证第一加密语音数据包与第二加密语音数据包是否匹配。其中,源语音数据包为二进制数据流,测试设备利用语音加密算法对源语音数据包(二进制数据流)进行处理,得到第二加密语音数据包(经过语音加密算法处理之后的二进制数据流)。测试设备验证第一加密语音数据包与第二加密语音数据包是否匹配,可以通过对比第一加密语音数据包(二进制数据流)与第二加密语音数据包(二进制数据流)中每个二进制数是否相同,当第一加密语音数据包(二进制数据流)与第二加密语音数据包(二进制数据流)中二进制数的相同比例达到预设阈值时,则判定第一加密语音数据包与第二加密语音数据包匹配,预设阈值可以为80%、85%、90%、95%等,由于数据包在终端和测试设备之间传输时,会出现丢包等情况,很多时候第一加密语音数据包与第二加密语音数据包不可能完全匹配,只需达到预设阈值即可认为通过语音加密测试。In the embodiment of the present invention, after the test device obtains the first encrypted voice data packet and the second encrypted voice data packet, the test device verifies whether the first encrypted voice data packet matches the second encrypted voice data packet. The source voice data packet is a binary data stream, and the test device processes the source voice data packet (binary data stream) by using a voice encryption algorithm to obtain a second encrypted voice data packet (a binary data stream processed by the voice encryption algorithm). The test device verifies whether the first encrypted voice data packet matches the second encrypted voice data packet, and can compare each binary number in the first encrypted voice data packet (binary data stream) and the second encrypted voice data packet (binary data stream) Is it the same, when the same ratio of the binary number in the first encrypted voice data packet (binary data stream) and the second encrypted voice data packet (binary data stream) reaches a preset threshold, then the first encrypted voice data packet is determined to be the second The encrypted voice data packet is matched, and the preset threshold may be 80%, 85%, 90%, 95%, etc., because the data packet is transmitted between the terminal and the test device, packet loss occurs, etc., and the first encrypted voice is often used. The data packet and the second encrypted voice data packet cannot be completely matched, and the voice encryption test can be considered as long as the preset threshold is reached.
205,测试设备确定终端通过语音加密测试。205. The test device determines that the terminal passes the voice encryption test.
206,测试设备确定终端没有通过语音加密测试。206. The test device determines that the terminal does not pass the voice encryption test.
本发明实施例中,测试设备发送源语音数据包给终端,终端和测试设备用协商的语音加密算法分别对源语音数据包进行加密,分别得到第一加密语音数据包和第二加密语音数据包,当测试设备验证第一加密语音数据包与第二加密语音数据包匹配时,则确定终端通过语音加密测试。实施图2所示的实施例,由测试设备提供源语音数据包进行测试,可以防止由于终端提供源语音数据包导致终端骗过测试设备,从而可以准确检测终端是否具备语音加密功能,提高测试结果的准确度。In the embodiment of the present invention, the test device sends the source voice data packet to the terminal, and the terminal and the test device respectively encrypt the source voice data packet by using a negotiated voice encryption algorithm to obtain the first encrypted voice data packet and the second encrypted voice data packet respectively. When the test device verifies that the first encrypted voice data packet matches the second encrypted voice data packet, it is determined that the terminal passes the voice encryption test. The implementation of the embodiment shown in FIG. 2, the test device provides the source voice data packet for testing, which can prevent the terminal from spoofing the test device due to the source voice data packet provided by the terminal, thereby accurately detecting whether the terminal has the voice encryption function and improving the test result. Accuracy.
请参阅图3,图3是本发明实施例公开的另一种语音加密的测试方法的流程示意图。如图3所示,本实施例中所描述的语音加密的测试方法,包括如下步骤。Please refer to FIG. 3. FIG. 3 is a schematic flowchart diagram of another method for testing voice encryption according to an embodiment of the present invention. As shown in FIG. 3, the test method for voice encryption described in this embodiment includes the following steps.
301,测试设备将源语音数据包发送至终端,源语音数据包用于终端利用语音加密算法对源语音数据包进行加密并得到第一加密语音数据包,语音加密算法为测试设备与终端预先协商的。301. The test device sends the source voice data packet to the terminal, where the source voice data packet is used by the terminal to encrypt the source voice data packet by using a voice encryption algorithm, and obtains the first encrypted voice data packet, where the voice encryption algorithm pre-negotiates the test device with the terminal. of.
302,测试设备接收终端发送的第一加密语音数据包。302. The test device receives the first encrypted voice data packet sent by the terminal.
303,测试设备利用与测试设备与终端预先协商的语音加密算法对源语音数据包进行加密,得到第二加密语音数据包。303. The test device encrypts the source voice data packet by using a voice encryption algorithm pre-negotiated with the test device and the terminal to obtain a second encrypted voice data packet.
304,测试设备验证第一加密语音数据包与第二加密语音数据包是否匹配。若是,则执行步骤305,若否,则结束本流程。304. The test device verifies whether the first encrypted voice data packet matches the second encrypted voice data packet. If yes, go to step 305. If no, end this process.
305,测试设备将源语音数据包发送至第三方测试设备,源语音数据包用于第三方测试设备利用语音加密算法对源语音数据包进行加密并得到第三加密语音数据包,语音加密算法为第三方测试设备、测试设备和终端预先协商的。305. The test device sends the source voice data packet to the third-party test device, and the source voice data packet is used by the third-party test device to encrypt the source voice data packet by using a voice encryption algorithm, and obtain a third encrypted voice data packet, where the voice encryption algorithm is Third-party test equipment, test equipment, and terminals are pre-negotiated.
本发明实施例中,当测试设备验证第一加密语音数据包与第二加密语音数据包匹配时,测试设备将源语音数据包发送至第三方测试设备,第三方测试设备可以是另一台测试设备,当第三方测试设备接收到源语音数据包之后,第三方测试设备利用语音加密算法对源语音数据包进行加密并得到第三加密语音数据包。其中,源语音数据包可以是从测试设备实时获取的音频中提取的,例如,测试设备通过录音设备实时获取的一段录音,测试设备在网络上下载的一段语音等,将上述一段录音、一段语音经过模数转换,转换为数字信号,即可得到源语音数据包;源语音数据包也可以是测试设备预先存储的,例如,可以在测试设备的非易失性存储器中预先存储多个语音数据(例如,一段歌曲、一段手机铃声等),当测试设备需要发送源语音数据包时,从上述多个语音数据中随机抽取一个语音数据,将上述一个语音数据经过模数转换,得到数字信号,即可以得到源语音数据包。In the embodiment of the present invention, when the test device verifies that the first encrypted voice data packet matches the second encrypted voice data packet, the test device sends the source voice data packet to the third-party test device, and the third-party test device may be another test. The device, after the third-party test device receives the source voice data packet, the third-party test device encrypts the source voice data packet by using a voice encryption algorithm and obtains a third encrypted voice data packet. The source voice data packet may be extracted from the audio acquired by the test device in real time. For example, a test device obtains a piece of sound recorded in real time through the recording device, and the test device downloads a piece of voice on the network, etc., and the above-mentioned one piece of recording and one piece of voice are recorded. The source voice data packet can be obtained by analog-to-digital conversion and converted into a digital signal; the source voice data packet can also be pre-stored by the test device, for example, a plurality of voice data can be pre-stored in the non-volatile memory of the test device. (for example, a song, a ringtone, etc.), when the test device needs to send the source voice data packet, randomly extract a voice data from the plurality of voice data, and perform the digital conversion by the analog-to-digital conversion of the voice data. That is, the source voice data packet can be obtained.
测试设备将源语音数据包发送至第三方测试设备之后,第三方测试设备利用语音加密算法对源语音数据包进行加密并得到第三加密语音数据包,其中,第三方测试设备利用语音加密算法对源语音数据包(二进制数据流)进行处理,得到第三加密语音数据包(经过语音加密算法处理之后的二进制数据流)。上述语音加密算法为第三方测试设备、测试设备和终端共同支持的算法,即第三方测试设备、测试设备和终端三者必须有共同支持的同一种语音加密算法。其中,语音加密算法为第三方测试设备、测试设备和终端预先协商的。After the test device sends the source voice data packet to the third-party test device, the third-party test device encrypts the source voice data packet by using a voice encryption algorithm and obtains a third encrypted voice data packet, where the third-party test device utilizes a voice encryption algorithm pair. The source voice data packet (binary data stream) is processed to obtain a third encrypted voice data packet (a binary data stream processed by the voice encryption algorithm). The above-mentioned voice encryption algorithm is an algorithm supported by a third-party test device, a test device, and a terminal, that is, a third-party test device, a test device, and a terminal must have the same voice encryption algorithm supported by the same. The voice encryption algorithm is pre-negotiated by the third-party test equipment, the test equipment, and the terminal.
306,测试设备接收第三方测试设备发送的第三加密语音数据包。306. The test device receives a third encrypted voice data packet sent by the third-party test device.
307,测试设备判断第三加密语音数据包与第一加密语音数据包或第二加密语音数据包是否匹配;若是,则执行步骤307,若否,则执行步骤308。307. The testing device determines whether the third encrypted voice data packet matches the first encrypted voice data packet or the second encrypted voice data packet. If yes, step 307 is performed, and if no, step 308 is performed.
本发明实施例中,当测试设备得到第三加密语音数据包之后,测试设备判断第三加密语音数据包与第一加密语音数据包或第二加密语音数据包是否匹配。其中,源语音数据包为二进制数据流,测试设备利用语音加密算法对源语音数据包(二进制数据流)进行处理,得到第二加密语音数据包(经过语音加密算法处理之后的二进制数据流)。测试设备判断第三加密语音数据包与第一加密语音数据包或第二加密语音数据包是否匹配,可以通过对比第三加密语音数据包(二进制数据流)与第一加密语音数据包(二进制数据流)或第二加密语音数据包(二进制数据流)中每个二进制数是否相同,当第三加密语音数据包(二进制数据流)与第一加密语音数据包(二进制数据流)中二进制数的相同比例达到预设阈值,或者第三加密语音数据包(二进制数据流)与第二加密语音数据包(二进制数据流)中二进制数的相同比例达到预设阈值时,则判定第一加密语音数据包与第二加密语音数据包匹配,预设阈值可以为80%、85%、90%、95%等,由于数据包在终端和测试设备,测试设备与第三方测试设备之间传输时,会出现丢包等情况,很多时候第三加密语音数据包与第一加密语音数据包或第二加密语音数据包不可能完全匹配,只需达到预设阈值即可认为通过语音加密测试。实施本发明实施例,通过引进第三方测试设备,可以通过两个测试设备进行测试,当两个测试设备都通过测试时,才判定终端通过语音加密测试,可以进一步提高测试结果的准确性,从而可以更加准确检测终端是否具备语音加密功能。In the embodiment of the present invention, after the test device obtains the third encrypted voice data packet, the test device determines whether the third encrypted voice data packet matches the first encrypted voice data packet or the second encrypted voice data packet. The source voice data packet is a binary data stream, and the test device processes the source voice data packet (binary data stream) by using a voice encryption algorithm to obtain a second encrypted voice data packet (a binary data stream processed by the voice encryption algorithm). The test device determines whether the third encrypted voice data packet matches the first encrypted voice data packet or the second encrypted voice data packet, and can compare the third encrypted voice data packet (binary data stream) with the first encrypted voice data packet (binary data) Whether each binary number in the stream or the second encrypted voice data packet (binary data stream) is the same, when the third encrypted voice data packet (binary data stream) and the first encrypted voice data packet (binary data stream) have a binary number When the same ratio reaches a preset threshold, or the same ratio of the binary number in the third encrypted voice data packet (binary data stream) and the second encrypted voice data packet (binary data stream) reaches a preset threshold, the first encrypted voice data is determined. The packet matches the second encrypted voice data packet, and the preset threshold may be 80%, 85%, 90%, 95%, etc., since the data packet is transmitted between the terminal and the test device, the test device and the third-party test device, In the case of packet loss, etc., the third encrypted voice data packet and the first encrypted voice data packet or the second encrypted voice data are often used. Not completely match, only reaches a preset threshold can be considered by voice encryption tests. By implementing the third embodiment of the test device, the test can be performed by two test devices. When both test devices pass the test, it is determined that the terminal passes the voice encryption test, which can further improve the accuracy of the test result. It can detect more accurately whether the terminal has voice encryption.
308,测试设备确定终端通过语音加密测试。308. The test device determines that the terminal passes the voice encryption test.
309,测试设备确定终端没有通过语音加密测试。309. The test device determines that the terminal does not pass the voice encryption test.
图3所示的步骤301至步骤304可以参见图2所示的步骤201至步骤204,图3所示的步骤308至步骤309可以参见图2所示的步骤205至步骤206,本发明实施例不再赘述。Steps 301 to 304 shown in FIG. 3 may refer to step 201 to step 204 shown in FIG. 2, and steps 308 to 309 shown in FIG. 3 may refer to step 205 to step 206 shown in FIG. 2, which are embodiments of the present invention. No longer.
实施图3所示的实施例,通过引进第三方测试设备,可以通过两个测试设备进行测试,当两个测试设备都通过测试时,才判定终端通过语音加密测试,可以进一步提高测试结果的准确性,从而可以更加准确检测终端是否具备语音加密功能。By implementing the embodiment shown in FIG. 3, by introducing a third-party test device, the test can be performed by two test devices. When both test devices pass the test, it is determined that the terminal passes the voice encryption test, which can further improve the accuracy of the test result. Sex, so that it can more accurately detect whether the terminal has voice encryption.
请参阅图4,图4是本发明实施例公开的另一种语音加密的测试方法的流程示意图。如图4所示,本实施例中所描述的语音加密的测试方法,包括如下步骤。Please refer to FIG. 4. FIG. 4 is a schematic flowchart diagram of another method for testing voice encryption according to an embodiment of the present invention. As shown in FIG. 4, the test method for voice encryption described in this embodiment includes the following steps.
401,测试设备与终端协商语音加密算法。若协商成功,则执行步骤402,若协商不成功,则结束本流程。401. The test device negotiates a voice encryption algorithm with the terminal. If the negotiation is successful, step 402 is performed. If the negotiation is unsuccessful, the process ends.
本发明实施例中,测试设备将源语音数据包发送至终端之前,测试设备与终端协商语音加密算法,即在确定一个测试设备与终端均支持的加密算法,以测试设备与终端均支持的加密算法进行语音加密测试。本发明实施例中,In the embodiment of the present invention, before the test device sends the source voice data packet to the terminal, the test device negotiates a voice encryption algorithm with the terminal, that is, determines an encryption algorithm supported by both the test device and the terminal, to test the encryption supported by both the device and the terminal. The algorithm performs a voice encryption test. In the embodiment of the present invention,
可选的,步骤401可以包括如下步骤:Optionally, step 401 can include the following steps:
(11)测试设备确定测试设备支持的语音加密算法与终端支持的语音加密算法是否相同;(11) The test device determines whether the voice encryption algorithm supported by the test device is the same as the voice encryption algorithm supported by the terminal;
(12)若是,测试设备将测试设备与终端共同支持的语音加密算法作为测试设备与终端预先协商的语音加密算法。(12) If yes, the test device uses the voice encryption algorithm supported by the test device and the terminal as a voice encryption algorithm pre-negotiated by the test device and the terminal.
本发明实施例中,测试设备与终端都可以支持一些语音加密算法,例如,测试设备支持四种语音加密算法A、B、C、D,终端仅支持语音加密算法A,则测试设备与终端协商的语音加密算法为A;又例如,测试设备支持四种语音加密算法A、B、C、D,终端仅支持语音加密算法A和B,则测试设备与终端协商的语音加密算法为A和B,则测试设备与终端分别利用语音加密算法为A和语音加密算法为B进行语音加密测试。In the embodiment of the present invention, both the test device and the terminal can support some voice encryption algorithms. For example, the test device supports four voice encryption algorithms A, B, C, and D. The terminal only supports the voice encryption algorithm A, and the test device negotiates with the terminal. The voice encryption algorithm is A; for example, the test device supports four voice encryption algorithms A, B, C, and D. The terminal only supports the voice encryption algorithms A and B, and the voice encryption algorithms negotiated between the test device and the terminal are A and B. Then, the test device and the terminal respectively use the voice encryption algorithm for A and the voice encryption algorithm to perform voice encryption test for B.
可选的,执行步骤402之前,还可以执行如下步骤:Optionally, before performing step 402, the following steps may also be performed:
测试设备与终端协商密钥;若协商成功,执行步骤402。The test device negotiates the key with the terminal; if the negotiation is successful, step 402 is performed.
其中,密钥用于终端利用密钥对第一加密语音数据包进行加密,得到第一密钥加密语音数据包;密钥用于测试设备利用密钥对第一密钥加密语音数据包进行解密,得到第一加密语音数据包。The key is used by the terminal to encrypt the first encrypted voice data packet by using the key to obtain the first key encrypted voice data packet; the key is used by the test device to decrypt the first key encrypted voice data packet by using the key. , obtaining the first encrypted voice data packet.
为了防止第一加密语音数据包在终端与测试设备之间传输的安全性,测试设备与终端预先协商密钥,终端利用上述密钥对第一加密语音数据包进行加密,得到第一密钥加密语音数据包,测试设备接收到第一密钥加密语音数据包之后,测试设备利用密钥对第一密钥加密语音数据包进行解密,得到第一加密语音数据包。实施本发明实施例,可以通过协商密钥加密的方法,提高语音加密的安全性。In order to prevent the security of the first encrypted voice data packet from being transmitted between the terminal and the test device, the test device and the terminal pre-negotiate the key, and the terminal encrypts the first encrypted voice data packet by using the above-mentioned key to obtain the first key encryption. The voice data packet, after the test device receives the first key encrypted voice data packet, the test device decrypts the first key encrypted voice data packet by using the key to obtain the first encrypted voice data packet. The embodiment of the present invention can improve the security of voice encryption by negotiating a key encryption method.
402,测试设备将源语音数据包发送至终端,源语音数据包用于终端利用语音加密算法对源语音数据包进行加密并得到第一加密语音数据包,语音加密算法为测试设备与终端预先协商的。402. The test device sends the source voice data packet to the terminal, where the source voice data packet is used by the terminal to encrypt the source voice data packet by using a voice encryption algorithm, and obtains the first encrypted voice data packet, where the voice encryption algorithm pre-negotiates the test device with the terminal. of.
403,测试设备接收终端发送的第一加密语音数据包。403. The test device receives the first encrypted voice data packet sent by the terminal.
404,测试设备利用与测试设备与终端预先协商的语音加密算法对源语音数据包进行加密,得到第二加密语音数据包。404. The test device encrypts the source voice data packet by using a voice encryption algorithm pre-negotiated with the test device and the terminal to obtain a second encrypted voice data packet.
405,测试设备验证第一加密语音数据包与第二加密语音数据包是否匹配。若是,则执行步骤406,若否,则结束本流程。405. The test device verifies whether the first encrypted voice data packet matches the second encrypted voice data packet. If yes, go to step 406. If no, end the process.
406,测试设备将源语音数据包发送至第三方测试设备,源语音数据包用于第三方测试设备利用语音加密算法对源语音数据包进行加密并得到第三加密语音数据包,语音加密算法为第三方测试设备、测试设备和终端预先协商的。406. The test device sends the source voice data packet to the third-party test device, and the source voice data packet is used by the third-party test device to encrypt the source voice data packet by using a voice encryption algorithm, and obtain a third encrypted voice data packet, where the voice encryption algorithm is Third-party test equipment, test equipment, and terminals are pre-negotiated.
407,测试设备接收第三方测试设备发送的第三加密语音数据包。407. The test device receives a third encrypted voice data packet sent by the third-party test device.
408,测试设备判断第三加密语音数据包与第一加密语音数据包或第二加密语音数据包是否匹配;若是,则执行步骤409,若否,则执行步骤410。408. The test device determines whether the third encrypted voice data packet matches the first encrypted voice data packet or the second encrypted voice data packet. If yes, step 409 is performed, and if no, step 410 is performed.
409,测试设备确定终端通过语音加密测试。409. The test device determines that the terminal passes the voice encryption test.
410,测试设备确定终端没有通过语音加密测试。410. The test device determines that the terminal does not pass the voice encryption test.
图4所示的步骤402至步骤410可以参见图3所示的步骤301至步骤309,本发明实施例不再赘述。For the steps 402 to 410 shown in FIG. 4, reference may be made to the steps 301 to 309 shown in FIG.
实施图4所示的实施例,可以预先协商语音加密算法和密钥,可以通过协商的语音加密算法和密钥对语音数据进行加密,准确检测终端是否具备语音加密功能,提高测试结果的准确度。The implementation of the embodiment shown in FIG. 4 can pre-negotiate the voice encryption algorithm and the key, and can encrypt the voice data through the negotiated voice encryption algorithm and the key, accurately detect whether the terminal has the voice encryption function, and improve the accuracy of the test result. .
请参阅图5,图5是本发明实施例公开的一种测试设备的结构示意图。如图5所示,本实施例中所描述的测试设备,包括第一发送单元501、第一接收单元502、加密单元503、验证单元504和确定单元505,其中:Please refer to FIG. 5. FIG. 5 is a schematic structural diagram of a test device according to an embodiment of the present invention. As shown in FIG. 5, the test device described in this embodiment includes a first sending unit 501, a first receiving unit 502, an encrypting unit 503, a verifying unit 504, and a determining unit 505, where:
第一发送单元501,设置为将源语音数据包发送至终端,源语音数据包用于终端利用语音加密算法对源语音数据包进行加密并得到第一加密语音数据包,语音加密算法为测试设备与终端预先协商的。The first sending unit 501 is configured to send the source voice data packet to the terminal, and the source voice data packet is used by the terminal to encrypt the source voice data packet by using a voice encryption algorithm to obtain a first encrypted voice data packet, and the voice encryption algorithm is a test device. Pre-negotiated with the terminal.
第一接收单元502,设置为接收终端发送的第一加密语音数据包。The first receiving unit 502 is configured to receive the first encrypted voice data packet sent by the terminal.
加密单元503,设置为利用与测试设备与终端预先协商的语音加密算法对源语音数据包进行加密,得到第二加密语音数据包。The encryption unit 503 is configured to encrypt the source voice data packet by using a voice encryption algorithm pre-negotiated with the test device and the terminal to obtain a second encrypted voice data packet.
验证单元504,设置为验证第一加密语音数据包与第二加密语音数据包是否匹配。The verification unit 504 is configured to verify whether the first encrypted voice data packet matches the second encrypted voice data packet.
确定单元505,设置为当验证单元504验证结果为是时,确定终端通过语音加密测试。The determining unit 505 is configured to determine that the terminal passes the voice encryption test when the verification unit 504 verifies that the result is YES.
可选的,请参阅图6,图6是本发明实施例公开的另一种测试设备的结构示意图,如图6所示,所述测试设备还包括获取单元506,其中:Optionally, please refer to FIG. 6. FIG. 6 is a schematic structural diagram of another testing device according to an embodiment of the present invention. As shown in FIG. 6, the testing device further includes an acquiring unit 506, where:
获取单元506,设置为在第一发送单元501将源语音数据包发送至终端之前,获取源语音数据包,源语音数据包是从测试设备中的录音设备获取的语音数据中提取的,或者源语音数据包是从测试设备中预先存储的语音数据中提取的。The obtaining unit 506 is configured to: before the first sending unit 501 sends the source voice data packet to the terminal, acquire the source voice data packet, where the source voice data packet is extracted from the voice data acquired by the recording device in the testing device, or the source The voice data packet is extracted from the voice data pre-stored in the test device.
请参阅图7,图7是本发明实施例公开的另一种测试设备的结构示意图。如图7所示,图7除了包括图5所示的第一发送单元501、第一接收单元502、加密单元503、验证单元504和确定单元505之外,还包括第二发送单元507、第二接收单元508、判断单元509,其中:Please refer to FIG. 7. FIG. 7 is a schematic structural diagram of another testing device according to an embodiment of the present invention. As shown in FIG. 7, FIG. 7 includes a second transmitting unit 507, a second transmitting unit 501, a first receiving unit 502, an encrypting unit 503, a verifying unit 504, and a determining unit 505, as shown in FIG. The receiving unit 508 and the determining unit 509, wherein:
第二发送单元507,设置为当第一加密语音数据包与第二加密语音数据包匹配时,则将源语音数据包发送至第三方测试设备,源语音数据包用于第三方测试设备利用语音加密算法对源语音数据包进行加密并得到第三加密语音数据包,语音加密算法为第三方测试设备、测试设备和终端预先协商的。The second sending unit 507 is configured to: when the first encrypted voice data packet matches the second encrypted voice data packet, send the source voice data packet to the third party testing device, and the source voice data packet is used by the third party testing device to use the voice The encryption algorithm encrypts the source voice data packet and obtains a third encrypted voice data packet, and the voice encryption algorithm is pre-negotiated for the third-party test equipment, the test equipment, and the terminal.
第二接收单元508,设置为接收第三方测试设备发送的第三加密语音数据包。The second receiving unit 508 is configured to receive a third encrypted voice data packet sent by the third-party testing device.
判断单元509,设置为判断第三加密语音数据包与第一加密语音数据包或第二加密语音数据包是否匹配。The determining unit 509 is configured to determine whether the third encrypted voice data packet matches the first encrypted voice data packet or the second encrypted voice data packet.
确定单元505,还设置为当判断单元509判断结果为是时,确定终端通过语音加密测试。The determining unit 505 is further configured to determine that the terminal passes the voice encryption test when the determination unit 509 determines that the result is YES.
请参阅图8,图8是本发明实施例公开的另一种测试设备的结构示意图。如图8所示,图8除了包括图7所示的第一发送单元501、第一接收单元502、加密单元503、验证单元504、确定单元505、第二发送单元507、第二接收单元508、判断单元509之外,还包括协商单元510,其中:Please refer to FIG. 8. FIG. 8 is a schematic structural diagram of another testing device according to an embodiment of the present invention. As shown in FIG. 8, FIG. 8 includes, in addition to the first transmitting unit 501, the first receiving unit 502, the encrypting unit 503, the verifying unit 504, the determining unit 505, the second transmitting unit 507, and the second receiving unit 508 shown in FIG. In addition to the determining unit 509, the negotiating unit 510 is further included, wherein:
协商单元510,设置为与终端协商语音加密算法。The negotiating unit 510 is arranged to negotiate a speech encryption algorithm with the terminal.
第一发送单元501,还设置为当协商单元510与终端协商语音加密算法成功之后,将源语音数据包发送至终端。The first sending unit 501 is further configured to send the source voice data packet to the terminal after the negotiation unit 510 successfully negotiates the voice encryption algorithm with the terminal.
可选的,如图9所示,图9是本发明实施例公开的另一种测试设备的结构示意图,图9是在图8的基础上进一步优化得到的,图9中的协商单元510包括第一确定子单元5101和第二确定子单元5102,其中:Optionally, as shown in FIG. 9 , FIG. 9 is a schematic structural diagram of another testing apparatus according to an embodiment of the present disclosure, and FIG. 9 is further optimized based on FIG. 8 , where the negotiating unit 510 in FIG. 9 includes a first determining subunit 5101 and a second determining subunit 5102, wherein:
第一确定子单元5101,设置为确定测试设备支持的语音加密算法与终端支持的语音加密算法是否相同;The first determining subunit 5101 is configured to determine whether the voice encryption algorithm supported by the test device is the same as the voice encryption algorithm supported by the terminal;
第二确定子单元5102,设置为当第一确定子单元5101确定测试设备支持的语音加密算法与终端支持的语音加密是否相同时,将测试设备与终端共同支持的语音加密算法作为测试设备与终端预先协商的语音加密算法。The second determining subunit 5102 is configured to: when the first determining subunit 5101 determines whether the voice encryption algorithm supported by the testing device is the same as the voice encryption supported by the terminal, the voice encryption algorithm supported by the testing device and the terminal is used as the testing device and the terminal. Pre-negotiated speech encryption algorithm.
可选的,如图10所示,图10是本发明实施例公开的另一种测试设备的结构示意图,图10是在图5的基础上进一步优化得到的,图10除了包括图5所示的第一发送单元501、第一接收单元502、加密单元503、验证单元504和确定单元505之外,还包括密钥协商单元511,其中:Optionally, as shown in FIG. 10, FIG. 10 is a schematic structural diagram of another testing apparatus according to an embodiment of the present invention, and FIG. 10 is further optimized based on FIG. 5, and FIG. 10 includes FIG. In addition to the first transmitting unit 501, the first receiving unit 502, the encrypting unit 503, the verifying unit 504, and the determining unit 505, a key negotiating unit 511 is further included, wherein:
密钥协商单元511,设置为与终端协商密钥。The key agreement unit 511 is arranged to negotiate a key with the terminal.
第一发送单元501,还设置为当密钥协商单元511设置为与终端协商密钥成功之后,将源语音数据包发送至终端;其中,密钥用于终端利用密钥对第一加密语音数据包进行加密,得到第一密钥加密语音数据包;密钥用于测试设备利用密钥对第一密钥加密语音数据包进行解密,得到第一加密语音数据包。The first sending unit 501 is further configured to: after the key negotiation unit 511 is configured to negotiate the key successfully with the terminal, send the source voice data packet to the terminal; wherein the key is used by the terminal to use the key pair to the first encrypted voice data. The packet is encrypted to obtain a first key encrypted voice data packet; the key is used by the test device to decrypt the first key encrypted voice data packet by using the key to obtain a first encrypted voice data packet.
实施图5至图10所示的测试设备,由测试设备提供源语音数据包进行测试,可以防止由于终端提供源语音数据包导致终端骗过测试设备,从而可以准确检测终端是否具备语音加密功能,提高测试结果的准确度。The testing device shown in FIG. 5 to FIG. 10 is implemented, and the test device provides the source voice data packet for testing, which can prevent the terminal from fooling the test device due to the source voice data packet provided by the terminal, thereby accurately detecting whether the terminal has the voice encryption function. Improve the accuracy of test results.
请参阅图11,图11是本发明实施例提供的又一种测试设备的结构示意图,本实施例中所描述的测试设备包括:网络接口1000;至少一个处理器2000,例如CPU;和存储器3000,上述网络接口1000、处理器2000和存储器3000通过总线4000连接。Referring to FIG. 11, FIG. 11 is a schematic structural diagram of still another testing device according to an embodiment of the present invention. The testing device described in this embodiment includes: a network interface 1000; at least one processor 2000, such as a CPU; and a memory 3000. The network interface 1000, the processor 2000, and the memory 3000 are connected by a bus 4000.
其中,上述网络接口1000具体可为AUI接口,BNC接口,Console接口等,用于接收和发送语音数据包。The network interface 1000 may be an AUI interface, a BNC interface, a console interface, etc., for receiving and transmitting voice data packets.
上述存储器3000可以是高速RAM存储器,也可为非不稳定的存储器(non-volatile memory),例如磁盘存储器,还可以为非易失性存储器。上述存储器3000用于存储一组程序代码,上述处理器2000用于调用存储器3000中存储的程序代码,执行如下操作:The above memory 3000 may be a high speed RAM memory, or may be a non-volatile memory such as a disk memory or a nonvolatile memory. The above memory 3000 is used to store a set of program codes, and the processor 2000 is used to call the program code stored in the memory 3000 to perform the following operations:
将源语音数据包发送至终端,源语音数据包用于终端利用语音加密算法对源语音数据包进行加密并得到第一加密语音数据包,语音加密算法为测试设备与终端预先协商的;The source voice data packet is sent to the terminal, and the source voice data packet is used by the terminal to encrypt the source voice data packet by using the voice encryption algorithm to obtain the first encrypted voice data packet, and the voice encryption algorithm is pre-negotiated by the test device and the terminal;
接收终端发送的第一加密语音数据包;Receiving a first encrypted voice data packet sent by the terminal;
利用与测试设备与终端预先协商的语音加密算法对源语音数据包进行加密,得到第二加密语音数据包;Encrypting the source voice data packet by using a voice encryption algorithm pre-negotiated with the test device and the terminal to obtain a second encrypted voice data packet;
验证第一加密语音数据包与第二加密语音数据包是否匹配;Verifying whether the first encrypted voice data packet matches the second encrypted voice data packet;
若是,则确定终端通过语音加密测试。If so, it is determined that the terminal passes the voice encryption test.
具体实现中,本发明实施例中所描述的处理器2000可执行本发明实施例提供的图2至图4所示的语音加密的测试方法所描述的实现方式,也可执行本发明实施例提供的图5至图10所描述的测试设备的实现方式,在此不再赘述。In a specific implementation, the processor 2000 described in the embodiment of the present invention may implement the implementation manner described in the method for testing the voice encryption shown in FIG. 2 to FIG. The implementation of the test device described in FIG. 5 to FIG. 10 is not described herein again.
本发明所有实施例中的模块或子模块,可以通过通用集成电路,例如CPU(Central Processing Unit,中央处理器),或通过ASIC (Application Specific Integrated Circuit,专用集成电路)来实现。The modules or sub-modules in all embodiments of the present invention may be implemented by a general-purpose integrated circuit, such as a CPU (Central Processing Unit), or by an ASIC (Application Specific Integrated Circuit).
本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。The steps in the method of the embodiment of the present invention may be sequentially adjusted, merged, and deleted according to actual needs.
本发明实施例装置中的单元可以根据实际需要进行合并、划分和删减。The units in the apparatus of the embodiment of the present invention may be combined, divided, and deleted according to actual needs.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。One of ordinary skill in the art can understand that all or part of the process of implementing the foregoing embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。The above is only the preferred embodiment of the present invention, and the scope of the present invention is not limited thereto, and thus equivalent changes made in the claims of the present invention are still within the scope of the present invention.

Claims (10)

  1. 一种语音加密的测试方法,其特征在于,包括:A method for testing voice encryption, comprising:
    将源语音数据包发送至终端,所述源语音数据包用于所述终端利用语音加密算法对所述源语音数据包进行加密并得到第一加密语音数据包,所述语音加密算法为测试设备与所述终端预先协商的;Transmitting the source voice data packet to the terminal, where the source voice data packet is used by the terminal to encrypt the source voice data packet by using a voice encryption algorithm, and obtain a first encrypted voice data packet, where the voice encryption algorithm is a test device Pre-negotiated with the terminal;
    接收所述终端发送的所述第一加密语音数据包;Receiving the first encrypted voice data packet sent by the terminal;
    利用与所述测试设备与所述终端预先协商的语音加密算法对所述源语音数据包进行加密,得到第二加密语音数据包;Encrypting the source voice data packet by using a voice encryption algorithm pre-negotiated with the test device and the terminal to obtain a second encrypted voice data packet;
    验证所述第一加密语音数据包与所述第二加密语音数据包是否匹配;Verifying whether the first encrypted voice data packet matches the second encrypted voice data packet;
    若是,则确定所述终端通过语音加密测试。If so, it is determined that the terminal passes the voice encryption test.
  2. 根据权利要求1所述的方法,其特征在于,所述验证所述第一加密语音数据包与所述第二加密语音数据包是否匹配之后,所述方法还包括:The method according to claim 1, wherein after the verifying whether the first encrypted voice data packet matches the second encrypted voice data packet, the method further comprises:
    若所述第一加密语音数据包与所述第二加密语音数据包匹配,则将所述源语音数据包发送至第三方测试设备,所述源语音数据包用于所述第三方测试设备利用所述语音加密算法对所述源语音数据包进行加密并得到第三加密语音数据包,所述语音加密算法为所述第三方测试设备、所述测试设备和所述终端预先协商的;And if the first encrypted voice data packet matches the second encrypted voice data packet, sending the source voice data packet to a third-party testing device, where the source voice data packet is used by the third-party testing device The voice encryption algorithm encrypts the source voice data packet and obtains a third encrypted voice data packet, where the voice encryption algorithm is pre-negotiated by the third-party testing device, the testing device, and the terminal;
    接收所述第三方测试设备发送的所述第三加密语音数据包;Receiving the third encrypted voice data packet sent by the third-party testing device;
    判断所述第三加密语音数据包与所述第一加密语音数据包或所述第二加密语音数据包是否匹配;Determining whether the third encrypted voice data packet matches the first encrypted voice data packet or the second encrypted voice data packet;
    若是,则执行所述确定所述终端通过语音加密测试的步骤。If yes, performing the step of determining that the terminal passes the voice encryption test.
  3. 根据权利要求2所述的方法,其特征在于,所述将源语音数据包发送至终端之前,所述方法还包括:The method according to claim 2, wherein before the sending the source voice data packet to the terminal, the method further comprises:
    与所述终端协商语音加密算法;Negotiating a voice encryption algorithm with the terminal;
    若协商成功,则执行所述将源语音数据包发送至终端的步骤。If the negotiation is successful, the step of transmitting the source voice data packet to the terminal is performed.
  4. 根据权利要求3所述的方法,其特征在于,所述与所述终端协商语音加密算法,包括:The method according to claim 3, wherein the negotiating a speech encryption algorithm with the terminal comprises:
    确定测试设备支持的语音加密算法与所述终端支持的语音加密算法是否相同;Determining whether the voice encryption algorithm supported by the test device is the same as the voice encryption algorithm supported by the terminal;
    若是,则将所述测试设备与所述终端共同支持的语音加密算法作为所述测试设备与所述终端预先协商的语音加密算法。If yes, the voice encryption algorithm supported by the test device and the terminal is used as a voice encryption algorithm pre-negotiated by the test device and the terminal.
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述将源语音数据包发送至终端之前,所述方法还包括:The method according to any one of claims 1 to 4, wherein before the sending the source voice data packet to the terminal, the method further comprises:
    获取源语音数据包,所述源语音数据包是从测试设备中的录音设备获取的语音数据中提取的,或者所述源语音数据包是从所述测试设备中预先存储的语音数据中提取的。Acquiring a source voice data packet, the source voice data packet is extracted from voice data acquired by a recording device in the test device, or the source voice data packet is extracted from voice data pre-stored in the test device .
  6. 一种测试设备,其特征在于,包括:A testing device, comprising:
    第一发送单元,设置为将源语音数据包发送至终端,所述源语音数据包用于所述终端利用语音加密算法对所述源语音数据包进行加密并得到第一加密语音数据包,所述语音加密算法为测试设备与所述终端预先协商的;a first sending unit, configured to send a source voice data packet to the terminal, where the source voice data packet is used by the terminal to encrypt the source voice data packet by using a voice encryption algorithm, and obtain a first encrypted voice data packet, where The speech encryption algorithm is pre-negotiated by the test device with the terminal;
    第一接收单元,设置为接收所述终端发送的所述第一加密语音数据包;a first receiving unit, configured to receive the first encrypted voice data packet sent by the terminal;
    加密单元,设置为利用与所述测试设备与所述终端预先协商的语音加密算法对所述源语音数据包进行加密,得到第二加密语音数据包;The encryption unit is configured to encrypt the source voice data packet by using a voice encryption algorithm pre-negotiated with the test device and the terminal to obtain a second encrypted voice data packet;
    验证单元,设置为验证所述第一加密语音数据包与所述第二加密语音数据包是否匹配;a verification unit, configured to verify whether the first encrypted voice data packet matches the second encrypted voice data packet;
    确定单元,设置为当所述验证单元验证结果为是时,确定所述终端通过语音加密测试。The determining unit is configured to determine that the terminal passes the voice encryption test when the verification unit verifies that the result is yes.
  7. 根据权利要求6所述的测试设备,其特征在于,所述测试设备还包括:The test device according to claim 6, wherein the test device further comprises:
    第二发送单元,设置为当所述第一加密语音数据包与所述第二加密语音数据包匹配时,则将所述源语音数据包发送至第三方测试设备,所述源语音数据包用于所述第三方测试设备利用所述语音加密算法对所述源语音数据包进行加密并得到第三加密语音数据包,所述语音加密算法为所述第三方测试设备、所述测试设备和所述终端预先协商的;a second sending unit, configured to: when the first encrypted voice data packet matches the second encrypted voice data packet, send the source voice data packet to a third-party testing device, where the source voice data packet is used The third-party test device encrypts the source voice data packet by using the voice encryption algorithm, and obtains a third encrypted voice data packet, where the voice encryption algorithm is the third-party test device, the test device, and the Said terminal pre-negotiated;
    第二接收单元,设置为接收所述第三方测试设备发送的所述第三加密语音数据包;a second receiving unit, configured to receive the third encrypted voice data packet sent by the third-party testing device;
    判断单元,设置为判断所述第三加密语音数据包与所述第一加密语音数据包或所述第二加密语音数据包是否匹配;a determining unit, configured to determine whether the third encrypted voice data packet matches the first encrypted voice data packet or the second encrypted voice data packet;
    所述确定单元,还设置为当所述判断单元判断结果为是时,确定所述终端通过语音加密测试。The determining unit is further configured to: when the determining unit determines that the result is yes, determine that the terminal passes the voice encryption test.
  8. 根据权利要求7所述的测试设备,其特征在于,所述测试设备还包括:The testing device according to claim 7, wherein the testing device further comprises:
    协商单元,设置为与所述终端协商语音加密算法;a negotiating unit, configured to negotiate a voice encryption algorithm with the terminal;
    所述第一发送单元,还设置为当所述协商单元与所述终端协商语音加密算法成功之后,将源语音数据包发送至所述终端。The first sending unit is further configured to send the source voice data packet to the terminal after the negotiation unit successfully negotiates the voice encryption algorithm with the terminal.
  9. 根据权利要求8所述的测试设备,其特征在于,所述协商单元包括:The testing device according to claim 8, wherein the negotiating unit comprises:
    第一确定子单元,设置为确定测试设备支持的语音加密算法与所述终端支持的语音加密算法是否相同;a first determining subunit, configured to determine whether a voice encryption algorithm supported by the test device is the same as a voice encryption algorithm supported by the terminal;
    第二确定子单元,设置为当所述第一确定子单元确定所述测试设备支持的语音加密算法与所述终端支持的语音加密是否相同时,将所述测试设备与所述终端共同支持的语音加密算法作为所述测试设备与所述终端预先协商的语音加密算法。a second determining subunit, configured to: when the first determining subunit determines whether the voice encryption algorithm supported by the testing device is the same as the voice encryption supported by the terminal, the testing device and the terminal jointly support The voice encryption algorithm is used as a voice encryption algorithm pre-negotiated by the test device with the terminal.
  10. 根据权利要求6至9任一项所述的测试设备,其特征在于,所述测试设备还包括:The testing device according to any one of claims 6 to 9, wherein the testing device further comprises:
    获取单元,设置为在所述第一发送单元将源语音数据包发送至终端之前,获取源语音数据包,所述源语音数据包是从测试设备中的录音设备获取的语音数据中提取的,或者所述源语音数据包是从所述测试设备中预先存储的语音数据中提取的。An acquiring unit, configured to acquire a source voice data packet, where the source voice data packet is extracted from voice data acquired by a recording device in a test device, before the first sending unit sends the source voice data packet to the terminal, Or the source voice data packet is extracted from voice data pre-stored in the test device.
PCT/CN2016/100635 2016-06-30 2016-09-28 Voice encryption testing method and testing device WO2018000640A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610505815.4 2016-06-30
CN201610505815.4A CN106209344A (en) 2016-06-30 2016-06-30 The method of testing of a kind of voice encryption and test equipment

Publications (1)

Publication Number Publication Date
WO2018000640A1 true WO2018000640A1 (en) 2018-01-04

Family

ID=57463844

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/100635 WO2018000640A1 (en) 2016-06-30 2016-09-28 Voice encryption testing method and testing device

Country Status (2)

Country Link
CN (1) CN106209344A (en)
WO (1) WO2018000640A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107465503A (en) * 2017-07-21 2017-12-12 山东华芯半导体有限公司 A kind of method of the safe storage chip cryptographic algorithm correctness of fast verification
CN107819650B (en) * 2017-11-28 2020-03-17 中共中央办公厅电子科技学院 Data security test method and device
CN109257371A (en) * 2018-10-30 2019-01-22 王根平 Negotiate safeguards system and dynamic negotiation method
CN110187202B (en) * 2019-05-05 2022-09-02 珠海格力电器股份有限公司 Method, device and system for testing power-on password of electrical equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070038868A1 (en) * 2005-08-15 2007-02-15 Top Digital Co., Ltd. Voiceprint-lock system for electronic data
US20140233728A1 (en) * 2012-11-16 2014-08-21 Raytheon Bbn Technologies Corp. Method for secure symbol comparison
CN104794052A (en) * 2015-04-01 2015-07-22 努比亚技术有限公司 Encryption display testing method and device
CN104883679A (en) * 2015-04-09 2015-09-02 努比亚技术有限公司 Voice communication encryption testing method and apparatus
CN104902053A (en) * 2015-04-30 2015-09-09 努比亚技术有限公司 Encryption card function testing method and system
CN104955091A (en) * 2015-04-29 2015-09-30 努比亚技术有限公司 Testing method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103987032A (en) * 2014-03-28 2014-08-13 张大中 Mobile communication terminal voice encryption method
CN105357007B (en) * 2014-08-21 2019-05-31 深圳市中兴微电子技术有限公司 Encryption communication method and communication terminal
CN105245348A (en) * 2015-10-21 2016-01-13 广州视源电子科技股份有限公司 Factory detection method, device and system of HDCP function

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070038868A1 (en) * 2005-08-15 2007-02-15 Top Digital Co., Ltd. Voiceprint-lock system for electronic data
US20140233728A1 (en) * 2012-11-16 2014-08-21 Raytheon Bbn Technologies Corp. Method for secure symbol comparison
CN104794052A (en) * 2015-04-01 2015-07-22 努比亚技术有限公司 Encryption display testing method and device
CN104883679A (en) * 2015-04-09 2015-09-02 努比亚技术有限公司 Voice communication encryption testing method and apparatus
CN104955091A (en) * 2015-04-29 2015-09-30 努比亚技术有限公司 Testing method and device
CN104902053A (en) * 2015-04-30 2015-09-09 努比亚技术有限公司 Encryption card function testing method and system

Also Published As

Publication number Publication date
CN106209344A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
WO2018000640A1 (en) Voice encryption testing method and testing device
WO2020029585A1 (en) Neural network federation modeling method and device employing transfer learning, and storage medium
WO2015093734A1 (en) System and method for authentication using quick response code
WO2014044065A1 (en) Method and system for securely accessing portable hotspot of smart phones
WO2019139420A1 (en) Electronic device, server, and control method therefor
WO2018098886A1 (en) Method for opening vehicle door, mobile terminal, vehicle-mounted terminal, and system
WO2018233352A1 (en) Data transmission method, device, terminal and computer-readable storage medium
WO2018151390A1 (en) Internet of things device
WO2015072788A1 (en) Method and apparatus for managing security key in a near fieldd2d communication system
WO2017092498A1 (en) Information management method and user terminal
WO2018053904A1 (en) Information processing method and terminal
WO2018000674A1 (en) Network connection method, network connection device, and terminal
WO2021235893A1 (en) Electronic device and method for electronic device to provide ranging-based service
WO2023120906A1 (en) Method for receiving firmware and method for transmitting firmware
WO2017111483A1 (en) Biometric data-based authentication device, control server and application server linked to same, and method for operating same
WO2017016272A1 (en) Method, apparatus and system for processing virtual resource data
WO2021080316A1 (en) Method and device for performing access control by using authentication certificate based on authority information
WO2018032583A1 (en) Method and apparatus for acquiring location information of terminal
WO2020122368A1 (en) System and method for securing and managing data in storage device by using secure terminal
WO2020009417A1 (en) Method and device for providing multimedia service in electronic device
WO2020032351A1 (en) Method for establishing anonymous digital identity
WO2018084548A1 (en) Apparatus and method for authenticating caller in communication system
WO2013009120A2 (en) Mobile communication terminal and apparatus and method for authenticating applications
WO2020166855A1 (en) Electronic device and control method thereof
WO2011111981A2 (en) Method and device for automatic data encryption and decryption

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16907036

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16907036

Country of ref document: EP

Kind code of ref document: A1