End-to-end VoIP encrypted communication method based on quantum key pre-injection

By using quantum key pre-filling and symmetric cryptography system for end-to-end key negotiation in the VoIP terminal, the problems of high complexity and insufficient security of the existing VoIP encrypted communication system are solved, and efficient and secure VoIP encryption is achieved. call.

CN115589288BActive Publication Date: 2024-08-27CHINA TELECOM QUANTUM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211198383.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-29
Publication Date
2024-08-27
Estimated Expiration
2042-09-29

AI Technical Summary

Technical Problem

The existing VoIP encrypted communication system based on digital certificates and asymmetric cryptography has the problems of high complexity, heavy key management burden, and insufficient security. Especially with the huge number of mobile users and the improvement of quantum computing capabilities, the session key Easily decipherable.

Method used

Using a method based on quantum key pre-filling, the symmetric master key pre-filled by the quantum key distribution network is stored in the secure storage medium in the VoIP terminal to achieve end-to-end key negotiation and reduce the burden of centralized key management. , and ensure the security of the key distribution process through the HMAC keyed hash algorithm.

Benefits of technology

It simplifies the complexity of VoIP encrypted calls, improves the security of the key distribution process, reduces the burden on the central key management platform, and achieves efficient and secure end-to-end encrypted calls.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115589288B
    Figure CN115589288B
Patent Text Reader

Abstract

The invention discloses a method for realizing end-to-end VoIP encrypted communication based on quantum key pre-charging, comprising: initiating a SIP session request to a called party belonging to the same private network as the called party, wherein the INVITE instruction of the SIP session request comprises a SIP message header and an SDP message body; randomly selecting two master keys belonging to the private network to which the called party belongs from a secure storage medium integrated therein; encrypting a session key material N1 by using a master key, calculating a cryptographic hash value for the INVITE instruction by using another master key, and obtaining an INVITE message of this SIP session; sending the INVITE message of this SIP session to the called party; receiving an INVITE response message, decrypting to obtain a session key material N2, and generating the session key and the initialization vector based on the session key material N1 and the session key material N2; and the calling and called parties conduct an encrypted conversation based on the session key and the initialization vector.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cryptographic applications, and in particular to a method for implementing end-to-end VoIP encrypted communication based on quantum key pre-injection. Background Art

[0002] With the development of 5G and instant messaging technologies, the need for encryption and decryption for VoIP (Voice over Internet Protocol) is increasing. Current solutions for VoIP encryption are generally based on digital certificates and public-private key cryptography. my country's cryptography industry standard, GM / T 0098-2020, "Technical Specifications for Encrypted Voice Communications over IP Networks," also proposes a set of technical standards for SIP protocol encrypted voice communications based on digital certificates and asymmetric cryptography. VoIP encryption systems based on digital certificates and public-private key cryptography currently face the following difficulties in practical use:

[0003] (1) The number of mobile users is huge, and the complexity of digital certificates and asymmetric cryptographic systems is also very high, involving multiple links such as the generation, distribution, registration, issuance, verification, and revocation of digital certificates and asymmetric key pairs. There are multiple components such as the key management system KMS, certificate center CA, certificate registration center RA, online certificate verification OCSP service, certificate revocation list CRL / LDAP directory service, etc. In addition, my country's asymmetric cryptographic system also adopts a dual-certificate dual-key pair system, and the number of certificates and key pairs that need to be managed has increased exponentially.

[0004] (2) The process of session key negotiation or distribution uses long-term asymmetric encryption key pairs and signature key pairs, and does not achieve a one-time one-key protection process.

[0005] (3) The process of session key negotiation or distribution is based on asymmetric key pairs and digital certificates. The public key used to encrypt and transmit session key materials is public. With the improvement of quantum computer computing power, there is a possibility of being deciphered, which may lead to the deciphering and theft of the session key to be transmitted.

[0006] In summary, the commonly used VOIP encrypted calls based on digital certificates and asymmetric cryptographic systems are highly complex. Real-time voice encryption calls place a huge burden on central key management or key distribution platforms, and the key negotiation or distribution process is not secure enough.

[0007] In the related art, the Chinese invention patent document with publication number CN106850521A records a key exchange method for end-to-end VoIP encrypted communication, and the implementation steps include: 1) the session initiator generates a session key AK, and then uses the public key of the target receiver to encrypt the AK; 2) the AK ciphertext is added to the INVITE message and sent to the target receiver; 3) the target receiver uses the private key to decrypt the AK ciphertext to obtain AK; then a session key BK is generated, and then a key C is generated as a negotiation key based on AK and BK; 4) the target receiver uses the initiator's public key to encrypt BK, and then uses the 2000K message to send the BK ciphertext to the initiator; the initiator uses the private key to decrypt the BK ciphertext to obtain BK, and then generates a key C as a negotiation key based on AK and BK.

[0008] This solution is based on an asymmetric cryptographic system and requires digital certificates to publish the public keys of both parties. The PKI system is highly complex, and existing asymmetric algorithms have problems resisting quantum attacks.

[0009] In the related art, the Chinese invention patent document with publication number CN111092905A records a VOIP-based encrypted call method and system, in which the calling terminal holds a first telephone number and is pre-installed with a first security module, and the called terminal holds a second telephone number and is pre-installed with a second security module; the calling terminal calls the background server to create an encryption group, and adds the calling terminal and the called terminal to the encryption group; during the call, the calling terminal generates a call key, and uses the first security module to encrypt it to generate a call key ciphertext, and then sends the call key ciphertext to the calling terminal; the called terminal uses the second security module to decrypt the call key ciphertext to obtain the call key; finally, the calling terminal and the called terminal conduct an encrypted call based on the call key.

[0010] The key distribution process of this scheme is not sufficiently protected because it requires the participation of a background server and the session key is generated unilaterally by the initiator.

[0011] Chinese invention patent publication CN106936788A describes a key distribution method suitable for VoIP voice encryption. The method involves a calling terminal initiating a session key request to a key distribution server (KDS), triggering key distribution. The KDS then generates a session key for both the calling terminal and the called terminal and returns it to the calling terminal. After obtaining the session key, the calling terminal initiates an encrypted call to the called terminal via the VoIP server, sends the key signature data generated by the KDS to the called terminal, and establishes a media stream transmission channel between the calling terminal and the called terminal via the VoIP server. Both parties use the session key to encrypt the media stream and transmit it to the other party. Upon receiving the media stream, the other party decrypts the received data using the session key to obtain the media stream.

[0012] This solution uses a key distribution server to distribute session keys, and the distribution process is protected by an asymmetric cryptographic system. There are also problems with certificate issuance, PKI complexity, and resistance to quantum attacks.

[0013] Chinese invention patent publication number CN104683291A describes a session key negotiation method based on an IMS system. A symmetric encryption algorithm and key are configured in a multimedia server at a terminal. A calling party encrypts a session key using a first symmetric encryption algorithm and key to generate a first ciphertext session key. The first ciphertext session key is transmitted to the multimedia server via a CSCF server in a SIP message. The multimedia server receives the SIP message and decrypts the first ciphertext session key using the first symmetric encryption algorithm and key to obtain a session key. The multimedia server encrypts the session key using a second symmetric encryption algorithm and key configured by the called party to generate a second ciphertext session key. The second ciphertext session key is transmitted to the called party via a SIP message via the CSCF server. The called party receives the SIP message and decrypts the second ciphertext session key using the second symmetric encryption algorithm and key to obtain a session key. Summary of the Invention

[0014] The technical problem to be solved by the present invention is how to realize direct encrypted calls between VoIP terminals in a simple, efficient and sufficiently secure manner.

[0015] The present invention solves the above technical problems through the following technical means:

[0016] In a first aspect, the present invention proposes a method for implementing end-to-end VoIP encrypted communication based on quantum key pre-injection. The method is applied to a VoIP terminal, where the VoIP terminal serves as a calling party or a called party, and a secure storage medium is integrated within the VoIP terminal. The secure storage medium stores master keys belonging to different encrypted private networks, and the method includes the following steps:

[0017] The calling party initiates a SIP session request to the called party in the same private network as the calling party, wherein the INVITE instruction of the SIP session request includes a SIP message header and an SDP message body, wherein the extended parameter a field in the SDP message body carries key negotiation information;

[0018] The calling party randomly selects two master keys belonging to the secret speech private network to which the called party belongs from the secure storage medium integrated therein;

[0019] The calling party encrypts the session key material N1 using one of the master keys and calculates a cryptographic hash value for the INVITE instruction using another master key to obtain the INVITE message for this SIP session. The session key material N1 is a hardware random number generated in real time by the secure storage medium integrated by the calling party.

[0020] The calling party sends the INVITE message of this SIP session to the called party, so that the called party generates an INVITE response message based on the INVITE message, wherein the INVITE response message carries the session key material N2, the session key, and the initialization vector. The session key material N2 is a hardware random number generated in real time by the secure storage medium integrated by the called party;

[0021] The calling party receives the INVITE response message, decrypts it to obtain the session key material N2, and generates the session key and the initialization vector based on the session key material N1 and the session key material N2;

[0022] The calling party performs an encrypted conversation with the called party based on the session key and the initialization vector.

[0023] The present invention is different from the technology of distributing or negotiating VoIP session keys based on public key cryptography. The secure storage medium in the terminals of the caller and the called party stores the symmetric master key pre-filled by the quantum key distribution network. It constructs a VoIP encryption call solution based on the pre-filled key of the quantum key distribution network and the symmetric cryptographic system for end-to-end key negotiation, reducing the complexity of the commonly used VoIP encryption call based on digital certificates and asymmetric cryptographic systems. Through pre-filled keys and end-to-end key negotiation, it solves the huge burden on the central key management or key distribution platform during real-time voice encryption calls.

[0024] Furthermore, the storage space of the secure storage medium is divided into multiple mutually isolated subspaces, each of the subspaces stores a master key belonging to the same encrypted private network, and the master key with the same key ID is stored in the same encrypted private network; the master key is filled by a quantum key distribution network or by a key agent.

[0025] Furthermore, the calling party encrypts the session key material N1 using one of the master keys, and calculates a cryptographic hash value for the INVITE instruction using another of the master keys, to obtain an INVITE message for this SIP session, including:

[0026] The calling party encrypts the session key material N1 using the master key keyid_enc1 to obtain an encrypted message nonce1_encrypted_xxx;

[0027] The calling party uses another master key keyid_hmac1 to calculate the cryptographic hash value hmac1_xxx using the keyed cryptographic hash algorithm HMAC on the content of the INVITE instruction;

[0028] An INVITE message for this SIP session is generated. The SDP message body of the INVITE message includes the private network identifier netID, the master key keyid_enc1, the master key keyid_hmac1, the encrypted message nonce1_encrypted_xxx, and the cryptographic hash value hmac1_xxx, to which both the caller and the called party belong.

[0029] Furthermore, when the VoIP terminal is the called party, the called party generates a session key, an initialization vector, and an INVITE response message based on the INVITE message, including:

[0030] Based on the private network identifier netID and the master key keyid_hmac1, the master key for verifying the cryptographic hash value hmac1_xxx is read from the secure storage medium integrated by the called party to verify the cryptographic hash value hmac1_xxx;

[0031] When the verification is successful, based on the private network identifier netID and the master key keyid_enc1, the master key for decrypting the encrypted message nonce1_encrypted_xxx is read from the secure storage medium integrated by the called party, and the session key material N1 is obtained by decryption;

[0032] Obtaining hardware data at any time from the secure storage medium integrated by the called party as session key material N2;

[0033] generating the session key and the initialization vector based on the session key material N1 and the session key material N2;

[0034] The INVITE response message is generated based on the session key, the initialization vector and the session key material N2.

[0035] Furthermore, the generating the INVITE response message based on the session key, the initialization vector, and the session key material N2 includes:

[0036] Obtaining a session key verification random number nonce3 from the secure storage medium integrated by the called party, and encrypting the session key verification random number nonce3 using the session key and the initialization vector to obtain a verification random number ciphertext nonce3_encrypted_xxx;

[0037] Randomly select two master keys keyid_enc2 and keyid_hmac2 of the encrypted private network corresponding to the identifier netID from the secure storage medium integrated by the called party;

[0038] Encrypt the session key material N2 using the master key keyid_enc2 to obtain an encrypted message nonce2_encrypted_xxx;

[0039] Calculate the cryptographic hash value hmac2_xxx of the response message using the master key keyid_hmac2;

[0040] Generate an INVITE response message, the SDP message body of which includes the secret network identifier netID to which the caller and the called party belong, two master keys keyid_enc2 and keyid_hmac2, an encrypted message nonce2_encrypted_xxx, a cryptographic hash value hmac2_xxx, a session key verification random number nonce3, and a verification random number ciphertext nonce3_encrypted_xxx.

[0041] Furthermore, the calling party receives the INVITE response message and decrypts it to obtain the session key material N2, including:

[0042] Receive the INVITE response message, and read the master key for verifying the cryptographic hash value hmac2_xxx from the secure storage medium integrated by the caller based on the private network identifier netID and the master key keyid_hmac2 to verify the cryptographic hash value hmac2_xxx;

[0043] When the verification is successful, based on the private network identifier netID and the master key keyid_enc2, the master key for decrypting the encrypted message nonce2_encrypted_xxx is read from the secure storage medium integrated by the caller, and the session key material N2 is decrypted.

[0044] Furthermore, the generating of the session key and the initialization vector based on the session key material N1 and the session key material N2 is specifically as follows:

[0045] SKEY=HMAC(HASH(N1|N2),call_id_xxx|sessionid_xxx)

[0046] SKEY_key=HMAC(SKEY,call_id_xxx|sessionid_xxx|0)

[0047] SKEY_iv=HMAC(SKEY_key, call_id_xxx|sessionid_xxx|1)

[0048] Where: HMAC(x,y) is the keyed hash value calculated using x as the key against y; SKEY_key is the session key; SKEY_iv is the initialization vector; SKEY is the intermediate result; call_id_xxx is the SIP call ID; sessionid_xxx is the SIP task ID; HASH(N1|N2) is the hash value calculated by concatenating N1 and N2.

[0049] Furthermore, the method further comprises:

[0050] The calling party decrypts the verification random number ciphertext nonce3_encrypted_xxx using the session key and the initialization vector to obtain a plaintext;

[0051] The plain text is compared with the session key verification random number nonce3 for verification, and an ACK message is sent to the called party after the verification is confirmed to be successful.

[0052] In a second aspect, the present invention further proposes a terminal for implementing end-to-end VoIP encrypted communication based on quantum key pre-injection. The terminal serves as a calling party and integrates a first data transceiver module, a first data encryption and decryption module, a first key management module, and a first secure storage medium. The first secure storage medium stores master keys belonging to different encrypted call networks, wherein:

[0053] The first data transceiver module is used to initiate a SIP session request to a called party that belongs to the same secret speech private network as the called party, wherein the INVITE instruction in the SIP session request includes a SIP message header and an SDP message body, and the extended parameter a field in the SDP message body carries key negotiation information;

[0054] The first key management module is configured to randomly select two master keys belonging to the secret call private network to which the called party belongs from the first secure storage medium;

[0055] The first data encryption and decryption module is configured to encrypt a session key material N1 using one of the master keys and calculate a cryptographic hash value for an INVITE instruction using another of the master keys to obtain an INVITE message for this SIP session, wherein the session key material N1 is a hardware random number generated in real time by the first secure storage medium integrated by the calling party;

[0056] The first data transceiver module is configured to send the INVITE message of this SIP session, so that the called party generates an INVITE response message based on the INVITE message, wherein the INVITE response message carries a session key material N2, a session key, and an initialization vector, wherein the session key material N2 is a hardware random number generated in real time by the second secure storage medium integrated by the called party;

[0057] The first data transceiver module is configured to receive the INVITE response message, decrypt the message through the first data encryption and decryption module to obtain the session key material N2, and generate the session key and the initialization vector based on the session key material N1 and the session key material N2 through the first data encryption and decryption module;

[0058] The first data transceiver module is used to conduct an encrypted conversation with the called party based on the session key and the initialization vector.

[0059] In a third aspect, the present invention further proposes a terminal for implementing end-to-end VoIP encrypted communication based on quantum key pre-injection, wherein the terminal serves as the called party and integrates a second data transceiver module, a second data encryption and decryption module, a second key management module, and a second secure storage medium, wherein:

[0060] The second data transceiver module is used to receive a SIP session request sent by the calling party, wherein the SIP session request carries an INVITE message, and the SDP message body content of the INVITE message includes the encrypted private network identifier netID, the master key keyid_enc1, the master key keyid_hmac1, the encrypted message nonce1_encrypted_xxx and the cryptographic hash value hmac1_xxx to which the calling party and the called party belong.

[0061] The second key management module is configured to read the master key for verifying the cryptographic hash value hmac1_xxx from the second secure storage medium integrated by the called party based on the encrypted private network identifier netID and the master key keyid_hmac1 to verify the cryptographic hash value hmac1_xxx;

[0062] The second key management module is configured to read the master key for decrypting the encrypted message nonce1_encrypted_xxx from the second secure storage medium integrated by the called party based on the encrypted private network identifier netID and the master key keyid_enc1 when the verification is passed, and decrypt the master key to obtain the session key material N1;

[0063] The second key management module is configured to obtain hardware data at any time from the second secure storage medium integrated by the called party as session key material N2;

[0064] The second data encryption and decryption module is used to generate the session key and the initialization vector based on the session key material N1 and the session key material N2, and generate the INVITE response message based on the session key, the initialization vector and the session key material N2.

[0065] In a fourth aspect, the present invention further proposes an end-to-end VoIP encrypted communication system based on quantum key pre-injection, the system comprising a quantum key distribution network, a service acceptance platform, a first VoIP terminal, and a second VoIP terminal, the quantum key distribution network being connected to the service acceptance platform, the first VoIP terminal, and the second VoIP terminal, respectively; the first VoIP terminal and the second VoIP terminal being connected to the service acceptance platform, respectively; the first VoIP terminal and the second VoIP terminal being integrated with a data transceiver module, a data encryption and decryption module, a key management module, and a secure storage medium;

[0066] The service acceptance platform is used to demarcate a private network for encrypted calls and to register and bind the identities of the first VoIP terminal and the second VoIP terminal;

[0067] The quantum key distribution network is used to inject a master key into the secure storage medium, and the master keys belonging to the same encrypted private network have the same identifier;

[0068] When the first VoIP terminal or the second VoIP terminal is a calling party, the data transceiver module is used to initiate a SIP session request to a called party that belongs to the same private network as the calling party, wherein the INVITE instruction in the SIP session request includes a SIP message header and an SDP message body, and the extended parameter a field in the SDP message body carries key negotiation information;

[0069] The key management module is used to randomly select two master keys belonging to the secret call private network to which the called party belongs from the secure storage medium;

[0070] The data encryption and decryption module is configured to encrypt a session key material N1 using one of the master keys and calculate a cryptographic hash value for an INVITE instruction using another of the master keys to obtain an INVITE message for this SIP session, wherein the session key material N1 is a hardware random number generated in real time by the secure storage medium integrated by the calling party;

[0071] The data transceiver module is configured to send the INVITE message of this SIP session, so that the called party generates an INVITE response message based on the INVITE message, wherein the INVITE response message carries a session key material N2, a session key, and an initialization vector, wherein the session key material N2 is a hardware random number generated in real time by the secure storage medium integrated by the called party;

[0072] The data transceiver module is configured to receive the INVITE response message, decrypt the message through the data encryption and decryption module to obtain the session key material N2, and generate the session key and the initialization vector based on the session key material N1 and the session key material N2 through the data encryption and decryption module;

[0073] The data transceiver module is used to conduct an encrypted conversation with the called party based on the session key and the initialization vector.

[0074] The advantages of the present invention are:

[0075] (1) The present invention is different from the technology of VoIP session key distribution or negotiation based on public key cryptography. The secure storage medium in the terminals of the caller and the called party stores the symmetric master key pre-filled by the quantum key distribution network. A VoIP encryption call solution is constructed based on the pre-filled key of the quantum key distribution network and the symmetric cryptographic system for end-to-end key negotiation. The complexity of the commonly used VoIP encryption call based on digital certificates and asymmetric cryptographic system is reduced. The huge burden on the central key management or key distribution platform during the real-time voice encryption call is solved through the pre-filled key and end-to-end key negotiation.

[0076] (2) A large number of pre-filled quantum keys and symmetric encryption are used to implement a one-time key distribution process, which has good security. The HMAC key hashing algorithm is used to ensure integrity. In addition, the session key is generated by negotiation between the two parties without the participation of a third-party server. Overall, compared with other solutions, it has higher security and lower implementation complexity.

[0077] (3) The voice data encryption mode uses CBC (integer multiples of the algorithm block) + CFB (the remainder beyond the integer multiples of the algorithm block), which is transparent to the voice message and does not add any additional length overhead.

[0078] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 This is a flow chart of a method for implementing end-to-end VoIP encrypted communication based on quantum key pre-injection, as proposed in the first embodiment of the present invention;

[0080] Figure 2 2 is a schematic diagram of the structure of an end-to-end VoIP encrypted communication terminal based on quantum key pre-injection proposed in the second embodiment of the present invention;

[0081] Figure 3 2 is a schematic diagram of the structure of an end-to-end VoIP encrypted communication terminal based on quantum key pre-injection proposed in the third embodiment of the present invention;

[0082] Figure 4 2 is a schematic diagram of the structure of an end-to-end VoIP encrypted communication system based on quantum key pre-injection proposed in the fourth embodiment of the present invention;

[0083] Figure 5 This is a schematic diagram of the workflow of an end-to-end VoIP encrypted communication system based on quantum key pre-injection proposed in the fifth embodiment of the present invention. DETAILED DESCRIPTION

[0084] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0085] Example 1

[0086] like Figure 1 As shown, the first embodiment of the present invention proposes a method for implementing end-to-end VoIP encrypted communication based on quantum key pre-injection. The method is applied to a VoIP terminal, which serves as a calling party or a called party. The VoIP terminal has an integrated secure storage medium, and the secure storage medium stores master keys belonging to different encrypted private networks. The method includes the following steps:

[0087] S101. A calling party initiates a SIP session request to a called party in the same private network. The INVITE instruction of the SIP session request includes a SIP message header and an SDP message body. The extended parameter a field in the SDP message body carries key negotiation information.

[0088] It should be noted that before the caller initiates a SIP session request to the called party, it first checks the address book to confirm that the called party and itself belong to the same secret call private network, and then initiates the secret call SIP call.

[0089] S102: The calling party randomly selects two master keys belonging to the called party's private network from the secure storage medium integrated therein;

[0090] S103. The calling party encrypts the session key material N1 using one of the master keys and calculates a cryptographic hash value for the INVITE instruction using another of the master keys to obtain an INVITE message for this SIP session. The session key material N1 is a hardware random number generated in real time by the secure storage medium integrated by the calling party.

[0091] S104. The calling party sends the INVITE message of the current SIP session to the called party, so that the called party generates an INVITE response message based on the INVITE message. The INVITE response message carries the session key material N2, the session key, and the initialization vector. The session key material N2 is a hardware random number generated in real time by the secure storage medium integrated by the called party.

[0092] S105. The calling party receives the INVITE response message, decrypts it to obtain the session key material N2, and generates the session key and the initialization vector based on the session key material N1 and the session key material N2;

[0093] S106: The calling party conducts an encrypted conversation with the called party based on the session key and the initialization vector.

[0094] It should be noted that the secure storage medium stores a large number of symmetric master keys pre-filled by the quantum key distribution network; the quantum key distribution network includes quantum network nodes and a quantum network link control center to realize services such as quantum key generation, quantum key relay, and quantum key provision; the quantum network nodes are used to store the generated quantum keys, receive key applications from key agents, provide keys to key agents, or directly provide key filling services; the quantum network link control center is used to establish quantum key distribution and relay links between nodes according to the quantum network node ID.

[0095] The secure storage medium in this embodiment uses a large-capacity secure storage medium such as a secure SIM card (for smartphones) or a secure U shield (for personal computers). A large number of master keys are pre-filled into the secure storage medium through a quantum key distribution network. The key format is a 4-byte key ID + n-byte key and n-byte initialization vector. All terminals in the same secret call network share the same master key identified by the same key ID.

[0096] It should be understood that n is related to the specific encryption algorithm used and is not specifically limited in this embodiment.

[0097] This embodiment is different from the technology of distributing or negotiating VoIP session keys based on public key cryptography. The secure storage medium in the terminals of the caller and the called party stores the symmetric master key pre-filled by the quantum key distribution network. This constructs a VoIP encryption call solution based on the pre-filled key of the quantum key distribution network and the symmetric cryptographic system for end-to-end key negotiation. It reduces the complexity of the commonly used VoIP encryption call based on digital certificates and asymmetric cryptographic systems. Through pre-filled keys and end-to-end key negotiation, it solves the problem of the huge burden on the central key management or key distribution platform during real-time voice encryption calls.

[0098] In one embodiment, the storage space of the secure storage medium is divided into multiple mutually isolated subspaces, each of the subspaces stores a master key belonging to the same encrypted private network, and the master keys with the same key ID are stored in the same encrypted private network; the master keys are filled by a quantum key distribution network or by a key agent.

[0099] It should be noted that the secure storage medium can divide its protected internal storage space into isolated subspaces for storing master keys belonging to different encrypted private networks and distinguishing them using a 4-byte private network ID.

[0100] In one embodiment, before the step S101: the calling party initiates a SIP session request to the called party who belongs to the same private network as the calling party, the method further includes the following steps:

[0101] Insert the secure storage medium into the VoIP terminal, run the initialization program to check the integrity of the secure storage medium, and obtain authorization to use the master key stored in the secure storage medium through PIN code verification, etc., to ensure that the secure storage medium is in a usable state before making an encrypted VoIP call.

[0102] In one embodiment, step S103, in which the calling party encrypts the session key material N1 using one of the master keys and calculates a cryptographic hash value for the INVITE instruction using another of the master keys to obtain the INVITE message for the current SIP session, includes the following steps:

[0103] S131. The calling party encrypts the session key material N1 using the master key keyid_enc1 to obtain an encrypted message nonce1_encrypted_xxx.

[0104] S132. The calling party uses another master key keyid_hmac1 to calculate the cryptographic hash value hmac1_xxx using the keyed cryptographic hash algorithm HMAC for the content of the INVITE instruction;

[0105] S133. Generate an INVITE message for this SIP session. The SDP message body of the INVITE message includes the encrypted private network identifier netID, the master key keyid_enc1, the master key keyid_hmac1, the encrypted message nonce1_encrypted_xxx, and the cryptographic hash value hmac1_xxx.

[0106] It should be noted that the calling party reads an n-byte hardware random number generated in real time from its own integrated secure storage medium as the session key material N1, and randomly selects two master keys keyid_enc1 and keyid_hmac1 belonging to the called party's private network from its own integrated secure storage medium; among them, one master key keyid_enc1 is used to encrypt the session key material N1, and the other master key keyid_hmac1 is used to calculate the integrity check value of the content of the entire INVITE instruction (including the SIP message header and SDP message body) using the keyed cryptographic hash algorithm HMAC.

[0107] The INVITE message generated for this SIP session is as follows:

[0108] INVITE sip:user2@ip_user2 SIP / 2.0

[0109] Via:SIP / 2.0 / UDP ip_user1:port_user1

[0110] Max-Forwards:XXX

[0111] Contact:<sip:user1@ip_user1:port_user1>

[0112] To: "user2"<sip:user2@ip_user2>

[0113] From: "user1"<sip:user1@ip_user1>

[0114] Call-ID:call_id_xxx

[0115] Cseq:1INVITE

[0116] Allow:INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,MESSAGE, SUBSCRIBE,INFO

[0117] Content-Type:application / SDP

[0118] Content-Length:***

[0119] / / SDP message body content

[0120] v=0

[0121] o=user1 sessionid_xxx timestamp1_xxx IN IP4 ip_user1

[0122] s=talk

[0123] t=0 0

[0124] a=network:netID

[0125] a=nonce:keyid_enc1 nonce1_encrypted_xxx

[0126] a=hmac:keyid_hmac1 hmac1_xxx

[0127] m=audio 29000RTP / AVP 0

[0128] In the above example, netID is the ID of the encrypted private network shared by the caller and the called party, keyid_enc1 is the master key ID used by the caller to encrypt the caller's session key material, keyid_hmac1 is the master key ID used by the caller to calculate the HMAC of the entire message, nonce1_encrypted_xxx is the base64 encoding of the encrypted caller's session key material, and hmac1_xxx is the base64 encoding of the caller's message HMAC.

[0129] It should be noted that after the SIP session ends, the master keys keyid_enc1 and keyid_hmac1 used are marked as invalid and cleared.

[0130] In one embodiment, when the called party receives an INVITE message for a current SIP session from the calling party, the called party first checks the address book to confirm that the calling party and the called party belong to the same private network for secure communication. The called party then processes the INVITE message and generates a session key, an initialization vector, and an INVITE response message based on the INVITE message. Specifically, the following steps are included:

[0131] S201, based on the encrypted private network identifier netID and the master key keyid_hmac1, read the master key for verifying the cryptographic hash value hmac1_xxx from the secure storage medium integrated by the called party to verify the cryptographic hash value hmac1_xxx;

[0132] S202: When the verification is successful, based on the encrypted private network identifier netID and the master key keyid_enc1, the master key for decrypting the encrypted message nonce1_encrypted_xxx is read from the secure storage medium integrated by the called party, and the session key material N1 is obtained by decryption;

[0133] It should be noted that if the verification fails, the call will be terminated.

[0134] S203, obtaining hardware data at any time from the secure storage medium integrated by the called party as session key material N2;

[0135] S204: Generate the session key and the initialization vector based on the session key material N1 and the session key material N2;

[0136] It should be noted that the called party generates a session key and an initialization vector based on the session key material N1 and the session key material N2:

[0137] SKEY=HMAC(HASH(N1|N2),call_id_xxx|sessionid_xxx)

[0138] SKEY_key=HMAC(SKEY,call_id_xxx|sessionid_xxx|0)

[0139] SKEY_iv=HMAC(SKEY_key, call_id_xxx|sessionid_xxx|1)

[0140] In the above formula, HMAC(x,y) is a keyed hash value calculated using x as the key for y. If the number of parameter bits is insufficient, the value is repeated starting from the first parameter until the required length is reached. SKEY_key is the session key, and SKEY_iv is the initialization vector.

[0141] S205: Generate the INVITE response message based on the session key, the initialization vector, and the session key material N2.

[0142] In one embodiment, the step S205 of generating the INVITE response message based on the session key, the initialization vector, and the session key material N2 includes the following steps:

[0143] S251. Obtain a session key verification random number nonce3 from the secure storage medium integrated by the called party, and encrypt the session key verification random number nonce3 using the session key and the initialization vector to obtain a verification random number ciphertext nonce3_encrypted_xxx;

[0144] It should be noted that the called party reads an n-byte hardware random number generated in real time from a secure storage medium as the session key verification random number nonce3, and encrypts the verification random number nonce3_encrypted_xxx using the session key and the initialization vector.

[0145] It should be understood that the value of n is related to the encryption algorithm and is not specifically limited in this embodiment.

[0146] S252, randomly selecting two master keys keyid_enc2 and keyid_hmac2 of the encrypted private network corresponding to the identifier netID from the secure storage medium integrated by the called party;

[0147] S253: Encrypt the session key material N2 using the master key keyid_enc2 to obtain an encrypted message nonce2_encrypted_xxx.

[0148] It should be noted that the called party calls the key management module to read the n-byte real-time generated hardware random number from the secure storage medium as the session key material N2, and encrypts the session key material N2 using the master key keyid_enc2.

[0149] It should be understood that the value of n is related to the encryption algorithm and is not specifically limited in this embodiment.

[0150] S254, using the master key keyid_hmac2 to calculate the cryptographic hash value hmac2_xxx of the response message;

[0151] It should be noted that the master key keyid_hmac2 is used to calculate the integrity check value of the content of the entire INVITE instruction response message (including the SIP message header and SDP message body) using the keyed cryptographic hash algorithm HMAC.

[0152] S255. Generate an INVITE response message. The SDP message body of the INVITE response message includes the encrypted private network identifier netID to which the caller and the called party belong, two master keys keyid_enc2 and keyid_hmac2, an encrypted message nonce2_encrypted_xxx, a cryptographic hash value hmac2_xxx, a session key verification random number nonce3, and a verification random number ciphertext nonce3_encrypted_xxx.

[0153] Specifically, the INVITE response message is as follows:

[0154] SIP / 2.0 200 OK

[0155] Via:SIP / 2.0 / UDP ip_user1:port_user1

[0156] Max-Forwards:XXX

[0157] Contact:<sip:user2@ip_user2:port_user2>

[0158] To: "user2"<sip:user2@ip_user2>

[0159] From: "user1"<sip:user1@ip_user1>

[0160] Call-ID:call_id_xxx

[0161] Cseq:1INVITE

[0162] Content-Type:application / SDP

[0163] Content-Length:***

[0164] / / SDP message body content

[0165] v=0

[0166] o=user2 sessionid_xxx timestamp2_xxx IN IP4 ip_user2

[0167] s=talk

[0168] t=0 0

[0169] a=network:netID

[0170] a=nonce:keyid_enc2 nonce2_encrypted_xxx

[0171] a=hmac:keyid_hmac2 hmac2_xxx

[0172] a=verify nonce3+nonce3_encrypted_xxx

[0173] m=audio 45000RTP / AVP 0

[0174] In the above example, keyid_enc2 is the master key used to encrypt the called party's session key material N2, keyid_hmac2 is the master key used to calculate the HMAC of the entire called party's response message, nonce2_encrypted_xxx is the base64 encoding of the encrypted called party's session key material, hmac2_xxx is the base64 encoding of the called party's response message HMAC, nonce3 is the session key verification random number generated by the called party, and nonce3_encrypted_xxx is the ciphertext of the verification random number encrypted by the called party using the session key SKEY_key and initialization vector SKEY_iv.

[0175] It should be noted that after the SIP session ends, the master keys keyid_hmac2 and keyid_enc2 used are marked as invalid and cleared.

[0176] In one embodiment, the step S105 in which the calling party receives the INVITE response message and decrypts it to obtain the session key material N2 includes the following steps:

[0177] S151. Receive the INVITE response message, and read the master key for verifying the cryptographic hash value hmac2_xxx from the secure storage medium integrated by the caller based on the encrypted private network identifier netID and the master key keyid_hmac2 to verify the cryptographic hash value hmac2_xxx;

[0178] S152: When the verification is passed, based on the encrypted network identifier netID and the master key keyid_enc2, the master key for decrypting the encrypted message nonce2_encrypted_xxx is read from the secure storage medium integrated by the caller, and the session key material N2 is obtained by decryption.

[0179] It should be noted that if the verification fails, the call will be terminated.

[0180] In one embodiment, in step S105, the session key and the initialization vector are generated based on the session key material N1 and the session key material N2. The specific process is the same as the process of the called party generating the session key and the initialization vector, which are:

[0181] SKEY=HMAC(HASH(N1|N2),call_id_xxx|sessionid_xxx)

[0182] SKEY_key=HMAC(SKEY,call_id_xxx|sessionid_xxx|0)

[0183] SKEY_iv=HMAC(SKEY_key, call_id_xxx|sessionid_xxx|1)

[0184] In the above formula, HMAC(x,y) is a keyed hash value calculated using x as the key for y. If the number of parameter bits is insufficient, the value is repeated starting from the first parameter until the required length is reached. SKEY_key is the session key, and SKEY_iv is the initialization vector.

[0185] In one embodiment, the method further comprises the following steps:

[0186] The calling party decrypts the verification random number ciphertext nonce3_encrypted_xxx using the session key and the initialization vector to obtain a plaintext;

[0187] The plain text is compared with the session key verification random number nonce3 for verification, and an ACK message is sent to the called party after the verification is confirmed to be successful.

[0188] At this point, the calling and calling parties complete the SIP three-way handshake for secret conversation. Each time a SIP secret conversation ends, the used master key is marked as invalid and cleared.

[0189] It should be noted that the caller and the called party use the session key and initialization vector obtained in the above steps to encrypt the call. The encryption mode is CBC (integer multiple of the algorithm block) + CFB (the remainder other than the integer multiple of the algorithm block), which is transparent to the voice message and does not add any additional length overhead.

[0190] Example 2

[0191] like Figure 2As shown, the second embodiment of the present invention proposes a terminal for implementing end-to-end VoIP encrypted communication based on quantum key pre-injection. The terminal serves as a calling party and integrates a first data transceiver module 11, a first data encryption and decryption module 12, a first key management module 13, and a first secure storage medium 14. The first secure storage medium 14 stores master keys belonging to different encrypted private networks, wherein:

[0192] The first data transceiver module 11 is used to initiate a SIP session request to the called party that belongs to the same private network as the called party, wherein the INVITE instruction in the SIP session request includes a SIP message header and an SDP message body, and the extended parameter a field in the SDP message body carries key negotiation information;

[0193] The first key management module 13 is configured to randomly select two master keys belonging to the secret call private network to which the called party belongs from the first secure storage medium;

[0194] The first data encryption and decryption module 12 is configured to encrypt a session key material N1 using one of the master keys and calculate a cryptographic hash value for an INVITE instruction using another of the master keys to obtain an INVITE message for this SIP session, wherein the session key material N1 is a hardware random number generated in real time by the first secure storage medium integrated by the calling party;

[0195] The first data transceiver module 11 is configured to send the INVITE message of this SIP session, so that the called party generates an INVITE response message based on the INVITE message, wherein the INVITE response message carries a session key material N2, a session key, and an initialization vector, wherein the session key material N2 is a hardware random number generated in real time by the second secure storage medium integrated by the called party;

[0196] The first data transceiver module 11 is configured to receive the INVITE response message, decrypt the message through the first data encryption and decryption module to obtain the session key material N2, and generate the session key and the initialization vector based on the session key material N1 and the session key material N2 through the first data encryption and decryption module;

[0197] The first data transceiver module 11 is configured to perform an encrypted conversation with the called party based on the session key and the initialization vector.

[0198] This embodiment differs from technologies that distribute or negotiate VoIP session keys based on public key cryptography. The secure storage medium within the terminals of both the caller and the called party stores a symmetric master key pre-injected by the quantum key distribution network. This constructs a VoIP encrypted call solution that uses the pre-injected key from the quantum key distribution network and a symmetric cryptographic system for end-to-end key negotiation. This reduces the complexity of commonly used VoIP encrypted calls based on digital certificates and asymmetric cryptographic systems, and resolves the huge burden on centralized key management or key distribution platforms during real-time voice encryption calls through pre-injected keys and end-to-end key negotiation.

[0199] In one embodiment, the storage space of the secure storage medium is divided into multiple mutually isolated subspaces, each of the subspaces stores a master key belonging to the same encrypted private network, and the master keys with the same key ID are stored in the same encrypted private network; the master keys are filled by a quantum key distribution network or by a key agent.

[0200] In one embodiment, the master key stored in the secure storage medium is pre-filled with a quantum key distribution network, but is not limited to a quantum key distribution network. The key pre-filling function involved in this embodiment can be implemented using any symmetric key management system and device.

[0201] In one embodiment, the first data encryption and decryption module 12 is further configured to:

[0202] Encrypt the session key material N1 using the master key keyid_enc1 to obtain an encrypted message nonce1_encrypted_xxx;

[0203] Using another master key keyid_hmac1, the content of the INVITE instruction is subjected to a keyed cryptographic hash algorithm HMAC to calculate the cryptographic hash value hmac1_xxx;

[0204] An INVITE message for this SIP session is generated. The SDP message body of the INVITE message includes the private network identifier netID, the master key keyid_enc1, the master key keyid_hmac1, the encrypted message nonce1_encrypted_xxx, and the cryptographic hash value hmac1_xxx, to which both the caller and the called party belong.

[0205] In one embodiment, the first data encryption and decryption module 12 is further configured to:

[0206] Receive the INVITE response message, and read the master key for verifying the cryptographic hash value hmac2_xxx from the secure storage medium integrated by the caller based on the private network identifier netID and the master key keyid_hmac2 to verify the cryptographic hash value hmac2_xxx;

[0207] When the verification is successful, based on the private network identifier netID and the master key keyid_enc2, the master key for decrypting the encrypted message nonce2_encrypted_xxx is read from the secure storage medium integrated by the caller, and the session key material N2 is decrypted.

[0208] In one embodiment, the first data encryption / decryption module 12 is further configured to generate the session key and the initialization vector based on the session key material N1 and the session key material N2, specifically:

[0209] SKEY=HMAC(HASH(N1|N2),call_id_xxx|sessionid_xxx)

[0210] SKEY_key=HMAC(SKEY,call_id_xxx|sessionid_xxx|0)

[0211] SKEY_iv=HMAC(SKEY_key, call_id_xxx|sessionid_xxx|1)

[0212] Where: HMAC(x,y) is the keyed hash value calculated using x as the key against y; SKEY_key is the session key; SKEY_iv is the initialization vector; SKEY is the intermediate result; call_id_xxx is the SIP call ID; sessionid_xxx is the SIP task ID; HASH(N1|N2) is the hash value calculated by concatenating N1 and N2.

[0213] In one embodiment, the first data encryption and decryption module 12 is further configured to:

[0214] Decrypt the verification random number ciphertext nonce3_encrypted_xxx using the session key and the initialization vector to obtain plaintext;

[0215] The plain text is compared with the session key verification random number nonce3 for verification, and an ACK message is sent to the called party after the verification is confirmed to be successful.

[0216] It should be noted that other embodiments or implementation methods of the present invention for achieving end-to-end VoIP encrypted communication based on quantum key pre-injection can refer to the above-mentioned method embodiment 1, and will not be repeated here.

[0217] Example 3

[0218] like Figure 3 As shown, the third embodiment of the present invention further proposes a terminal for implementing end-to-end VoIP encrypted communication based on quantum key pre-injection. The terminal serves as the called party and integrates a second data transceiver module 21, a second data encryption and decryption module 22, a second key management module 23, and a second secure storage medium 24, wherein:

[0219] The second data transceiver module 21 is configured to receive a SIP session request sent by the calling party, wherein the SIP session request carries an INVITE message, and the SDP message body of the INVITE message includes the encrypted private network identifier netID, the master key keyid_enc1, the master key keyid_hmac1, the encrypted message nonce1_encrypted_xxx, and the cryptographic hash value hmac1_xxx to which both the calling party and the called party belong.

[0220] The second key management module 22 is configured to read the master key for verifying the cryptographic hash value hmac1_xxx from the second secure storage medium integrated by the called party based on the encrypted private network identifier netID and the master key keyid_hmac1 to verify the cryptographic hash value hmac1_xxx;

[0221] The second key management module 23 is configured to read the master key for decrypting the encrypted message nonce1_encrypted_xxx from the second secure storage medium integrated by the called party based on the encrypted private network identifier netID and the master key keyid_enc1 when the verification is passed, and decrypt the master key to obtain the session key material N1;

[0222] The second key management module 23 is configured to obtain hardware data at any time from the second secure storage medium integrated by the called party as the session key material N2;

[0223] The second data encryption and decryption module 22 is configured to generate the session key and the initialization vector based on the session key material N1 and the session key material N2, and to generate the INVITE response message based on the session key, the initialization vector and the session key material N2.

[0224] This embodiment differs from technologies that distribute or negotiate VoIP session keys based on public key cryptography. The secure storage medium within the terminals of both the caller and the called party stores a symmetric master key pre-injected by the quantum key distribution network. This constructs a VoIP encrypted call solution that uses the pre-injected key from the quantum key distribution network and a symmetric cryptographic system for end-to-end key negotiation. This reduces the complexity of commonly used VoIP encrypted calls based on digital certificates and asymmetric cryptographic systems, and resolves the huge burden on centralized key management or key distribution platforms during real-time voice encryption calls through pre-injected keys and end-to-end key negotiation.

[0225] In one embodiment, the second data encryption and decryption module 22 is specifically configured to:

[0226] a first master key acquisition unit, configured to read, from the second secure storage medium integrated by the called party, a master key for verifying the cryptographic hash value hmac1_xxx based on the encrypted private network identifier netID and the master key keyid_hmac1, so as to verify the cryptographic hash value hmac1_xxx;

[0227] A second master key acquisition unit is configured to, when verification is passed, read the master key for decrypting the encrypted message nonce1_encrypted_xxx from the secure storage medium integrated by the called party based on the encrypted private network identifier netID and the master key keyid_enc1, and decrypt the master key to obtain the session key material N1;

[0228] A third master key acquisition unit is configured to acquire hardware data at any time from the secure storage medium integrated by the called party as a session key material N2;

[0229] a session key generating unit, configured to generate the session key and the initialization vector based on the session key material N1 and the session key material N2;

[0230] The INVITE response message generating unit is configured to generate the INVITE response message based on the session key, the initialization vector and the session key material N2.

[0231] In one embodiment, the INVITE response message generating unit is specifically configured to:

[0232] Obtaining a session key verification random number nonce3 from the secure storage medium integrated by the called party, and encrypting the session key verification random number nonce3 using the session key and the initialization vector to obtain a verification random number ciphertext nonce3_encrypted_xxx;

[0233] Randomly select two master keys keyid_enc2 and keyid_hmac2 of the encrypted private network corresponding to the identifier netID from the secure storage medium integrated by the called party;

[0234] Encrypt the session key material N2 using the master key keyid_enc2 to obtain an encrypted message nonce2_encrypted_xxx;

[0235] Calculate the cryptographic hash value hmac2_xxx of the response message using the master key keyid_hmac2;

[0236] Generate an INVITE response message, the SDP message body of which includes the secret network identifier netID to which the caller and the called party belong, two master keys keyid_enc2 and keyid_hmac2, an encrypted message nonce2_encrypted_xxx, a cryptographic hash value hmac2_xxx, a session key verification random number nonce3, and a verification random number ciphertext nonce3_encrypted_xxx.

[0237] It should be noted that other embodiments or implementation methods of the present invention for achieving end-to-end VoIP encrypted communication based on quantum key pre-injection can refer to the above-mentioned method embodiment 1, which will not be repeated here.

[0238] Example 4

[0239] like Figure 4 As shown, the fourth embodiment of the present invention proposes an end-to-end VoIP encrypted communication system based on quantum key pre-filling, the system comprising a quantum key distribution network 40, a service acceptance platform 30, a first VoIP terminal 10, and a second VoIP terminal 20. The quantum key distribution network 40 is connected to the service acceptance platform 30, the first VoIP terminal 10, and the second VoIP terminal 20, respectively. The first VoIP terminal 10 and the second VoIP terminal 20 are respectively connected to the service acceptance platform 30. The first VoIP terminal 10 and the second VoIP terminal 20 are integrated with a data transceiver module, a data encryption and decryption module, a key management module, and a secure storage medium.

[0240] The service acceptance platform 30 is used to define a private network for encrypted calls and to register and bind the identities of the first VoIP terminal and the second VoIP terminal;

[0241] The quantum key distribution network 40 is used to inject the master key into the secure storage medium, and the master keys belonging to the same encrypted private network have the same identifier;

[0242] When the first VoIP terminal 10 or the second VoIP terminal 20 is a calling party, the data transceiver module is used to initiate a SIP session request to a called party that belongs to the same private network as the calling party, wherein the INVITE instruction in the SIP session request includes a SIP message header and an SDP message body, and the extended parameter a field in the SDP message body carries key negotiation information;

[0243] The key management module is used to randomly select two master keys belonging to the secret call private network to which the called party belongs from the secure storage medium;

[0244] The data encryption and decryption module is configured to encrypt a session key material N1 using one of the master keys and calculate a cryptographic hash value for an INVITE instruction using another of the master keys to obtain an INVITE message for this SIP session, wherein the session key material N1 is a hardware random number generated in real time by the secure storage medium integrated by the calling party;

[0245] The data transceiver module is configured to send the INVITE message of this SIP session, so that the called party generates an INVITE response message based on the INVITE message, wherein the INVITE response message carries a session key material N2, a session key, and an initialization vector, wherein the session key material N2 is a hardware random number generated in real time by the secure storage medium integrated by the called party;

[0246] The data transceiver module is configured to receive the INVITE response message, decrypt the message through the data encryption and decryption module to obtain the session key material N2, and generate the session key and the initialization vector based on the session key material N1 and the session key material N2 through the data encryption and decryption module;

[0247] The data transceiver module is used to conduct an encrypted conversation with the called party based on the session key and the initialization vector.

[0248] In one embodiment, when the first VoIP terminal 10 or the second VoIP terminal 20 is the called party, the data transceiver module is configured to receive a SIP session request sent by the calling party, wherein the SIP session request carries an INVITE message, and the SDP message body of the INVITE message includes the encrypted private network identifier netID to which both the calling party and the called party belong, the master key keyid_enc1, the master key keyid_hmac1, the encrypted message nonce1_encrypted_xxx, and the cryptographic hash value hmac1_xxx;

[0249] The key management module is configured to read the master key for verifying the cryptographic hash value hmac1_xxx from the secure storage medium integrated by the called party based on the encrypted private network identifier netID and the master key keyid_hmac1 to verify the cryptographic hash value hmac1_xxx;

[0250] The key management module is configured to read the master key for decrypting the encrypted message nonce1_encrypted_xxx from the secure storage medium integrated by the called party based on the encrypted network identifier netID and the master key keyid_enc1 when verification is passed, and decrypt the master key to obtain the session key material N1;

[0251] The key management module is used to obtain the hardware data at any time from the secure storage medium integrated by the called party as the session key material N2;

[0252] The data encryption and decryption module is used to generate the session key and the initialization vector based on the session key material N1 and the session key material N2, and generate the INVITE response message based on the session key, the initialization vector and the session key material N2.

[0253] like Figure 5 As shown, the workflow of the end-to-end VoIP encrypted communication system based on quantum key pre-injection proposed in this embodiment is as follows:

[0254] (1) The business acceptance platform defines a private network for encrypted calls. VoIP terminals within the private network can make encrypted VoIP calls to each other. At the same time, the platform accepts registrations from VoIP terminals. Different VoIP terminals can register to different private networks for encrypted calls.

[0255] (2) Insert the secure storage medium into the VoIP terminal, run the initialization program to check the integrity of the hardware medium, and obtain authorization to use the master key stored in the secure storage medium through PIN code verification, etc., to ensure that the secure storage medium is in a usable state before making an encrypted VoIP call.

[0256] (3) The caller checks the address book to confirm that the called party and themselves belong to the same private network for encrypted conversations, and then initiates a SIP call for encrypted conversations. The extended parameter a field in the SDP (Session Description Protocol) is used in the INVITE instruction of the SIP (Session Initiation Protocol) to carry the key negotiation related information. The caller calls the key management module to read the n-byte real-time generated hardware random number from the secure SIM card or secure USB shield as the session key material N1, and randomly selects two master key ID numbers and corresponding master keys keyid_hmac1 and keyid_enc1 from the master key storage space corresponding to the private network ID of the called party. One master key keyid_enc1 is used to encrypt the session key material N1, and the other master key keyid_hmac1 is used to calculate the integrity check value of the entire INVITE instruction content (including the SIP message header and SDP message body) using the keyed cryptographic hash algorithm HMAC. After the SIP session ends, the master key used is marked as invalid and cleared.

[0257] (4) The called party checks the address book to confirm that the called party and himself belong to the same private network for encrypted calls, and then processes the SIP and SDP messages. The master key used for the HMAC of this SIP message is retrieved through netID and keyid_hmac1, and the cryptographic hash value is verified. If the verification fails, the session is terminated. After the verification is correct, the master key of the encrypted session key material is retrieved through netID and keyid_enc1 and decrypted to obtain the session key material N1. The called party calls the key management module to read the n-byte real-time generated hardware random number from the secure SIM card or secure U shield as the session key material N2, and randomly selects two master key ID numbers and corresponding master keys from the master key storage space corresponding to the netID. One of the master keys is used to encrypt the session key material N2, and the other master key is used to calculate the integrity check value of the content of the entire INVITE instruction response message (including the SIP message header and SDP message body) using the keyed cryptographic hash algorithm HMAC. After the SIP session ends, the master key used is marked as invalid and cleared.

[0258] The called party generates a session key and initialization vector based on N1 and N2, and generates an SDP message body for the INVITE, which includes the netID of the private network to which both the caller and the called party belong, two master keys keyid_enc2 and keyid_hmac2, an encrypted message nonce2_encrypted_xxx, a cryptographic hash value hmac2_xxx, a session key verification random number nonce3, and a ciphertext of the verification random number nonce3_encrypted_xxx.

[0259] (5) The caller receives the SIP INVITE response message, and retrieves the master key used for the HMAC of this SIP message through netID and keyid_hmac2, verifies the cryptographic hash value, and terminates the session if the verification fails. After the verification is correct, the master key of the encrypted session key material is retrieved through netID and keyid_enc2, and decrypted to obtain the session key material N2. The caller uses the same method as the called party in (4) to obtain the session key SKEY_key and initialization vector SKEY_iv, decrypts the nonce3 ciphertext and compares it with the plaintext for verification. After the verification is correct, the caller replies to the called party with an ACK message, completing the encrypted SIP three-way handshake.

[0260] (6) The caller and the called party use the session key and initialization vector obtained in the above steps to encrypt the call. The encryption mode is CBC (integer multiple of the algorithm block) + CFB (remainder beyond the integer multiple of the algorithm block). It is transparent to the voice message and does not add any additional length overhead.

[0261] It should be noted that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device), or in conjunction with such instruction execution system, apparatus, or device. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transmit a program for use by an instruction execution system, apparatus, or device, or in conjunction with such instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection portion having one or more wires (electronic device), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and portable compact disc read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing it in another suitable manner if necessary, and then storing it in a computer memory.

[0262] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0263] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0264] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.

[0265] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. A method for implementing end-to-end VoIP encrypted communication based on quantum key pre-injection, It is characterized in that The method is applied to a VoIP terminal, the VoIP terminal serves as a calling party or a called party, a secure storage medium is integrated in the VoIP terminal, and the secure storage medium stores master keys belonging to different secret call private networks, and comprises the following steps: The calling party initiates a SIP session request to the called party who belongs to the same private network as the calling party, wherein the INVITE instruction of the SIP session request includes a SIP message header and an SDP message body, and the extended parameter a field in the SDP message body carries the key negotiation information; The calling party randomly selects two master keys belonging to the secret speech private network to which the called party belongs from the secure storage medium integrated by the calling party; The calling party encrypts the session key material N1 using one of the master keys, and calculates the cryptographic hash value of the INVITE instruction using another of the master keys to obtain the INVITE message of this SIP session, wherein the session key material N1 is a hardware random number generated in real time by the secure storage medium integrated by the calling party; The calling party sends the INVITE message of this SIP session to the called party, so that the called party generates an INVITE response message based on the INVITE message, wherein the INVITE response message carries a session key material N2, a session key and an initialization vector, wherein the session key material N2 is a hardware random number generated in real time by the secure storage medium integrated by the called party; The calling party receives the INVITE response message, decrypts it to obtain the session key material N2, and generates the session key and the initialization vector based on the session key material N1 and the session key material N2; The calling party carries out an encrypted conversation with the called party based on the session key and the initialization vector.

2. The method for implementing end-to-end VoIP encrypted communication based on quantum key pre-injection as claimed in claim 1, It is characterized in that The storage space of the secure storage medium is divided into a plurality of mutually isolated subspaces, each of the subspaces storing a master key belonging to the same secret talk private network, and the same secret talk private network stores the master key with the same key ID identifier; the master key is filled by a quantum key distribution network or by a key agent.

3. The method for implementing end-to-end VoIP encrypted communication based on quantum key pre-injection as claimed in claim 1, It is characterized in that The calling party encrypts the session key material N1 using one of the master keys, and calculates a cryptographic hash value for the INVITE instruction using another of the master keys, to obtain an INVITE message for this SIP session, including: The calling party encrypts the session key material N1 using the master key keyid_enc1 to obtain an encrypted message nonce1_encrypted_xxx; The calling party uses another master key keyid_hmac1 to calculate the cryptographic hash value hmac1_xxx using the cryptographic hash algorithm HMAC with a key on the content of the INVITE instruction; An INVITE message for this SIP session is generated, wherein the SDP message body of the INVITE message includes the private network identifier netID to which both the calling and called parties belong, the master key keyid_enc1, the master key keyid_hmac1, the encrypted message nonce1_encrypted_xxx and the cryptographic hash value hmac1_xxx.

4. The method for implementing end-to-end VoIP encrypted communication based on quantum key pre-injection as claimed in claim 3, It is characterized in that When the VoIP terminal is the called party, the called party generates a session key, an initialization vector and an INVITE response message based on the INVITE message, including: Based on the private network identifier netID and the master key keyid_hmac1, the master key for verifying the cryptographic hash value hmac1_xxx is read from the second secure storage medium integrated by the called party to verify the cryptographic hash value hmac1_xxx; When the verification is passed, based on the private network identifier netID and the master key keyid_enc1, the master key for decrypting the encrypted message nonce1_encrypted_xxx is read from the second secure storage medium integrated by the called party, and the session key material N1 is obtained by decryption; Acquire the hardware data at any time from the second secure storage medium integrated by the called party as the session key material N2; Based on the session key material N1 and the session key material N2, generating the session key and the initialization vector; The INVITE response message is generated based on the session key, the initialization vector and the session key material N2.

5. The method for implementing end-to-end VoIP encrypted communication based on quantum key pre-injection as claimed in claim 4, It is characterized in that The generating the INVITE response message based on the session key, the initialization vector and the session key material N2 includes: Acquire a session key verification random number nonce3 from the secure storage medium integrated by the called party, and encrypt the session key verification random number nonce3 using the session key and the initialization vector to obtain a verification random number ciphertext nonce3_encrypted_xxx; Randomly select two master keys keyid_enc2 and keyid_hmac2 of the private network corresponding to the identifier netID from the secure storage medium integrated by the called party; The session key material N2 is encrypted using the master key keyid_enc2 to obtain an encrypted message nonce2_encrypted_xxx; Calculate the cryptographic hash value hmac2_xxx of the response message using the master key keyid_hmac2; Generate an INVITE response message, the SDP message body of which includes the secret private network identifier netID to which the calling and called parties belong, master keys keyid_enc2 and keyid_hmac2, encrypted message nonce2_encrypted_xxx, cryptographic hash value hmac2_xxx, session key verification random number nonce3, and verification random number ciphertext nonce3_encrypted_xxx.

6. The method for implementing end-to-end VoIP encrypted communication based on quantum key pre-injection as claimed in claim 5, It is characterized in that The calling party receives the INVITE response message and decrypts it to obtain the session key material N2, including: Receive the INVITE response message, and read the master key for verifying the cryptographic hash value hmac2_xxx from the secure storage medium integrated by the caller based on the private network identifier netID and the master key keyid_hmac2 to verify the cryptographic hash value hmac2_xxx; When the verification is passed, based on the private network identifier netID and the master key keyid_enc2, the master key for decrypting the encrypted message nonce2_encrypted_xxx is read from the secure storage medium integrated by the caller, and the session key material N2 is decrypted.

7. The method for implementing end-to-end VoIP encrypted communication based on quantum key pre-injection as claimed in claim 1 or 6, It is characterized in that The generating the session key and the initialization vector based on the session key material N1 and the session key material N2 is specifically: SKEY=HMAC(HASH(N1|N2),call_id_xxx|sessionid_xxx) SKEY_key=HMAC(SKEY,call_id_xxx|sessionid_xxx|0) SKEY_iv=HMAC(SKEY_key,call_id_xxx|sessionid_xxx|1) In the formula: HMAC (x, y) means using x as the key to calculate the keyed hash value of y; SKEY_key is the session key; SKEY_iv is the initialization vector; SKEY is the intermediate result; call_id_xxx is the SIP call ID; sessionid_xxx is the SIP task ID; HASH (N1|N2) is the hash value calculated by concatenating N1 and N2.

8. The method for implementing end-to-end VoIP encrypted communication based on quantum key pre-injection as claimed in claim 6, It is characterized in that The method further comprises: The calling party decrypts the verification random number ciphertext nonce3_encrypted_xxx using the session key and the initialization vector to obtain a plain text; The plain text is compared with the session key verification random number nonce3 for verification, and an ACK message is sent to the called party after the verification is confirmed to be successful.

9. A terminal for end-to-end VoIP encrypted communication based on quantum key pre-injection, It is characterized in that The terminal serves as a calling party, and the terminal integrates a first data transceiver module, a first data encryption and decryption module, a first key management module, and a first secure storage medium, wherein the first secure storage medium stores master keys belonging to different secret call private networks, wherein: The first data transceiver module is used to initiate a SIP session request to a called party that belongs to the same secret speech private network, wherein the INVITE instruction in the SIP session request includes a SIP message header and an SDP message body, and the extended parameter a field in the SDP message body carries key negotiation information; The first key management module is used to randomly select two master keys belonging to the secret call private network to which the called party belongs from the first secure storage medium; The first data encryption and decryption module is used to encrypt the session key material N1 using one of the master keys, and calculate the cryptographic hash value of the INVITE instruction using another of the master keys to obtain the INVITE message of this SIP session, wherein the session key material N1 is a hardware random number generated in real time by the first secure storage medium integrated by the calling party; The first data transceiver module is used to send the INVITE message of this SIP session, so that the called party generates an INVITE response message based on the INVITE message, and the INVITE response message carries a session key material N2, a session key and an initialization vector, and the session key material N2 is a hardware random number generated in real time by the secure storage medium integrated by the called party; The first data transceiver module is used to receive the INVITE response message, and decrypt it through the first data encryption and decryption module to obtain the session key material N2, and generate the session key and the initialization vector based on the session key material N1 and the session key material N2 through the first data encryption and decryption module; The first data transceiver module is used to perform an encrypted conversation with the called party based on the session key and the initialization vector.

10. A terminal for end-to-end VoIP encrypted communication based on quantum key pre-injection, It is characterized in that The terminal serves as the called party, and the terminal is integrated with a second data transceiver module, a second data encryption and decryption module, a second key management module, and a second secure storage medium, wherein: The second data transceiver module is used to receive a SIP session request sent by the calling party, the SIP session request carries an INVITE message, and the SDP message body content of the INVITE message includes the secret private network identifier netID to which the calling party and the called party belong, the master key keyid_enc1, the master key keyid_hmac1, the encrypted message nonce1_encrypted_xxx and the cryptographic hash value hmac1_xxx; The second key management module is used to read the master key for verifying the cryptographic hash value hmac1_xxx from the second secure storage medium integrated by the called party based on the secret call private network identifier netID and the master key keyid_hmac1 to verify the cryptographic hash value hmac1_xxx; The second key management module is used to read the master key for decrypting the encrypted message nonce1_encrypted_xxx from the second secure storage medium integrated by the called party based on the private network identifier netID and the master key keyid_enc1 when the verification is passed, and decrypt to obtain the session key material N1; The second key management module is used to obtain the hardware time data from the second secure storage medium integrated by the called party as the session key material N2; The second data encryption and decryption module is used to generate a session key and an initialization vector based on the session key material N1 and the session key material N2, and to generate the INVITE response message based on the session key, the initialization vector and the session key material N2.

11. An end-to-end VoIP encrypted communication system based on quantum key pre-injection, It is characterized in that The system includes a quantum key distribution network, a service acceptance platform, a first VoIP terminal and a second VoIP terminal, wherein the quantum key distribution network is connected to the service acceptance platform, the first VoIP terminal and the second VoIP terminal respectively, the first VoIP terminal and the second VoIP terminal are connected to the service acceptance platform respectively, and the first VoIP terminal and the second VoIP terminal are integrated with a data transceiver module, a data encryption and decryption module, a key management module and a secure storage medium; The service acceptance platform is used to define a private network for confidential calls, and to register and bind the identities of the first VoIP terminal and the second VoIP terminal; The quantum key distribution network is used to inject the master key into the secure storage medium, and the master keys belonging to the same secret call private network have the same identifier; When the first VoIP terminal or the second VoIP terminal is a calling party, the data transceiver module is used to initiate a SIP session request to a called party belonging to the same secret speech private network, wherein the INVITE instruction in the SIP session request includes a SIP message header and an SDP message body, and the extended parameter a field in the SDP message body carries key negotiation information; The key management module is used to randomly select two master keys belonging to the secret call private network to which the called party belongs from the secure storage medium; The data encryption and decryption module is used to encrypt the session key material N1 using one of the master keys, and calculate the cryptographic hash value of the INVITE instruction using another of the master keys to obtain the INVITE message of this SIP session, wherein the session key material N1 is a hardware random number generated in real time by the secure storage medium integrated by the calling party; The data transceiver module is used to send the INVITE message of this SIP session, so that the called party generates an INVITE response message based on the INVITE message, and the INVITE response message carries a session key material N2, a session key and an initialization vector, and the session key material N2 is a hardware random number generated in real time by the secure storage medium integrated by the called party; The data transceiver module is used to receive the INVITE response message, and decrypt it through the data encryption and decryption module to obtain the session key material N2, and generate the session key and the initialization vector based on the session key material N1 and the session key material N2 through the data encryption and decryption module; The data transceiver module is used to perform an encrypted conversation with the called party based on the session key and the initialization vector.