CN115567209B - VoIP encryption and decryption method by adopting transparent proxy and quantum key pre-filling - Google Patents

VoIP encryption and decryption method by adopting transparent proxy and quantum key pre-filling Download PDF

Info

Publication number
CN115567209B
CN115567209B CN202211198399.XA CN202211198399A CN115567209B CN 115567209 B CN115567209 B CN 115567209B CN 202211198399 A CN202211198399 A CN 202211198399A CN 115567209 B CN115567209 B CN 115567209B
Authority
CN
China
Prior art keywords
key
session key
calling party
encryption
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211198399.XA
Other languages
Chinese (zh)
Other versions
CN115567209A (en
Inventor
罗俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Quantum Technology Co ltd
Original Assignee
China Telecom Quantum Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Quantum Technology Co ltd filed Critical China Telecom Quantum Technology Co ltd
Priority to CN202211198399.XA priority Critical patent/CN115567209B/en
Publication of CN115567209A publication Critical patent/CN115567209A/en
Application granted granted Critical
Publication of CN115567209B publication Critical patent/CN115567209B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0852Quantum cryptography
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a VoIP encryption and decryption method by adopting transparent proxy and quantum key pre-filling, which belongs to the technical field of password application and comprises the following steps: running an encryption agent, and redirecting an INVITE message of the SIP protocol to the SIP_QUEUE QUEUE; reading the INVITE message redirected to the sip_queue QUEUE, and sending a session key application to the management center based on the popped INVITE message; receiving a key application response message forwarded by the management center; based on the ID identification of the master key, acquiring a corresponding master key from a secure storage medium, decrypting and verifying a session key material ciphertext to obtain an INVITE message of a session key skey and a reconstructed SIP protocol; the calling party sends the reconstructed SIP protocol INVITE message to the called party; receiving the INVITE response message and setting transparent encryption rules of RTP voice streams; and the calling party and the called party carry out VoIP encrypted voice communication.

Description

VoIP encryption and decryption method by adopting transparent proxy and quantum key pre-filling
Technical Field
The invention relates to the technical field of password application, in particular to a method for realizing VoIP encryption and decryption by adopting transparent proxy and quantum key pre-filling.
Background
With the development of 5G technology and instant messaging technology, encryption and decryption requirements for VoIP (Voice over Internet Protocol, IP phone) are more and more, and the current solution for VoIP encryption requirements is generally based on public key cryptosystem, and in particular implementation, the VoIP protocol stack and related applications of the terminal need to be modified, so that the key distribution and data stream encryption processing which are completely transparent to the existing VoIP scheme cannot be realized. VoIP encryption systems employing the above conventional implementations currently have the following difficulties in practical use:
(1) The public key cryptosystem has higher complexity, the public key cryptosystem in China also adopts a double-certificate double-key pair system, and the management difficulty of the VoIP encryption system is very high due to the huge number of terminal users, and the application and popularization are limited.
(2) The session key negotiation or distribution process adopts a long-term effective asymmetric encryption key pair and a signature key pair for protection, and one-time encryption is not realized; and the public key has the possibility of being cracked by the continuously developed quantum computer, so that the session key to be transferred is cracked and stolen.
(3) VoIP software or service providers need to be modified to support VoIP encryption, which has a significant impact on existing services.
For example, in related art, chinese patent publication No. CN104243144a describes a communication key distribution method based on an Android intelligent mobile terminal, and by establishing a universal secret communication platform at the bottom layer of an Android operating system, the intelligent mobile terminal has the functions of interacting with a secret communication support network, receiving two-stage keys, decrypting the received service keys, and then using the decrypted service keys. VoIP security telephones, secure short messages, secure video calls, file encrypted transmissions, secure mobile payments, and other communications services requiring security support are supported by retrofitting an intelligent mobile terminal.
In the related art, the chinese patent document with publication number CN111092905a describes a method and a system for encrypted communication based on VoIP, in which a calling terminal holds a first phone number and is preloaded with a first security module, and a called terminal holds a second phone number and is preloaded with a second security module; calling terminal calls background server to create encryption group, and adds calling terminal and called terminal into encryption group; when in call, the calling terminal generates a call key, encrypts the call key by using the first security module to generate a call key ciphertext, and then sends the call key ciphertext to the calling terminal; the called terminal adopts a second security module to decrypt the cipher text of the call key to obtain the call key; and finally, the calling terminal and the called terminal carry out encrypted call based on the call key.
The scheme adopts a special encrypted call client to complete VoIP encryption, and the existing VoIP call scheme is required to be modified; and the key distribution process is not sufficiently secure, the session key is unilaterally generated by the initiator.
The Chinese patent document with publication number of CN102970448A describes a VoIP voice access method suitable for FDMA/DAMA satellite communication system, which accesses voice service carried by IP into FDMA/DAMA satellite communication system by intercepting data packet, applying communication resource, distributing communication resource, two-way voice communication, applying to release communication resource, releasing communication resource and other processes, and the IP voice automatic access process is completely transparent to voice gateway.
The scheme adopts a data packet interception mode to realize a satellite channel VoIP access scheme, the data packet interception is a common sense means, and different system and protocol specific implementation modes are different, but the implementation mode of the data packet interception technology is not taught; the method needs to establish a VoIP satellite link.
Disclosure of Invention
The technical problem to be solved by the invention is how to simply and efficiently realize encryption and decryption of VoIP audio and video data, which is transparent to VoIP application.
The invention solves the technical problems by the following technical means:
In a first aspect, the present invention provides a method for implementing VoIP encryption and decryption by adopting transparent proxy and quantum key pre-charging, where the method is applied to a VoIP terminal, a secure storage medium is integrated in the VoIP terminal, a master key pre-charged by a quantum key distribution network is stored in the secure storage medium, and when the VoIP terminal is used as a calling party, the method includes the following steps:
the calling party runs the encryption agent and redirects the INVITE message of the SIP protocol to the SIP_QUEUE QUEUE;
the method comprises the steps that a calling party reads an INVITE message redirected to an SIP_QUEUE QUEUE, and sends a session key application to a management center based on the popped INVITE message, so that the management center forwards the session key application to a QKD network node, wherein the session key application comprises an address of a calling party and a called party, an ID (identity) of a first master key and a check value obtained by checking and calculating the session key application by utilizing the first master key, and the first master key is stored in a secure storage medium;
a calling party receives a key application response message forwarded by the management center, wherein the key application response message is generated by the QKD network node, and the key application response message comprises a session key material ciphertext of a calling party and a called party, a session key material check value of the calling party and the called party and an ID (identity) identification of a second main key adopted by encryption and check of the calling party and the called party, and the second main key is a quantum key corresponding to the ID of the calling party and the called party in the quantum key distribution network;
The calling party obtains a corresponding master key from the integrated safe storage medium based on the ID identification of the second master key, decrypts and verifies the session key material ciphertext to obtain a session key skey and reconstructs an INVITE message of the SIP protocol;
the calling party sends the reconstructed SIP protocol INVITE message to the called party so as to enable the called Fang Shengcheng to obtain the session key skey and an INVITE response message, wherein the RTP ports of the calling party and the called party are written in the media field of the INVITE response message, and the expansion parameter a field is added;
the calling party receives the INVITE response message, redirects the INVITE response message to a push stack of a SIP_QUEUE QUEUE, reads RTP protocol ports of the calling party and the called party written in a media field in the INVITE response message, and sets RTP voice stream transparent encryption rules;
and the calling party and the called party carry out VoIP encrypted voice communication based on the session key skey and the RTP voice stream transparent encryption rule.
The invention pre-fills and uses the large-capacity master key generated by the quantum key distribution network QKD in the VoIP terminal, and the key management system based on the QKD network and the management center is completely separated from the key management system of the VoIP terminal, so that the invention has no coupling relation, and is simple and efficient; the large-capacity master key generated by the quantum key distribution network QKD is pre-filled and used, so that one-time pad in the key distribution protection process in the true sense is realized, and the security of the whole system is enhanced from the top layer; and the encryption agent which is completely transparent to the VOIP application is operated in the VoIP terminal, and the audio and video encryption of the VoIP terminal is realized under the condition of no influence and zero modification to the VoIP protocol stack and the application.
In a second aspect, the present invention provides a method for implementing VoIP encryption and decryption by adopting transparent proxy and quantum key pre-charging, the method is applied to a VoIP terminal, a secure storage medium is integrated in the VoIP terminal, a master key pre-charged by a quantum key distribution network is stored in the secure storage medium, and when the VoIP terminal is used as a called party, the method includes the following steps:
the called party receives a reconstructed SIP protocol INVITE message sent by the calling party, an expansion parameter a field is added in an SDP message body of the reconstructed SIP protocol INVITE message and is used for bearing session key related information, and the session key related information comprises a session key material ciphertext of the called party, a session key material check value of the called party, an ID (identity) of a second main key adopted by the called Fang Jiami and the check, a verification random number generated by a safe storage medium integrated by the calling party in real time and a first verification random number ciphertext encrypted by a session key skey generated by the calling party;
the called party runs the encryption agent and redirects the reconstructed SIP protocol INVITE message which is stacked to the SIP_QUEUE QUEUE;
regenerating the session key skey based on the reconstructed SIP protocol INVITE message, and decrypting and verifying the first verification random number ciphertext;
After verification, removing key related information added by a calling party in the reconstructed SIP protocol INVITE message to obtain an original SIP protocol INVITE message;
the called party responds to the original INVITE message of the SIP protocol, and operates the encrypted proxy to redirect to the INVITE response message popped from the SIP_QUEUE QUEUE;
reading RTP protocol ports of the calling party and the called party in a media field in the INVITE response message, and setting transparent encryption rules of RTP voice streams;
and adding an extension parameter a field in an SDP message body of the INVITE response message, which is used for bearing the information related to the verification of the session key, and placing the reconstructed INVITE response message into a protocol stack and sending the reconstructed INVITE response message to a calling party.
In a third aspect, the present invention provides a method for implementing VoIP encryption and decryption by adopting transparent proxy and quantum key pre-filling, the method being applied to a quantum key distribution network, comprising the steps of:
receiving a session key application forwarded by a management center through a QKD network node, wherein the session key application is generated by a calling party, the session key application comprises an address of a calling party and a called party, an ID (identity) of a first master key and a verification value obtained by utilizing the first master key to carry out verification calculation on the session key application, and the first master key is any master key stored in a safe storage medium integrated by the calling party;
According to the ID identification of the first master key, a master key corresponding to a calling party is taken out, and HMAC integrity verification is carried out on the content of the session key application;
after verification, calling a quantum random number generator to generate session key materials of the calling party and the called party in real time;
randomly adopting any main key corresponding to a calling party and a called party as a second main key, and respectively encrypting the session key material and checking the HMAC integrity;
and generating a key application response message, wherein the key application response message comprises a session key material ciphertext of the calling party and the called party, a session key material check value of the calling party and the called party, and an ID (identity) identification of a second main key adopted by encryption and check of the calling party and the called party.
In a fourth aspect, the present invention provides a VoIP terminal, in which a first encryption agent module, a first key management module, a first secure storage medium, and a first data transceiver module are integrated, the first encryption agent module includes an encryption agent running in a user space and an encryptt/DECRYPT transparent encryption and decryption module running in a kernel space, and a master key pre-filled by a quantum key distribution network is stored in the first secure storage medium;
The first encryption agent module is used for running the encryption agent program and redirecting the INVITE message of the SIP protocol to an SIP_QUEUE QUEUE;
the first data transceiver module is configured to read an INVITE message redirected to a sip_queue, and send a session key application to a management center based on the popped INVITE message, so that the management center forwards the session key application to a QKD network node, where the session key application includes an address of a calling party and a called party, an ID identifier of a first master key, and a check value obtained by performing check computation on the session key application by using the first master key, and the first master key is stored in the secure storage medium;
the first data transceiver module is configured to receive a key application response message forwarded by the management center, where the key application response message is generated by the QKD network node, and the key application response message includes a session key material ciphertext of a calling party and a called party, a session key material check value of the calling party and the called party, and an ID identifier of a second master key adopted by encryption and check of the calling party and the called party, where the second master key is a quantum key corresponding to the identifier of the calling party and the called party in the quantum key distribution network;
The first key management module is configured to obtain a corresponding master key from the integrated secure storage medium based on the ID identifier of the second master key, decrypt and verify the session key material ciphertext, and obtain an INVITE message of the session key skey and the reconstructed SIP protocol;
the first data transceiver module is configured to send a reconstructed SIP protocol INVITE message to a called party, so that the called Fang Shengcheng uses the session key skey and an INVITE response message, and an RTP protocol port of the calling party and the called party is written in a media field in the INVITE response message, and an extension parameter a field is added; and the RTP protocol ports of the calling party and the called party written in the media field in the INVITE response message are read, and RTP voice stream transparent encryption rules are set; and the transparent encryption and decryption module is used for carrying out VoIP encrypted voice communication and calling the transparent encryption and decryption module to carry out transparent encryption and decryption on the data message.
In a fifth aspect, the present invention proposes a VoIP terminal, in which a second encryption agent module, a second key management module, a second secure storage medium, and a second data transceiver module are integrated, the second encryption agent module including an encryption agent running in a user space and an ENCRYPT transparent encryption/decryption module running in a kernel space, the second secure storage medium storing a master key pre-charged by a quantum key distribution network;
The second data transceiver module is configured to receive a reconstructed SIP protocol INVITE message sent by a calling party, where an extension parameter a field is added to an SDP message body of the reconstructed SIP protocol INVITE message, and the session key related information is used to carry session key related information, where the session key related information includes a session key material ciphertext of a called party, a session key material check value of the called party, an ID identifier of a second master key used for the called Fang Jiami and the check, a verification random number generated in real time by the secure storage medium integrated by the calling party, and a first verification random number ciphertext encrypted by a session key generated by the calling party;
the second encryption agent module is used for running the encryption agent program and redirecting the reconstructed SIP protocol INVITE message which is stacked to the SIP_QUEUE QUEUE;
the second key management module is configured to regenerate the session key skey based on the reconstructed SIP protocol INVITE message, and decrypt and verify the first verification random number ciphertext; after verification, removing key related information added by a calling party in the reconstructed SIP protocol INVITE message to obtain an original SIP protocol INVITE message;
the second data transceiver module is configured to respond to the original INVITE message of the SIP protocol, and run the INVITE response message redirected to the sip_queue stack by the encryption agent; reading RTP protocol ports of the calling party and the called party in a media field in the INVITE response message, and setting transparent encryption rules of RTP voice streams; and adding an extension parameter a field in the SDP message body of the INVITE response message, which is used for bearing the related information of the session key verification, and sending the reconstructed INVITE response message to the calling party by putting the reconstructed INVITE response message into a protocol stack.
In a sixth aspect, the present invention provides a VoIP encryption and decryption system implemented by transparent proxy and quantum key pre-filling, where the system includes a first VoIP terminal, a second VoIP terminal, a management center, and a quantum key distribution network, where the first VoIP terminal, the second VoIP terminal, and the management center are all connected to the quantum key distribution network, and the first VoIP terminal and the second VoIP terminal are integrated with an encryption proxy module, a key management module, a secure storage medium, and a data transceiver module, and the secure storage medium stores a master key pre-filled by the quantum key distribution network;
the first VoIP terminal calls the encryption agent module, runs the encryption agent program, and redirects an INVITE message of the SIP protocol to an SIP_QUEUE QUEUE;
the first VoIP terminal invokes the data receiving and transmitting module, reads the INVITE message redirected to the SIP_QUEUE QUEUE, and sends a session key application to a management center based on the popped INVITE message;
the management center forwarding the session key application to a QKD node in the quantum key distribution network;
the QKD node generates a key application response message based on the session key application, and forwards the key application message to the first VoIP terminal through the management center, wherein the key application response message comprises a session key material ciphertext of a calling party and a called party, a session key material check value of the calling party and the called party, and an ID (identity) identification of a second main key adopted by encryption and check of the calling party and the called party, and the second main key is a quantum key corresponding to the ID of the calling party and the called party in the quantum key distribution network;
The first VoIP terminal calls the key management module, acquires a corresponding master key from the integrated secure storage medium based on the ID identification of the second master key, decrypts and verifies the session key material ciphertext to obtain an INVITE message of a session key skey and a reconstructed SIP protocol;
the first VoIP terminal invokes the data transceiver module to send a reconstructed SIP protocol INVITE message to the first VoIP terminal, so that the called Fang Shengcheng uses the session key skey and an INVITE response message, media fields in the INVITE response message are written with RTP protocol ports of both the calling party and the called party, and an extension parameter a field is added
The first VoIP terminal calls the data receiving and transmitting module, receives the INVITE response message, redirects the INVITE response message to the push stack of the SIP_QUEUE QUEUE, reads RTP protocol ports of the calling party and the called party written in a media field in the INVITE response message, sets transparent encryption rules of RTP voice streams, and carries out VoIP encrypted voice communication with the second VoIP terminal.
The invention has the advantages that:
(1) The invention uses the large-capacity master key generated by the QKD network (Quantum key Distribution ) to pre-charge in the VoIP terminal, the key management system based on the QKD network and the management center is completely separated from the key management system of the VoIP terminal, and the key management system has no coupling relation, and is simple and efficient; the large-capacity master key generated by the quantum key distribution network QKD is pre-filled and used, so that one-time pad in the key distribution protection process in the true sense is realized, and the security of the whole system is enhanced from the top layer; and the encryption agent which is completely transparent to the VoIP application is operated in the VoIP terminal, and the audio and video encryption of the VoIP terminal is realized under the condition of no influence and zero modification to the VoIP protocol stack and the application.
And because the scheme of the invention is based on transparent proxy, the key distribution system is not directly related to the VoIP communication system, so that the VoIP software or the service provider does not need to be modified to support VoIP encryption.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
Fig. 1 is a schematic flow chart of a VoIP encryption and decryption method implemented by adopting transparent proxy and quantum key pre-filling according to a first embodiment of the present invention;
fig. 2 is a schematic flow chart of a VoIP encryption and decryption method implemented by adopting transparent proxy and quantum key pre-filling according to a second embodiment of the present invention;
fig. 3 is a schematic flow chart of a VoIP encryption and decryption method implemented by adopting transparent proxy and quantum key pre-filling according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a VoIP terminal according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a VoIP terminal according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a VoIP encryption and decryption system implemented by adopting transparent proxy and quantum key pre-filling according to a sixth embodiment of the present invention;
fig. 7 is a functional block diagram of a VoIP encryption and decryption system implemented by using transparent proxy and quantum key pre-filling according to a sixth embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described in the following in conjunction with the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
As shown in fig. 1, a first embodiment of the present invention proposes a method for implementing VoIP encryption and decryption by using transparent proxy and quantum key pre-charging, where the method is applied to a VoIP terminal, a secure storage medium is integrated in the VoIP terminal, a master key pre-charged by a quantum key distribution network is stored in the secure storage medium, and when the VoIP terminal is used as a calling party, the method includes the following steps:
s101, a calling party runs an encryption agent, and redirects an INVITE message of an SIP protocol to an SIP_QUEUE QUEUE;
it should be noted that, the VoIP terminal may use a Linux system or an Android system, and run a transparent proxy program and a transparent encryption and decryption program based on iptables/netfilters and a queue mechanism on the Linux system or the Android system, and the VoIP terminal runs an encryption proxy program, and the encryption proxy program executes an operating system related instruction to redirect an INVITE message of the SIP protocol to the encryption proxy. The Android system needs to obtain root rights, the Linux system and the Android system execute the following commands to redirect the INVITE message of the SIP protocol to a user space, and the encryption agent processes the INVITE message of the SIP protocol and then reenters a protocol stack to process according to a normal flow:
iptables-A OUTPUT-p udp-m string--from 0–-to 10--algo bm--string'INVITE sip'-j NFQUEUE--queue-num SIP_QUEUE
iptables-A INPUT-p udp-m string--from 0–-to 10--algo bm--string'INVITE sip'-j NFQUEUE--queue-num SIP_QUEUE
iptables-A OUTPUT-p udp-m string--from 0–-to 10--algo bm--string'SIP/2.0 200OK'-j NFQUEUE--queue-num SIP_QUEUE
iptables-A INPUT-p udp-m string--from 0–-to 10--algo bm--string'SIP/2.0 200OK'-j NFQUEUE--queue-num SIP_QUEUE
iptables-A OUTPUT-p udp-m string--from 0–-to 10--algo bm--string'BYE'-jNFQUEUE--queue-num SIP_QUEUE
iptables-A INPUT-p udp-m string--from 0–-to 10--algo bm--string'BYE'-j NFQUEUE--queue-num SIP_QUEUE
iptables-A OUTPUT-p udp-m string--from 0–-to 10--algo bm--string'CANCEL'-j NFQUEUE--queue-num SIP_QUEUE
iptables-A INPUT-p udp-m string--from 0–-to 10--algo bm--string'CANCEL'-j NFQUEUE--queue-num SIP_QUEUE
S102, a calling party reads an INVITE message redirected to an SIP_QUEUE QUEUE, and sends a session key application to a management center based on the popped INVITE message, so that the management center forwards the session key application to a QKD network node, wherein the session key application comprises an address of a calling party and a called party, an ID (identity) of a first master key and a check value obtained by checking and calculating the session key application by utilizing the first master key, and the first master key is stored in a secure storage medium;
specifically, the encryption agent running on the VoIP terminal calls the libnetfilter_queue function library to read the INVITE message redirected to the SIP protocol in the sip_queue QUEUE. And triggering a session key application for an INVITE message of a pop (OUTPUT) in an encryption agent program of a calling party, and sending the session key application message to a management center.
The session key application message is used for applying and obtaining a session key between the VoIP terminals pointed by the FROM and the TO, the content of the key application message comprises the addresses of the VoIP terminals pointed by the FROM and the TO, and the key application message is subjected TO HMAC integrity check calculation by randomly adopting any master key in a secure storage medium in the terminal, and a check value and a used first master key ID are attached TO the message.
It should be noted that the HMAC algorithm is a message authentication code algorithm based on a secret key, which is called Hash-based Message Authentication Code.
Specifically, the management center forwards the received session key application message to a node of the QKD network, the QKD network node takes out the corresponding main key of the calling party from the QKD network according to the ID identification of the first main key of the calling party, carries out HMAC verification on the content of the key application message, calls a quantum random number generator to generate session key materials in real time after verification, randomly acquires any main key corresponding to the calling party and the called party from the QKD network respectively as a second main key, and then encrypts the key materials by using the second main key and carries out HMAC integrity verification; and then forming a key application response message based on the session key material ciphertext of the calling party and the called party, the check value of the calling party and the called party and the ID identification of the second main key adopted by encryption and check of the calling party and the called party, and sending the key application response message to the management center.
S103, a calling party receives a key application response message forwarded by the management center, wherein the key application response message is generated by the QKD network node, and the key application response message comprises a session key material ciphertext of a calling party and a called party, a session key material check value of the calling party and the called party and an ID (identity) identification of a second main key adopted by encryption and check of the calling party and the called party, and the second main key is a quantum key corresponding to the ID of the calling party and the called party in the quantum key distribution network;
S104, the calling party obtains a corresponding master key from the integrated safe storage medium based on the ID identification of the second master key, decrypts and verifies the session key material ciphertext to obtain a session key skey and reconstructs an INVITE message of the SIP protocol;
after receiving the key application response message, the calling party firstly obtains a corresponding master key from the integrated security storage medium according to the ID identification of the second master key, and the corresponding master key is used for decrypting the material ciphertext of the session key and performing HMAC verification; and when the verification is passed, reconstructing the INVITE message of the SIP protocol, and if the verification is not passed, terminating the call.
S105, the calling party sends the reconstructed SIP protocol INVITE message to the called party so that the called Fang Shengcheng can obtain the session key skey and the INVITE response message, wherein the RTP ports of the calling party and the called party are written in the media field of the INVITE response message, and the expansion parameter a field is added;
specifically, after receiving the reconstructed SIP protocol INVITE message, the called party reads the reconstructed SIP protocol INVITE message redirected to a push-in stack (INPUT) of the sip_queue by using an encryption agent program operated by the called party, and obtains a corresponding master key from an integrated secure storage medium according to an ID identification of a second master key in the INVITE message, so as to decrypt a session key material ciphertext and perform HMAC verification; and when the verification is passed, reconstructing the INVITE message of the SIP protocol, removing the key related information added by the calling party, recovering the original INVITE message to be received by the called party, and if the verification is not passed, terminating the call.
The called party receives the original INVITE message, reconstructs the INVITE message, adds an expansion parameter a field for bearing the relevant information of session key verification, obtains an INVITE response message and sends the INVITE response message to the calling party.
S106, the calling party receives the INVITE response message, redirects the INVITE response message to the push stack of the SIP_QUEUE QUEUE, reads RTP protocol ports of the calling party and the called party written in a media field in the INVITE response message, and sets RTP voice stream transparent encryption rules;
s107, the calling party and the called party carry out VoIP encrypted voice communication based on the session key skey and the RTP voice stream transparent encryption rule.
The large-capacity master key generated by the QKD network (Quantum key Distribution ) is pre-filled and used in the VoIP terminal, the key management system based on the QKD network and the management center is completely separated from the key management system of the VoIP terminal, and the key management system is not coupled, so that the method is simple and efficient; the large-capacity master key generated by the quantum key distribution network QKD is pre-filled and used, so that one-time pad in the key distribution protection process in the true sense is realized, and the security of the whole system is enhanced from the top layer; and the encryption agent which is completely transparent to the VoIP application is operated in the VoIP terminal, and the audio and video encryption of the VoIP terminal is realized under the condition of no influence and zero modification to the VoIP protocol stack and the application.
The differences from the scheme described in the chinese patent publication No. CN111092905a are: the scheme of the embodiment realizes the transparent transformation from the existing VoIP clear call to the secret call through the transparent encryption proxy and the message redirection technology, and the key distribution and the voice data encryption and decryption processes are realized transparently on the basis of the existing VoIP protocol stack and application, thereby intervening in zero business; in addition, the scheme of the embodiment adopts the pre-filled quantum key to realize one-time pad in the key distribution process, and the session key is generated by negotiation of both parties, so that the protection intensity is high.
The scheme described in the Chinese patent publication No. CN102970448A is different from that: according to the embodiment, interception and processing of the data packet are realized by adopting a netfilter packet filtering and redirecting mechanism of a Linux or Android system based on Linux and a communication mode in an ip_queue system, and the data packet is transparent to a VoIP protocol stack and application; the scheme is used for establishing an encrypted link, wherein the encrypted link is a virtual link, and a new physical link cannot be established based on an original VoIP communication link.
In this embodiment, a large-capacity secure storage medium such as a special secure SIM card (for a smart phone) or a secure U-shield (for a personal computer) is provided for the VoIP terminal, and a large number of master keys are pre-charged to the secure SIM card or the secure U-shield representing different QKD identities UIDs through the QKD network, and the key format is a 4-byte key id+n-byte key and an n-byte initialization vector.
It should be understood that the value of n is related to the encryption algorithm used, and the present embodiment is not particularly limited.
In the case where the VoIP terminal cannot directly perform key filling at the node of the QKD network, the proxy function of the key filling may be provided by the key proxy.
It should be appreciated that the key distribution system or device employed in this embodiment is based on, but not limited to, a QKD key distribution network, and that the key pre-filling functionality involved may be implemented using any symmetric key management system or device.
In one embodiment, in the step S101: the calling party runs the encryption agent and before redirecting the INVITE message of the SIP protocol to the sip_queue, the method further comprises the steps of:
sending a registration request to the management center;
and receiving the binding relation between the VoIP terminal address returned by the management center and the QKD identity UID.
The management center is used for providing registration and identity binding service of the VoIP terminal, binding different QKD identity UIDs for different VoIP terminals and VoIP addresses, and being responsible for forwarding session key requests and responses between the quantum key distribution network and the VoIP terminal.
In one embodiment, in the step S101: the calling party runs the encryption agent and before redirecting the INVITE message of the SIP protocol to the sip_queue, the method further comprises the steps of:
The calling party runs an initialization program to carry out integrity check on the safe storage medium;
upon passing the check, obtaining authorization to use the master key stored within the secure storage medium.
After the secure storage medium is inserted into the VoIP terminal, the initialization program is run to perform integrity check on the secure storage medium, and usage authorization of the master key stored in the secure storage medium is obtained through PIN code verification and other modes, so as to ensure that the secure storage medium is in an available state before dialing an encrypted VoIP phone.
In one embodiment, the step S104: the calling party obtains a corresponding master key from the integrated secure storage medium based on the ID identification of the second master key, decrypts and verifies the session key material ciphertext to obtain an INVITE message of a session key skey and a reconstructed SIP protocol, and the method comprises the following steps:
s141, acquiring a corresponding master key from the integrated secure storage medium according to the ID identification of the second master key, wherein the acquired corresponding master key comprises a decryption master key and a verification master key;
s142, decrypting the session key material ciphertext of the calling party by using the decryption master key to obtain a session key material of the calling party;
S143, verifying the session key material verification value of the calling party by using the verification master key, and determining that the verification is passed;
s144, adopting a cipher function conforming to forward security, and obtaining a session key skey based on the session key material transformation;
s145, adding an expansion parameter a field in an SDP message body of the INVITE message to obtain a reconstructed INVITE message of the SIP protocol, wherein the expansion parameter a field carries session key related information, and the session key related information comprises a session key material ciphertext of a called party, a session key material check value of the called party, ID identification of a second main key adopted by the called Fang Jiami and the check, a verification random number generated by a security storage medium integrated by a calling party in real time and a first verification random number ciphertext encrypted by the session key skey.
It should be noted that, the calling party adds an extension parameter a field to carry the session key related information in SDP (session description protocol) of the INVITE message:
a=nonce:keyid_enc nonce_encrypted_xxx
a=hmac:keyid_mac nonce_hmac_xxx
a=verify noncev+noncev_encrypted_xxx
namely, the ID identification of the second main key used for encryption of the called party, the cipher text of the session key material encrypted by the second main key, the ID identification of the second main key used for calculating the HMAC, the HMAC check value of the session key material calculated by the second main key, the verification random number generated in real time and the first verification random number cipher text encrypted by the session key skey are taken out from the response message. And then calling an interface function to put the reconstructed INVITE message into a protocol stack and send the INVITE message to a called party, and generating an INVITE response message by the called party.
In one embodiment, after receiving the reconstructed SIP INVITE message, the called party reads the reconstructed INVITE message redirected to the push (INPUT) of the sip_queue, retrieves the corresponding master key from the message according to the second master key ID, performs HMAC verification and decrypts the key material, and transforms the session key skey based on the key material and is used for decrypting the verification random number. After the verification is passed, the key related information added in the message about the calling party proxy is removed, and the original SIP message is restored and put into a protocol stack to be accepted by the called party.
After the called party receives the original INVITE message, the encryption agent program running on the called party reads the INVITE response message redirected to the Outbound (OUTPUT) of the sip_queue, reconstructs the message, and adds an extension parameter a field to bear the relevant information of session key verification:
a=verify noncev+noncev_encrypted_xxx
i.e. adding the second authentication random number generated in real time and the second authentication random number ciphertext encrypted with the session key skey. And then calling an interface function to put the reconstructed INVITE response message into a protocol stack and send the INVITE response message to the calling party.
Meanwhile, the CALLED party reads RTP protocol ports RTP-CALL/RTP-CALLED of the calling party and the CALLED party according to media fields (m fields) in the INVITE and response messages, and sets an RTP voice stream encryption rule:
iptables-t mangle-A OUTPUT-p udp–dport RTP-CALL-j ENCRYPT–-key skey–-iv iv
iptables-t mangle-A INPUT-p udp–dport RTP-CALLED-j DECRYPT–-key skey–-iv
The encryption modes are CBC (integer multiple of the algorithm packet length) +OFB (algorithm packet length mantissa).
In an embodiment, the extension parameter a field in the INVITE response message carries session key verification information, where the session key verification information includes a verification random number generated in real time by the secure storage medium integrated by the called party and a second verification random number ciphertext obtained by encrypting the session key skey generated by the called party.
Accordingly, the step S105: the calling party receives the INVITE response message, redirects the INVITE response message to the push stack of the SIP_QUEUE QUEUE, reads RTP protocol ports of the calling party and the called party written in a media field in the INVITE response message, and sets RTP voice stream transparent encryption rules, comprising the following steps:
s151, the calling party runs an encryption agent and reads the INVITE response message redirected to the push stack of the SIP_QUEUE QUEUE;
s152, the calling party uses the generated session key skey to decrypt and verify the second verification random number ciphertext;
After verification is passed, reconstructing the INVITE response message, removing key related information added by the called party proxy in the message, and restoring the INVITE response message of the original SIP to be put into a protocol stack to be accepted by a calling party; if the verification is passed, the call is terminated.
S153, after verification is passed, obtaining an INVITE original response message by key verification information added by a called party in the INVITE response message by a calling party Fang Qudiao;
s154, RTP protocol ports of the calling party and the called party written in a media field in the INVITE original response message are set by the calling party Fang Douqu, and RTP voice stream transparent encryption rules are set.
The calling party reads RTP protocol ports RTP-CALL/RTP-CALLED of the calling party and the CALLED party according to media fields (m fields) in the INVITE and response messages, and sets an RTP voice stream encryption rule:
iptables-t mangle-A OUTPUT-p udp–dport RTP-CALLED-j ENCRYPT–-key skey–-iv iv
iptables-t mangle-A INPUT-p udp–dport RTP-CALL-j DECRYPT–-key skey–-iv iv
the encryption modes are CBC (integer multiple of the algorithm packet length) +OFB (algorithm packet length mantissa).
In one embodiment, the calling party and the called party perform encrypted VoIP voice communication based on the session key skey, and only encrypt the data content by adopting a transparent encryption and decryption mode of CBC (integer multiple of algorithm packet length) +ofb (algorithm packet length mantissa), without affecting the frame header control field.
In an embodiment, the method further comprises the steps of:
when the call between the calling party and the called party is terminated, the calling party operates the encryption agent to read a BYE message or a CANCEL message redirected to the SIP_QUEUE QUEUE;
deleting the RTP voice stream transparent encryption rule, clearing the session key skey, and then re-stacking and sending a BYE message or a CANCEL message.
In one embodiment, after each SIP session is completed, the calling party, the called party, and the QKD network node clear the used master key.
Example 2
As shown in fig. 2, a second embodiment of the present invention proposes a method for implementing VoIP encryption and decryption by adopting transparent proxy and quantum key pre-charging, where the method is applied to a VoIP terminal, a secure storage medium is integrated in the VoIP terminal, a master key pre-charged by a quantum key distribution network is stored in the secure storage medium, and when the VoIP terminal is used as a called party, the method includes the following steps:
s201, a called party receives a reconstructed SIP protocol INVITE message sent by a calling party, an expansion parameter a field is added in an SDP message body of the reconstructed SIP protocol INVITE message and is used for bearing added session key related information, and the session key related information comprises a session key material ciphertext of the called party, a session key material check value of the called party, ID identification of a second main key adopted by the called Fang Jiami and the check, a verification random number generated by a safe storage medium integrated by the calling party in real time and a first verification random number ciphertext encrypted by a session key generated by the calling party;
S202, the called party runs an encryption agent and redirects the reconstructed SIP protocol INVITE message which is stacked to a SIP_QUEUE QUEUE;
s203, regenerating the session key skey based on the reconstructed SIP protocol INVITE message, and decrypting and verifying the first verification random number ciphertext;
s204, after the verification is passed, removing key related information added by a calling party in the reconstructed SIP protocol INVITE message to obtain an original SIP protocol INVITE message;
s205, the called party responds to the original INVITE message of the SIP protocol, and operates the encryption agent to redirect to the INVITE response message popped from the SIP_QUEUE QUEUE;
s206, reading RTP protocol ports of the calling party and the called party in a media field in the INVITE response message, and setting transparent encryption rules of RTP voice streams;
it should be noted that, the CALLED party reads the RTP protocol ports RTP-CALL/RTP-CALL of the calling party and the CALLED party according to the media field (m field) in the INVITE response message, and sets the RTP voice stream encryption rule:
iptables-t mangle-A OUTPUT-p udp–dport RTP-CALL-j ENCRYPT–-key skey–-iv iv
iptables-t mangle-A INPUT-p udp–dport RTP-CALLED-j DECRYPT–-key skey–-iv
the encryption modes are CBC (integer multiple of the algorithm packet length) +OFB (algorithm packet length mantissa).
S207, an expansion parameter a field is added in an SDP message body of the INVITE response message and used for bearing the related information of the session key verification, and the reconstructed INVITE response message is put in a protocol stack and sent to a calling party.
It should be noted that, the calling party receives the reconstructed INVITE response message returned by the called party, redirects the INVITE response message to the push stack of the sip_queue, reads the RTP protocol ports of the calling party and the called party written in the media field in the INVITE response message, and sets the transparent encryption rule of the RTP voice stream; and then, the calling party and the called party carry out VoIP encrypted voice communication based on the session key skey and the RTP voice stream transparent encryption rule.
The large-capacity master key generated by the QKD network is pre-filled and used in the VoIP terminal, the key management system based on the QKD network and the management center is completely separated from the key management system of the VoIP terminal, and the key management system has no coupling relation, so that the method is simple and efficient; the large-capacity master key generated by the quantum key distribution network QKD is pre-filled and used, so that one-time pad in the key distribution protection process in the true sense is realized, and the security of the whole system is enhanced from the top layer; and the encryption agent which is completely transparent to the VoIP application is operated in the VoIP terminal, and the audio and video encryption of the VoIP terminal is realized under the condition of no influence and zero modification to the VoIP protocol stack and the application.
In one embodiment, the step S203: regenerating the session key skey based on the reconstructed SIP protocol INVITE message, and decrypting and verifying the first verification random number ciphertext, wherein the method comprises the following steps of:
s231, acquiring a corresponding master key from the secure storage medium integrated by the called party according to the ID identification of the second master key, wherein the acquired corresponding master key comprises a decryption master key and a verification master key;
s232, decrypting the session key material ciphertext of the called party by using the decryption master key to obtain a session key material of the called party;
s233, verifying the session key material verification value of the called party by using a verification master key, and determining that the verification is passed;
s234, a cipher function conforming to forward security is adopted, and a session key skey is obtained based on the session key material transformation;
s234, decrypting and verifying the first verification random number ciphertext based on the session key skey.
It should be understood that after the verification is passed, the called party reconstructs the message of the SIP protocol, removes the key related information added by the calling party proxy, restores the NVITE message of the original SIP protocol, and puts the message into the protocol stack to be accepted by the called party; if the verification is not passed, the call is terminated.
In one embodiment, the step S207: an extension parameter a field is added in an SDP message body of the INVITE response message, and is used for bearing the relevant information of session key verification, and the reconstructed INVITE response message is put into a protocol stack and sent to a calling party, and the method specifically comprises the following steps:
s271, the called party responds to the original INVITE message, and the encryption agent running thereon reads the original INVITE response message redirected to the Outbound (OUTPUT) of the sip_queue, reconstructs the original INVITE response message, and adds an extension parameter a field to carry session key verification related information:
a=verify noncev+noncev_encrypted_xxx
i.e. adding a second authentication random number generated in real time by the secure storage medium integrated by the called party and a second authentication random number ciphertext encrypted with the session key skey generated by the called party.
And S272, calling an interface function to put the reconstructed NVITE response message into a protocol stack and send the message to the calling party.
In one embodiment, in the step S201: before the called party receives the reconstructed SIP protocol INVITE message sent by the calling party, the method further includes the following steps:
sending a registration request to the management center;
and receiving the binding relation between the VoIP terminal address returned by the management center and the QKD identity UID.
In one embodiment, in the step S201: before the called party receives the reconstructed SIP protocol INVITE message sent by the calling party, the method further includes the following steps:
the called party runs an initialization program to carry out integrity check on the secure storage medium;
and when the check passes, acquiring the use authorization of the master key stored in the secure storage medium integrated by the called party.
In an embodiment, the method further comprises the steps of:
when the call between the calling party and the called party is terminated, the called party operates the encryption agent to read a BYE message or a CANCEL message redirected to the SIP_QUEUE QUEUE;
deleting the RTP voice stream transparent encryption rule, clearing the session key skey, and then re-stacking and sending a BYE message or a CANCEL message.
Example 3
As shown in fig. 3, the third embodiment of the present invention further provides a method for implementing VoIP encryption and decryption by using transparent proxy and quantum key pre-filling, where the method is applied to a quantum key distribution network, and includes the following steps:
s301, receiving a session key application forwarded by a management center through a QKD network node, wherein the session key application is generated by a calling party, the session key application comprises an address of a calling party and a called party, an ID (identity) of a first master key and a verification value obtained by utilizing the first master key to carry out verification calculation on the session key application, and the first master key is any master key stored in a safe storage medium integrated by the calling party;
S302, according to the ID identification of the first master key, the master key corresponding to the calling party is taken out, and HMAC integrity verification is carried out on the content of the session key application;
s303, after verification is passed, calling a quantum random number generator to generate session key materials of both the calling party and the called party in real time;
when the verification is not passed, the call is terminated.
S304, randomly adopting any main key corresponding to the calling party and the called party as a second main key, and respectively encrypting the session key material and checking the HMAC integrity;
s305, generating a key application response message, wherein the key application response message comprises a session key material ciphertext of the calling party and the called party, a session key material check value of the calling party and the called party, and an ID (identity) identification of a second main key adopted by encryption and check of the calling party and the called party.
It should be noted that, the flow of generating the key application response message by the quantum key distribution network in this embodiment has the following advantages: 1) The key distribution process protects the realization of one-time pad by adopting a large amount of pre-filled master keys; 2) The key distribution process and the voice data encryption and decryption process are transparent to VOIP application; 3) The session key is generated by the handshake negotiation of the two parties to the communication and verified in the handshake.
The quantum key distribution network comprises a quantum network node and a quantum network link control center, so that services such as quantum key generation, quantum key relay, quantum key provision and the like are realized; the quantum network node is used for storing the generated quantum key, receiving the key application of the key agent, and providing the key for the key agent or directly providing the key filling service; the quantum network link control center is used for establishing quantum key distribution and relay links among nodes according to the quantum network node ID.
In an embodiment, the method further comprises the steps of:
receiving a key filling request sent by a VoIP terminal;
and filling a main key into a secure storage medium integrated in the VoIP terminal based on the key filling request, wherein the main key is in the format of 4-byte key ID+n-byte key+n-byte initialization vector.
It should be appreciated that the quantum key distribution network employed in this embodiment pre-charges a secure storage medium integrated within the VoIP terminal with a large number of symmetric pre-shared master keys.
Example 4
As shown in fig. 4, a fourth embodiment of the present invention proposes a VoIP terminal, in which a first encryption agent module 11, a first key management module 12, a first secure storage medium 13, and a first data transceiver module 14 are integrated, the first encryption agent module 11 including an encryption agent running in a user space and an encryption/decryption module running in a kernel space, the first secure storage medium 13 storing a master key pre-charged by a quantum key distribution network;
The first encryption agent module 11 is configured to run the encryption agent and redirect an INVITE message of the SIP protocol to a sip_queue QUEUE;
the first data transceiver module 14 is configured to read an INVITE message redirected to a sip_queue, and send a session key application to a management center based on the popped INVITE message, so that the management center forwards the session key application to a QKD network node, where the session key application includes an address of a calling party and a called party, an ID identifier of a first master key, and a check value obtained by performing check computation on the session key application using the first master key, where the first master key is stored in the secure storage medium;
the first data transceiver module 14 is configured to receive a key application response packet forwarded by the management center, where the key application response packet is generated by the QKD network node, and the key application response packet includes a session key material ciphertext of a calling party and a called party, a session key material check value of the calling party and the called party, and an ID identifier of a second master key used for encryption and check of the calling party and the called party, where the second master key is a quantum key corresponding to the identifier of the calling party and the called party in the quantum key distribution network;
The first key management module 12 is configured to obtain, based on the ID of the second master key, a corresponding master key from the secure storage medium in which the second master key is integrated, decrypt and verify the session key material ciphertext, and obtain an INVITE message of the session key skey and the reconstructed SIP protocol;
the first data transceiver module 14 is configured to send a reconstructed SIP protocol INVITE message to a called party, so that the called party Fang Shengcheng uses the session key skey and an INVITE response message, and an RTP protocol port of both the calling party and the called party is written in a media field in the INVITE response message, and an extension parameter a field is added; and the RTP protocol ports of the calling party and the called party written in the media field in the INVITE response message are read, and RTP voice stream transparent encryption rules are set; and the transparent encryption and decryption module is used for carrying out VoIP encrypted voice communication and calling the transparent encryption and decryption module to carry out transparent encryption and decryption on the data message.
The embodiment completely separates a key management system based on the QKD network and a management center from a key management system of the VoIP terminal by pre-filling and using a large-capacity symmetric master key generated by the QKD network in the VoIP terminal, has no coupling relation, and is simple and efficient; the large-capacity master key generated by the quantum key distribution network QKD is pre-filled and used, so that one-time pad in the key distribution protection process in the true sense is realized, and the security of the whole system is enhanced from the top layer; and the encryption agent which is completely transparent to the VoIP application is operated in the VoIP terminal, and the audio and video encryption of the VoIP terminal is realized under the condition of no influence and zero modification to the VoIP protocol stack and the application.
In an embodiment, the first data transceiver module 14 is further configured to:
sending a registration request to the management center;
and receiving the binding relation between the VoIP terminal address returned by the management center and the QKD identity UID.
In an embodiment, the first key management module is further configured to:
the calling party runs an initialization program to carry out integrity check on the safe storage medium;
upon passing the check, obtaining authorization to use the master key stored within the secure storage medium.
In an embodiment, the first key management module 12 is further specifically configured to:
acquiring a corresponding master key from the integrated secure storage medium according to the ID identification of the second master key, wherein the acquired corresponding master key comprises a decryption master key and a verification master key;
decrypting the session key material ciphertext of the calling party by using the decryption master key to obtain the session key material of the calling party;
verifying the session key material verification value of the calling party by using the verification master key, and determining that the verification is passed;
obtaining a session key skey based on the session key material transformation by adopting a cipher function conforming to forward security;
And adding an expansion parameter a field in an SDP message body of the INVITE message to obtain a reconstructed INVITE message of the SIP protocol, wherein the expansion parameter a field carries session key related information, and the session key related information comprises a session key material ciphertext of a called party, a session key material check value of the called party, ID identification of a second master key adopted by the called Fang Jiami and check, a verification random number generated by a safe storage medium integrated by a calling party in real time and a first verification random number ciphertext encrypted by the session key skey.
In an embodiment, the first data transceiver module 14 is further configured to:
after the calling party runs the encryption agent, reading the INVITE response message redirected to the push stack of the sip_queue QUEUE;
invoking a key management module, and decrypting and verifying the second verification random number ciphertext by using the generated session key skey;
after the verification is passed, an encryption proxy module is called to remove the key verification information added by the called party in the INVITE response message to obtain an INVITE original response message;
and reading RTP protocol ports of the calling party and the called party written in a media field in the INVITE original response message, and setting transparent encryption rules of RTP voice streams.
In an embodiment, the first encryption proxy module 11 is further configured to:
when the call between the calling party and the called party is terminated, the calling party operates the encryption agent to read a BYE message or a CANCEL message redirected to the SIP_QUEUE QUEUE;
deleting the RTP voice stream transparent encryption rule, clearing the session key skey, and then re-stacking and sending a BYE message or a CANCEL message.
It should be noted that, in other embodiments of the VoIP terminal or the implementation method thereof, reference may be made to the above-mentioned method embodiment 1, and no redundant description is given here.
Example 5
As shown in fig. 5, a fifth embodiment of the present invention proposes a VoIP terminal, in which a second encryption agent module 21, a second key management module 22, a second secure storage medium 23, and a second data transceiver module 24 are integrated, the second encryption agent module 21 including an encryption agent running in a user space and an encryption/decryption module running in a kernel space, the second secure storage medium 23 storing a master key pre-charged by a quantum key distribution network;
the second data transceiver module 24 is configured to receive a reconstructed SIP protocol INVITE message sent by a calling party, where an extension parameter a field is added to an SDP message body of the reconstructed SIP protocol INVITE message, and the session key related information is used to carry session key related information, where the session key related information includes a session key material ciphertext of the called party, a session key material check value of the called party, an ID identifier of a second master key used for the called Fang Jiami and the check, a verification random number generated in real time by the secure storage medium integrated by the calling party, and a first verification random number ciphertext encrypted by a session key generated by the calling party;
The second encryption agent module 21 is configured to run the encryption agent and redirect the reconstructed SIP protocol INVITE message that is stacked on the sip_queue;
the second key management module 22 is configured to regenerate the session key skey based on the reconstructed SIP protocol INVITE message, and decrypt and verify the first verification random number ciphertext; after verification, removing key related information added by a calling party in the reconstructed SIP protocol INVITE message to obtain an original SIP protocol INVITE message;
the second data transceiver module 24 is configured to respond to the original INVITE message of the SIP protocol, and run the encrypted proxy to redirect an INVITE response message that is popped from the sip_queue QUEUE; reading RTP protocol ports of the calling party and the called party in a media field in the INVITE response message, and setting transparent encryption rules of RTP voice streams; and adding an extension parameter a field in the SDP message body of the INVITE response message, which is used for bearing the related information of the session key verification, and sending the reconstructed INVITE response message to the calling party by putting the reconstructed INVITE response message into a protocol stack.
The embodiment completely separates a key management system based on the QKD network and a management center from a key management system of the VoIP terminal by pre-filling and using a large-capacity symmetric master key generated by the QKD network in the VoIP terminal, has no coupling relation, and is simple and efficient; the large-capacity master key generated by the quantum key distribution network QKD is pre-filled and used, so that one-time pad in the key distribution protection process in the true sense is realized, and the security of the whole system is enhanced from the top layer; and the encryption agent which is completely transparent to the VoIP application is operated in the VoIP terminal, and the audio and video encryption of the VoIP terminal is realized under the condition of no influence and zero modification to the VoIP protocol stack and the application.
In an embodiment, the second key management module 22 is further configured to:
acquiring a corresponding main key from the secure storage medium integrated by the called party according to the ID identification of the second main key, wherein the acquired corresponding main key comprises a decryption main key and a verification main key;
decrypting the session key material ciphertext of the called party by using the decryption master key to obtain a session key material of the called party;
verifying the session key material verification value of the called party by using a verification master key, and determining that the verification is passed;
obtaining a session key skey based on the session key material transformation by adopting a cipher function conforming to forward security;
decrypting and verifying the first verification random number ciphertext based on the session key skey.
In an embodiment, the second data transceiver module 24 is further configured to:
in response to the original INVITE message, the encryption agent running thereon reads the original INVITE response message redirected to the Outbound (OUTPUT) of the sip_queue, reconstructs the original INVITE response message, and adds an extension parameter a field to carry session key verification related information:
a=verify noncev+noncev_encrypted_xxx
i.e. adding a second authentication random number generated in real time by the secure storage medium integrated by the called party and a second authentication random number ciphertext encrypted with the session key skey generated by the called party.
And calling an interface function to put the reconstructed NVITE response message into a protocol stack and send the message to the calling party.
In an embodiment, the second key management module 22 is further configured to:
the called party runs an initialization program to carry out integrity check on the secure storage medium;
and when the check passes, acquiring the use authorization of the master key stored in the secure storage medium integrated by the called party.
In an embodiment, the second data transceiver module 24 is further configured to:
when the call between the calling party and the called party is terminated, the called party operates the encryption agent to read a BYE message or a CANCEL message redirected to the SIP_QUEUE QUEUE;
deleting the RTP voice stream transparent encryption rule, clearing the session key skey, and then re-stacking and sending a BYE message or a CANCEL message.
It should be noted that, in other embodiments of the VoIP terminal or the implementation method thereof, reference may be made to the above-mentioned method embodiment 2, and redundant description is omitted here.
As shown in fig. 6, the sixth embodiment of the present invention further provides a VoIP encryption and decryption system implemented by adopting transparent proxy and quantum key pre-filling, where the system includes a first VoIP terminal 10, a second VoIP terminal 20, a management center 30, and a quantum key distribution network 40, where the first VoIP terminal 10, the second VoIP terminal 20, and the management center 30 are all connected to the quantum key distribution network 40, and an encryption proxy module, a key management module, a secure storage medium, and a data transceiver module are integrated in the first VoIP terminal 10 and the second VoIP terminal 20, and a master key pre-filled by the quantum key distribution network is stored in the secure storage medium;
The first VoIP terminal 10 invokes the encryption agent module, runs the encryption agent program, and redirects the INVITE message of the SIP protocol to the sip_queue QUEUE;
the first VoIP terminal 10 invokes the data transceiver module, reads the INVITE message redirected to the sip_queue, and sends a session key application to the management center based on the popped INVITE message;
the management center 30 forwards the session key application to a QKD node in the quantum key distribution network;
the QKD node generates a key application response message based on the session key application, and forwards the key application message to the first VoIP terminal through the management center, wherein the key application response message comprises a session key material ciphertext of a calling party and a called party, a session key material check value of the calling party and the called party, and an ID (identity) identification of a second main key adopted by encryption and check of the calling party and the called party, and the second main key is a quantum key corresponding to the ID of the calling party and the called party in the quantum key distribution network;
the first VoIP terminal 10 invokes the key management module, obtains a corresponding master key from the integrated secure storage medium based on the ID of the second master key, decrypts and verifies the session key material ciphertext, and obtains an INVITE message of a session key skey and a reconstructed SIP protocol;
The first VoIP terminal 10 invokes the data transceiver module to send a reconstructed SIP protocol INVITE message to the first VoIP terminal, so that the called Fang Shengcheng uses the session key skey and an INVITE response message, and an RTP protocol port of both the calling party and the called party is written in a media field in the INVITE response message, and an extension parameter a field is added
The first VoIP terminal 10 invokes the data transceiver module, receives the INVITE response message, redirects the INVITE response message to a push stack of a sip_queue QUEUE, reads an RTP protocol port of a calling party and a called party written in a media field in the INVITE response message, sets an RTP voice stream transparent encryption rule, and performs VoIP encrypted voice communication with a second VoIP terminal.
The embodiment completely separates a key management system based on the QKD network and a management center from a key management system of the VoIP terminal by pre-filling and using a large-capacity symmetric master key generated by the QKD network in the VoIP terminal, has no coupling relation, and is simple and efficient; the large-capacity master key generated by the quantum key distribution network QKD is pre-filled and used, so that one-time pad in the key distribution protection process in the true sense is realized, and the security of the whole system is enhanced from the top layer; and the encryption agent which is completely transparent to the VoIP application is operated in the VoIP terminal, and the audio and video encryption of the VoIP terminal is realized under the condition of no influence and zero modification to the VoIP protocol stack and the application.
As shown in fig. 7, the workflow for implementing the VoIP encryption and decryption system by adopting transparent proxy and quantum key pre-filling provided in this embodiment is as follows:
(1) The management center receives the registration of the first VoIP terminal and the second VoIP terminal, and binds different QKD identities UIDs for different VoIP terminals and VoIP terminal addresses.
(2) And respectively inserting the secure storage medium into the first VoIP terminal and the second VoIP terminal, running an initialization program to perform integrity check on the secure storage medium, obtaining the use authorization of the master key stored in the secure storage medium through PIN code verification and other modes, and ensuring that the secure storage medium is in an available state before dialing the encrypted VoIP phone.
(3) The first VoIP terminal runs an encryption agent that executes operating system related instructions to redirect SIP protocol messages to the encryption agent. The Android system needs to obtain root permission, the Linux system and the Android system execute the following instructions to redirect an INVITE message of the SIP protocol to a user space, and the encryption agent processes the SIP message and then reenters a protocol stack to process according to a normal flow:
iptables-A OUTPUT-p udp-m string--from 0–-to 10--algo bm--string'INVITE sip'-j NFQUEUE--queue-num SIP_QUEUE
iptables-A INPUT-p udp-m string--from 0–-to 10--algo bm--string'INVITE sip'-j NFQUEUE--queue-num SIP_QUEUE
iptables-A OUTPUT-p udp-m string--from 0–-to 10--algo bm--string'SIP/2.0 200OK'-j NFQUEUE--queue-num SIP_QUEUE
iptables-A INPUT-p udp-m string--from 0–-to 10--algo bm--string'SIP/2.0 200OK'-j NFQUEUE--queue-num SIP_QUEUE
iptables-A OUTPUT-p udp-m string--from 0–-to 10--algo bm--string'BYE'-j NFQUEUE--queue-num SIP_QUEUE
iptables-A INPUT-p udp-m string--from 0–-to 10--algo bm--string'BYE'-j NFQUEUE--queue-num SIP_QUEUE
iptables-A OUTPUT-p udp-m string--from 0–-to 10--algo bm--string'CANCEL'-j NFQUEUE--queue-num SIP_QUEUE
iptables-A INPUT-p udp-m string--from 0–-to 10--algo bm--string'CANCEL'-j NFQUEUE--queue-num SIP_QUEUE
(4) The first VoIP terminal initiates a SIP call, and an encryption agent program operated by the first VoIP terminal calls a library of libnetfilter_queue functions to read a SIP message redirected to a SIP_queue QUEUE. In the encryption agent program of the first VoIP terminal, for the INVITE message of the OUTPUT, triggering the key application, sending the key application message TO the management center, applying the session key between the VOIP terminals pointed by FROM and TO in the SIP message, the key application message content contains the VOIP addresses pointed by FROM and TO and randomly adopts any master key of the terminal as the first master key TO carry out HMAC integrity check calculation on the application message, and attaching a check value and a used first master key ID in the message.
(5) The management center forwards the key application message to the QKD network node, the QKD network node takes out the corresponding main key of the calling party according to the main key ID of the first VoIP terminal to carry out HMAC verification on the key application message content, after verification, a quantum random number generator is utilized to generate session key materials in real time, random main keys of the first VoIP terminal and the second VoIP terminal are respectively used as second main keys to encrypt the key materials and carry out HMAC integrity verification, and the session key material ciphertext, verification value and main key ID for encryption and verification of the first VoIP terminal and the second VoIP terminal form a key application response message to be sent to the management center and further forwarded to the calling party by the management center.
(6) After receiving the key application response message, the first VoIP terminal extracts the master key decrypting session key material and performs HMAC verification according to the second master key ID, then reconstructs the INVITE message of the SIP protocol, transforms the session key skey on the basis of the key material by adopting a cryptographic function (e.g., HMAC) conforming to the forward security, and adds an extension parameter a field in the SDP (session description protocol) of the SIP message to carry session key related information:
a=nonce:keyid_enc nonce_encrypted_xxx
a=hmac:keyid_mac nonce_hmac_xxx
a=verify noncev+noncev_encrypted_xxx
namely, the main key ID for encryption of the called party, the session key material ciphertext encrypted with the main key, the main key ID for calculation of the HMAC, the HMAC of the session key material calculated with the main key, and the authentication random number generated in real time and the authentication random number ciphertext encrypted with skey, taken out of the response message. Then calling an interface function to put the reconstructed SIP message into a protocol stack for transmission;
(7) The second VoIP terminal receives the INVITE message of the SIP protocol, the encryption agent program running on the INVITE message is used for reading the INVITE message redirected to the push stack (INPUT) of the SIP_QUEUE QUEUE, the corresponding master key is taken out from the message according to the master key ID to carry out HMAC verification and decrypt the key material, and the session key skey is converted on the basis of the key material in the same way as the calling party and used for decrypting the verification random number. After verification, reconstructing the SIP message, removing the key related information added by the calling party proxy, and restoring the original SIP message to be placed in a protocol stack to be accepted by the called party.
(8) The second VoIP terminal responds to the INVITE message, and the encryption agent program running on the second VoIP terminal reads the INVITE response message redirected to the pop (OUTPUT) of the SIP_QUEUE QUEUE, reconstructs the message, and adds an extension parameter a field to bear the relevant information of session key verification:
a=verify noncev+noncev_encrypted_xxx
i.e., adding the verification random number generated in real time and the verification random number ciphertext encrypted by the skey. And then calling an interface function to put the reconstructed SIP message into a protocol stack for transmission. Meanwhile, the CALLED party reads RTP protocol ports RTP-CALL/RTP-CALLED of the calling party and the CALLED party according to media fields (m fields) in the INVITE and response messages, and sets an RTP voice stream encryption rule:
iptables-t mangle-A OUTPUT-p udp–dport RTP-CALL-j ENCRYPT–-key skey–-iv iv
iptables-t mangle-A INPUT-p udp–dport RTP-CALLED-j DECRYPT–-key skey–-iv
The ENCRYPT and the DECRYPT are modules developed according to a netfilter mechanism of Linux, belong to a part of encryption proxy modules, and perform transparent encryption and decryption processing on the content of a data message, wherein the encryption mode is CBC (integer multiple of the algorithm packet length) +OFB (algorithm packet length mantissa).
(9) The first VoIP terminal receives the INVITE response message, and an encryption agent running thereon reads the INVITE response message redirected to an Inbound (INPUT) of the sip_queue, and decrypts the authentication random number using the skey. After the verification is passed, reconstructing the SIP message, removing the key related information added by the second VoIP terminal agent, and restoring the original SIP response message to be put into a protocol stack to be accepted by the calling party. Meanwhile, the first VoIP terminal reads RTP protocol ports RTP-CALL/RTP-CALLED of the calling party and the CALLED party according to media fields (m fields) in the INVITE and response messages, and sets an RTP voice stream encryption rule:
iptables-t mangle-A OUTPUT-p udp–dport RTP-CALLED-j ENCRYPT–-key skey–-iv iv
iptables-t mangle-A INPUT-p udp–dport RTP-CALL-j DECRYPT–-key skey–-iv iv
the ENCRYPT and the DECRYPT are kernel modules developed according to a netfilter mechanism of Linux, belong to a part of encryption proxy modules, and perform transparent encryption and decryption processing on the content of a data message, wherein the encryption mode is CBC (integer multiple of the algorithm packet length) +OFB (algorithm packet length mantissa).
(10) The first VoIP terminal and the second VoIP terminal carry out encrypted VOIP voice communication, and only data content is encrypted by adopting a transparent encryption and decryption mode of CBC (integer multiple of algorithm packet length) +OFB (algorithm packet length mantissa), so that a frame header control field is not influenced.
(11) Any party hangs up or the conversation is terminated, the encryption agent programs operated by the first VoIP terminal and the second VoIP terminal read BYE or CANCEL messages redirected to the SIP_QUEUE QUEUE, delete RTP voice stream encryption rules and clear the session key, and then re-stack and send the BYE or CANCEL messages.
It should be noted that the logic and/or steps represented in the flowcharts or otherwise described herein, for example, may be considered as a ordered listing of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the 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 embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.

Claims (17)

1. The method is characterized in that the method is applied to a VoIP terminal, a security storage medium is integrated in the VoIP terminal, a master key pre-filled by a quantum key distribution network is stored in the security storage medium, and when the VoIP terminal is used as a calling party, the method comprises the following steps:
the calling party runs the encryption agent and redirects the INVITE message of the SIP protocol to the SIP_QUEUE QUEUE;
The method comprises the steps that a calling party reads an INVITE message redirected to an SIP_QUEUE QUEUE, and sends a session key application to a management center based on the popped INVITE message, so that the management center forwards the session key application to a QKD network node, wherein the session key application comprises an address of a calling party and a called party, an ID (identity) of a first master key and a check value obtained by checking and calculating the session key application by utilizing the first master key, and the first master key is stored in a secure storage medium;
a calling party receives a key application response message forwarded by the management center, wherein the key application response message is generated by the QKD network node, and the key application response message comprises a session key material ciphertext of a calling party and a called party, a session key material check value of the calling party and the called party and an ID (identity) identification of a second main key adopted by encryption and check of the calling party and the called party, and the second main key is a quantum key corresponding to the ID of the calling party and the called party in the quantum key distribution network;
the calling party obtains a corresponding master key from the integrated safe storage medium based on the ID identification of the second master key, decrypts and verifies the session key material ciphertext to obtain a session key skey and reconstructs an INVITE message of the SIP protocol;
The calling party sends the reconstructed SIP protocol INVITE message to the called party so as to enable the called Fang Shengcheng to carry the session key skey and an INVITE response message, wherein the RTP ports of the calling party and the called party are written in the media field of the INVITE response message, and an expansion parameter a field is added for carrying the related information of the session key verification;
the calling party receives the INVITE response message, redirects the INVITE response message to a push stack of a SIP_QUEUE QUEUE, reads RTP protocol ports of the calling party and the called party written in a media field in the INVITE response message, and sets RTP voice stream transparent encryption rules;
and the calling party and the called party carry out VoIP encrypted voice communication based on the session key skey and the RTP voice stream transparent encryption rule.
2. The method for implementing VoIP encryption and decryption using transparent proxy and quantum key pre-charge of claim 1, wherein before the caller runs the encryption proxy to redirect the INVITE message of SIP protocol to the sip_queue, the method further comprises:
sending a registration request to the management center;
and receiving the binding relation between the VoIP terminal address returned by the management center and the QKD identity UID.
3. The method for implementing VoIP encryption and decryption using transparent proxy and quantum key pre-charge of claim 1, wherein before the caller runs the encryption proxy to redirect the INVITE message of SIP protocol to the sip_queue, the method further comprises:
the calling party runs an initialization program to carry out integrity check on the safe storage medium;
upon passing the check, obtaining authorization to use the master key stored within the secure storage medium.
4. The method for implementing VoIP encryption and decryption by transparent proxy and quantum key pre-charging according to claim 1, wherein the caller obtains a corresponding master key from the secure storage medium integrated with the caller based on the ID of the second master key, decrypts and verifies the session key material ciphertext to obtain an INVITE message of session key skey and reconstructing SIP protocol, comprising:
acquiring a corresponding master key from the integrated secure storage medium according to the ID identification of the second master key, wherein the acquired corresponding master key comprises a decryption master key and a verification master key;
decrypting the session key material ciphertext of the calling party by using the decryption master key to obtain the session key material of the calling party;
Verifying the session key material verification value of the calling party by using a verification master key, and determining that the verification is passed;
obtaining a session key skey based on the session key material transformation by adopting a cipher function conforming to forward security;
and adding an expansion parameter a field in an SDP message body of the INVITE message to obtain a reconstructed INVITE message of the SIP protocol, wherein the expansion parameter a field carries session key related information, and the session key related information comprises a session key material ciphertext of a called party, a session key material check value of the called party, ID identification of a second master key adopted by the called Fang Jiami and check, a verification random number generated by a safe storage medium integrated by a calling party in real time and a first verification random number ciphertext encrypted by the session key skey.
5. The method for implementing VoIP encryption and decryption by transparent proxy and quantum key pre-filling of claim 4, wherein the extension parameter a field in the INVITE response message carries session key verification information, the session key verification information including a verification random number generated in real time by the secure storage medium integrated by the called party and a second verification random number ciphertext encrypted by a session key skey generated by the called party;
The calling party receives the INVITE response message, redirects the INVITE response message to a push stack of a sip_queue QUEUE, reads an RTP protocol port of a calling party and a called party written in a media field in the INVITE response message, and sets an RTP voice stream transparent encryption rule, including:
the calling party runs an encryption agent and reads the INVITE response message redirected to the push stack of the SIP_QUEUE QUEUE;
the calling party uses the generated session key skey to decrypt and verify the second verification random number ciphertext;
after the verification is passed, the caller Fang Qudiao obtains the original INVITE response message from the added key verification information of the called party in the INVITE response message,
and setting transparent encryption rules of RTP voice streams by RTP protocol ports of the calling party and the called party written in a media field of the INVITE original response message by the calling party Fang Douqu.
6. The method for implementing VoIP encryption and decryption by adopting transparent proxy and quantum key pre-charging as claimed in claim 1, wherein the calling party and the called party perform VoIP encrypted voice communication, comprising:
and the calling party and the called party carry out VoIP encrypted voice communication, and carry out transparent encryption and decryption processing on the data message, wherein the encryption mode adopts a CBC algorithm and an OFB algorithm.
7. The method for implementing VoIP encryption and decryption using transparent proxy and quantum key pre-charge of claim 4, further comprising:
when the call between the calling party and the called party is terminated, the calling party operates the encryption agent to read a BYE message or a CANCEL message redirected to the SIP_QUEUE QUEUE;
deleting the RTP voice stream transparent encryption rule, clearing the session key skey, and then re-stacking and sending a BYE message or a CANCEL message.
8. The method is characterized in that the method is applied to a VoIP terminal, a security storage medium is integrated in the VoIP terminal, a master key pre-filled by a quantum key distribution network is stored in the security storage medium, and when the VoIP terminal is used as a called party, the method comprises the following steps:
the called party receives a reconstructed SIP protocol INVITE message sent by the calling party, an expansion parameter a field is added in an SDP message body of the reconstructed SIP protocol INVITE message and is used for bearing session key related information, and the session key related information comprises a session key material ciphertext of the called party, a session key material check value of the called party, an ID (identity) of a second main key adopted by the called Fang Jiami and the check, a verification random number generated by a safe storage medium integrated by the calling party in real time and a first verification random number ciphertext encrypted by a session key skey generated by the calling party;
The called party runs the encryption agent and redirects the reconstructed SIP protocol INVITE message which is stacked to the SIP_QUEUE QUEUE;
regenerating the session key skey based on the reconstructed SIP protocol INVITE message, and decrypting and verifying the first verification random number ciphertext;
after verification, removing key related information added by a calling party in the reconstructed SIP protocol INVITE message to obtain an original SIP protocol INVITE message;
the called party responds to the original INVITE message of the SIP protocol, and operates the encrypted proxy to redirect to the INVITE response message popped from the SIP_QUEUE QUEUE;
reading RTP protocol ports of the calling party and the called party in a media field in the INVITE response message, and setting transparent encryption rules of RTP voice streams;
and adding an extension parameter a field in an SDP message body of the INVITE response message, which is used for bearing the information related to the verification of the session key, and placing the reconstructed INVITE response message into a protocol stack and sending the reconstructed INVITE response message to a calling party.
9. The method for implementing VoIP encryption and decryption by transparent proxy and quantum key pre-charging as set forth in claim 8, wherein regenerating the session key skey and decrypting and verifying the first verification random number ciphertext based on the reconstructed SIP protocol INVITE message includes:
Acquiring a corresponding main key from the secure storage medium integrated by the called party according to the ID identification of the second main key, wherein the acquired corresponding main key comprises a decryption main key and a verification main key;
decrypting the session key material ciphertext of the called party by using the decryption master key to obtain a session key material of the called party;
verifying the session key material verification value of the called party by using a verification master key, and determining that the verification is passed;
obtaining a session key skey based on the session key material transformation by adopting a cipher function conforming to forward security;
decrypting and verifying the first verification random number ciphertext based on the session key skey.
10. The method for implementing VoIP encryption and decryption using transparent proxy and quantum key pre-charging of claim 8, wherein before the called party receives the reconstructed SIP protocol INVITE message sent by the calling party, the method further comprises:
sending a registration request to a management center;
and receiving the binding relation between the VoIP terminal address returned by the management center and the QKD identity UID.
11. The method for implementing VoIP encryption and decryption using transparent proxy and quantum key pre-charging of claim 8, wherein before the called party receives the reconstructed SIP protocol INVITE message sent by the calling party, the method further comprises:
The called party runs an initialization program to carry out integrity check on the secure storage medium;
and when the check passes, acquiring the use authorization of the master key stored in the secure storage medium integrated by the called party.
12. The method for implementing VoIP encryption and decryption using transparent proxy and quantum key pre-charge of claim 10, further comprising:
when the call between the calling party and the called party is terminated, the called party operates the encryption agent to read a BYE message or a CANCEL message redirected to the SIP_QUEUE QUEUE;
deleting the RTP voice stream transparent encryption rule, clearing the session key skey, and then re-stacking and sending a BYE message or a CANCEL message.
13. A method for implementing VoIP encryption and decryption by using transparent proxy and quantum key pre-filling, wherein the method is applied to a quantum key distribution network in the method according to any one of claims 1 to 7 or to a quantum key distribution network in the method according to any one of claims 8 to 12, and comprises the following steps:
receiving a session key application forwarded by a management center through a QKD network node, wherein the session key application is generated by a calling party, the session key application comprises an address of a calling party and a called party, an ID (identity) of a first master key and a verification value obtained by utilizing the first master key to carry out verification calculation on the session key application, and the first master key is any master key stored in a safe storage medium integrated by the calling party;
According to the ID identification of the first master key, a master key corresponding to a calling party is taken out, and HMAC integrity verification is carried out on the content of the session key application;
after verification, calling a quantum random number generator to generate session key materials of the calling party and the called party in real time;
randomly adopting any main key corresponding to a calling party and a called party as a second main key, and respectively encrypting the session key material and checking the HMAC integrity;
and generating a key application response message, wherein the key application response message comprises a session key material ciphertext of the calling party and the called party, a session key material check value of the calling party and the called party, and an ID (identity) identification of a second main key adopted by encryption and check of the calling party and the called party.
14. The method for implementing VoIP encryption and decryption using transparent proxy and quantum key pre-charge of claim 13, further comprising:
receiving a key filling request sent by a VoIP terminal;
and filling a main key into a secure storage medium integrated in the VoIP terminal based on the key filling request, wherein the main key is in the format of 4-byte key ID+n-byte key+n-byte initialization vector.
15. The VoIP terminal is characterized in that a first encryption agent module, a first key management module, a first security storage medium and a first data receiving and transmitting module are integrated in the VoIP terminal, the first encryption agent module comprises an encryption agent program running in a user space and an encryption/decryption transparent encryption/decryption module running in a kernel space, and a master key pre-filled by a quantum key distribution network is stored in the first security storage medium;
The first encryption agent module is used for running the encryption agent program and redirecting the INVITE message of the SIP protocol to an SIP_QUEUE QUEUE;
the first data transceiver module is configured to read an INVITE message redirected to a sip_queue, and send a session key application to a management center based on the popped INVITE message, so that the management center forwards the session key application to a QKD network node, where the session key application includes an address of a calling party and a called party, an ID identifier of a first master key, and a check value obtained by performing check computation on the session key application by using the first master key, and the first master key is stored in the secure storage medium;
the first data transceiver module is configured to receive a key application response message forwarded by the management center, where the key application response message is generated by the QKD network node, and the key application response message includes a session key material ciphertext of a calling party and a called party, a session key material check value of the calling party and the called party, and an ID identifier of a second master key adopted by encryption and check of the calling party and the called party, where the second master key is a quantum key corresponding to the identifier of the calling party and the called party in the quantum key distribution network;
The first key management module is configured to obtain a corresponding master key from the integrated secure storage medium based on the ID identifier of the second master key, decrypt and verify the session key material ciphertext, and obtain an INVITE message of the session key skey and the reconstructed SIP protocol;
the first data transceiver module is configured to send a reconstructed SIP protocol INVITE message to a called party, so that the called Fang Shengcheng uses the session key skey and an INVITE response message, media fields in the INVITE response message are written with RTP protocol ports of both parties of the calling party and the called party, and an extension parameter a field is added for carrying session key verification related information; and the RTP protocol ports of the calling party and the called party written in the media field in the INVITE response message are read, and RTP voice stream transparent encryption rules are set; and the VoIP encryption voice communication is performed based on the session key skey and the RTP voice stream transparent encryption rule.
16. The VoIP terminal is characterized in that a second encryption agent module, a second key management module, a second security storage medium and a second data receiving and transmitting module are integrated in the VoIP terminal, the second encryption agent module comprises an encryption agent program running in a user space and an encryption/decryption transparent encryption/decryption module running in a kernel space, and a master key pre-filled by a quantum key distribution network is stored in the second security storage medium;
The second data transceiver module is configured to receive a reconstructed SIP protocol INVITE message sent by a calling party, where an extension parameter a field is added to an SDP message body of the reconstructed SIP protocol INVITE message, and the session key related information is used to carry session key related information, where the session key related information includes a session key material ciphertext of a called party, a session key material check value of the called party, an ID identifier of a second master key used for the called Fang Jiami and the check, a verification random number generated in real time by the secure storage medium integrated by the calling party, and a first verification random number ciphertext encrypted by a session key generated by the calling party;
the second encryption agent module is used for running the encryption agent program and redirecting the reconstructed SIP protocol INVITE message which is stacked to the SIP_QUEUE QUEUE;
the second key management module is configured to regenerate the session key skey based on the reconstructed SIP protocol INVITE message, and decrypt and verify the first verification random number ciphertext; after verification, removing key related information added by a calling party in the reconstructed SIP protocol INVITE message to obtain an original SIP protocol INVITE message;
the second data transceiver module is configured to respond to the original INVITE message of the SIP protocol, and run the INVITE response message redirected to the sip_queue stack by the encryption agent; reading RTP protocol ports of the calling party and the called party in a media field in the INVITE response message, and setting transparent encryption rules of RTP voice streams; and adding an extension parameter a field in the SDP message body of the INVITE response message, which is used for bearing the related information of the session key verification, and sending the reconstructed INVITE response message to the calling party by putting the reconstructed INVITE response message into a protocol stack.
17. The system is characterized by comprising a first VoIP terminal, a second VoIP terminal, a management center and a quantum key distribution network, wherein the first VoIP terminal, the second VoIP terminal and the management center are all connected with the quantum key distribution network, an encryption agent module, a key management module, a secure storage medium and a data transceiver module are integrated in the first VoIP terminal and the second VoIP terminal, and a master key pre-filled by the quantum key distribution network is stored in the secure storage medium;
the first VoIP terminal calls the encryption agent module, runs the encryption agent program, and redirects an INVITE message of the SIP protocol to an SIP_QUEUE QUEUE;
the first VoIP terminal invokes the data receiving and transmitting module, reads the INVITE message redirected to the SIP_QUEUE QUEUE, and sends a session key application to a management center based on the popped INVITE message;
the management center forwarding the session key application to a QKD node in the quantum key distribution network;
the QKD node generates a key application response message based on the session key application, and forwards the key application message to the first VoIP terminal through the management center, wherein the key application response message comprises a session key material ciphertext of a calling party and a called party, a session key material check value of the calling party and the called party, and an ID (identity) identification of a second main key adopted by encryption and check of the calling party and the called party, and the second main key is a quantum key corresponding to the ID of the calling party and the called party in the quantum key distribution network;
The first VoIP terminal calls the key management module, acquires a corresponding master key from the integrated secure storage medium based on the ID identification of the second master key, decrypts and verifies the session key material ciphertext to obtain an INVITE message of a session key skey and a reconstructed SIP protocol;
the first VoIP terminal invokes the data transceiver module and sends a reconstructed SIP protocol INVITE message to the first VoIP terminal, so that the called Fang Shengcheng uses the session key skey and an INVITE response message, media fields in the INVITE response message are written with RTP protocol ports of both the calling party and the called party, and an extension parameter a field is added for carrying session key verification related information;
the first VoIP terminal calls the data receiving and transmitting module, receives the INVITE response message, redirects the INVITE response message to the push stack of the SIP_QUEUE QUEUE, reads RTP protocol ports of the calling party and the called party written in a media field in the INVITE response message, sets transparent encryption rules of RTP voice streams, and carries out VoIP encrypted voice communication with the second VoIP terminal.
CN202211198399.XA 2022-09-29 2022-09-29 VoIP encryption and decryption method by adopting transparent proxy and quantum key pre-filling Active CN115567209B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211198399.XA CN115567209B (en) 2022-09-29 2022-09-29 VoIP encryption and decryption method by adopting transparent proxy and quantum key pre-filling

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211198399.XA CN115567209B (en) 2022-09-29 2022-09-29 VoIP encryption and decryption method by adopting transparent proxy and quantum key pre-filling

Publications (2)

Publication Number Publication Date
CN115567209A CN115567209A (en) 2023-01-03
CN115567209B true CN115567209B (en) 2023-09-22

Family

ID=84742768

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211198399.XA Active CN115567209B (en) 2022-09-29 2022-09-29 VoIP encryption and decryption method by adopting transparent proxy and quantum key pre-filling

Country Status (1)

Country Link
CN (1) CN115567209B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116684093B (en) * 2023-08-02 2023-10-31 中电信量子科技有限公司 Identity authentication and key exchange method and system
CN116743380B (en) * 2023-08-14 2023-10-31 中电信量子科技有限公司 OTN encryption communication method and system based on quantum key distribution

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102185827A (en) * 2011-01-30 2011-09-14 广东佳和通信技术有限公司 Firewall-penetrating method of voice in VOIP (Voice Over Internet Protocol) system
CN103974241A (en) * 2013-02-05 2014-08-06 东南大学常州研究院 Voice end-to-end encryption method aiming at mobile terminal with Android system
CN107453869A (en) * 2017-09-01 2017-12-08 中国电子科技集团公司第三十研究所 A kind of method for the IPSecVPN for realizing quantum safety
CN108075890A (en) * 2016-11-16 2018-05-25 中兴通讯股份有限公司 Data sending terminal, data receiver, data transmission method and system
WO2020260751A1 (en) * 2019-06-27 2020-12-30 Nokia Technologies Oy Encrypted communication based on quantum key
CN113630248A (en) * 2021-09-15 2021-11-09 深圳市国信量子科技有限公司 Session key negotiation method
CN114553422A (en) * 2022-04-26 2022-05-27 中电信量子科技有限公司 VoLTE voice encryption communication method, terminal and system
CN114978485A (en) * 2022-04-21 2022-08-30 中国电信股份有限公司 Voice data transmission method, system, electronic device and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102185827A (en) * 2011-01-30 2011-09-14 广东佳和通信技术有限公司 Firewall-penetrating method of voice in VOIP (Voice Over Internet Protocol) system
CN103974241A (en) * 2013-02-05 2014-08-06 东南大学常州研究院 Voice end-to-end encryption method aiming at mobile terminal with Android system
CN108075890A (en) * 2016-11-16 2018-05-25 中兴通讯股份有限公司 Data sending terminal, data receiver, data transmission method and system
CN107453869A (en) * 2017-09-01 2017-12-08 中国电子科技集团公司第三十研究所 A kind of method for the IPSecVPN for realizing quantum safety
WO2020260751A1 (en) * 2019-06-27 2020-12-30 Nokia Technologies Oy Encrypted communication based on quantum key
CN113630248A (en) * 2021-09-15 2021-11-09 深圳市国信量子科技有限公司 Session key negotiation method
CN114978485A (en) * 2022-04-21 2022-08-30 中国电信股份有限公司 Voice data transmission method, system, electronic device and storage medium
CN114553422A (en) * 2022-04-26 2022-05-27 中电信量子科技有限公司 VoLTE voice encryption communication method, terminal and system

Also Published As

Publication number Publication date
CN115567209A (en) 2023-01-03

Similar Documents

Publication Publication Date Title
CN115567209B (en) VoIP encryption and decryption method by adopting transparent proxy and quantum key pre-filling
KR101438243B1 (en) Sim based authentication
US8499156B2 (en) Method for implementing encryption and transmission of information and system thereof
CN101330504B (en) Method for implementing transport layer safety of SIP network based on sharing cryptographic key
US20060168210A1 (en) Facilitating legal interception of ip connections
KR101297936B1 (en) Method for security communication between mobile terminals and apparatus for thereof
JP2024520245A (en) VoLTE voice encryption communication method, terminal and system
CN114866234B (en) Voice communication method, device, equipment and storage based on quantum key encryption and decryption
CN115174061A (en) Message transmission method and device based on block chain relay communication network system
CN114630290A (en) Key agreement method, device, equipment and storage medium for voice encryption communication
CN107294968A (en) The monitoring method and system of a kind of audio, video data
WO2017197968A1 (en) Data transmission method and device
CN112217862A (en) Data communication method, device, terminal equipment and storage medium
CN111901335A (en) Block chain data transmission management method and system based on middle station
CN115589288A (en) Method for realizing end-to-end VoIP encrypted communication based on quantum key pre-charging
CN114040385A (en) VoLTE-based encrypted call system and method
CN110995730B (en) Data transmission method and device, proxy server and proxy server cluster
CN103986640A (en) Instant messaging method and system capable of guaranteeing safety of user communication content
Євсєєв et al. Development of a protocol for a closed mobile internet channel based on post-quantum algorithms
Khozooyi et al. Security in mobile governmental transactions
CN114205170B (en) Bridging port platform networking communication and service encryption calling method
CN112953964B (en) Voice signaling encryption processing system and encryption processing method
US20240097903A1 (en) Ipcon mcdata session establishment method
CN114567439B (en) Identity authentication method and device
US20230388801A1 (en) Method for implimenting request from app by sim in mobile phone

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant