CN115567209A - Method for realizing VoIP encryption and decryption by adopting transparent proxy and quantum key pre-charging - Google Patents

Method for realizing VoIP encryption and decryption by adopting transparent proxy and quantum key pre-charging Download PDF

Info

Publication number
CN115567209A
CN115567209A CN202211198399.XA CN202211198399A CN115567209A CN 115567209 A CN115567209 A CN 115567209A CN 202211198399 A CN202211198399 A CN 202211198399A CN 115567209 A CN115567209 A CN 115567209A
Authority
CN
China
Prior art keywords
key
session key
encryption
message
invite
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.)
Granted
Application number
CN202211198399.XA
Other languages
Chinese (zh)
Other versions
CN115567209B (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

Images

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

Abstract

The invention discloses a method for realizing VoIP encryption and decryption by adopting transparent proxy and quantum key pre-charging, belonging to the technical field of password application and comprising the following steps: running an encryption agent, and redirecting an INVITE message of an SIP protocol to an SIP _ QUEUE QUEUE; reading an INVITE message redirected to the SIP _ QUEUE QUEUE, and sending a session key application to a 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 the corresponding master key from the secure storage medium, decrypting and verifying a session key material ciphertext to obtain a session key skey and reconstructing an INVITE message of an SIP (session initiation protocol); the calling party sends the reconstructed SIP protocol INVITE message to the called party; receiving an INVITE response message, and setting an RTP voice stream transparent encryption rule; the calling and called parties carry out VoIP encrypted voice communication.

Description

Method for realizing VoIP encryption and decryption by adopting transparent proxy and quantum key pre-charging
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-charging.
Background
With the development of the 5G technology and the instant messaging technology, there are more and more encryption and decryption demand scenarios for VoIP (Voice over Internet Protocol, IP phone), and the current solutions for VoIP encryption demand are generally based on a public key cryptosystem, and the VoIP Protocol stack and related applications of the terminal need to be modified in specific implementation, so that key distribution and data stream encryption processing that are completely transparent to the existing VoIP scheme cannot be implemented. The VoIP encryption system adopting the above conventional implementation scheme has the following difficulties in practical use at present:
(1) The public key cryptosystem has higher complexity, and 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 and the application and popularization are relatively limited due to the huge number of terminal users.
(2) The process of session key negotiation or distribution adopts a long-term effective asymmetric encryption key pair and a signature key pair for protection, and one-time pad is not realized; moreover, the public key has the possibility of being decoded by a developing quantum computer, thereby leading the session key to be transferred to be decoded and stolen.
(3) VoIP software or service providers need to be modified to support VoIP encryption, which has a large impact on existing services.
For example, in the related art, chinese patent publication No. CN104243144A describes a communication key distribution method based on an Android intelligent mobile terminal, and a universal secure communication platform is established at a bottom layer of an Android operating system, so that the intelligent mobile terminal has functions of interacting with a secure communication support network, receiving two-stage keys, and decrypting and reusing the received service key. VoIP secret telephone, secret short message, secret video call, file encryption transmission, secure mobile payment and other communication services needing secret support are supported by modifying the intelligent mobile terminal.
In the related art, chinese patent publication No. CN111092905A describes an encrypted communication method and system based on VoIP, where a calling terminal holds a first phone number and is pre-installed with a first security module, and a called terminal holds a second phone number and is pre-installed with a second security module; calling a background server by a calling terminal to create an encryption group, and adding the calling terminal and a called terminal into the encryption group; during conversation, the calling terminal generates a conversation key, encrypts the conversation key by using the first security module to generate a conversation key ciphertext, and then sends the conversation key ciphertext to the calling terminal; the called terminal decrypts the conversation key ciphertext by adopting the second security module to obtain a conversation key; and finally, the calling terminal and the called terminal carry out encrypted conversation based on the conversation key.
The scheme adopts a special encrypted conversation client to complete VoIP encryption, and needs to reform the existing VoIP conversation scheme; and the protection intensity of the key distribution process is not enough, and the session key is generated by the initiator in a single way.
Chinese patent publication No. CN102970448A describes a VoIP voice access method suitable for FDMA/DAMA satellite communication system, which accesses voice services carried by IP to FDMA/DAMA satellite communication system through procedures of intercepting data packets, applying for communication resources, allocating communication resources, two-way voice communication, applying for releasing communication resources, etc., and the automatic IP voice access and access procedures are completely transparent to a voice gateway.
The scheme adopts a data packet interception mode to realize a satellite channel VoIP access scheme, wherein the data packet interception is a common knowledge means, and different systems and protocols have different implementation modes, but the implementation mode of the data packet interception technology is not explained; and 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 encrypt and decrypt VoIP audio and video data in a transparent manner for VoIP application.
The invention solves the technical problems through the following technical means:
in a first aspect, the present invention provides 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 main 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 an encryption agent and redirects an INVITE message of an SIP protocol to an SIP _ QUEUE QUEUE;
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 INVITE message popped up so that the management center can forward the session key application to a QKD network node, wherein the session key application comprises addresses of a calling party and a called party, ID (identity) of a first main key and a check value obtained by carrying out check calculation on the session key application by using the first main key, and the first main key is stored in the 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, the key application response message comprises session key material ciphertexts of a calling party and a called party, session key material check values of the calling party and the called party and an ID (identity) of a second main key adopted by the encryption and the check of the calling party and the called party, and the second main key is a quantum key corresponding to the identifications of the calling party and the called party in the quantum key distribution network;
the calling party acquires a corresponding main key from the integrated safe storage medium based on the ID identification of the second main key, decrypts and verifies the session key material ciphertext to obtain a session key skey and reconstructs an INVITE message of an SIP protocol;
a calling party sends a reconstructed SIP protocol INVITE message to a called party so as to generate a session key skey and an INVITE response message by the called party, wherein RTP protocol ports of a calling party and a called party are written in media fields in the INVITE response message, and an extended parameter a field is added;
the calling party receives the INVITE response message, redirects the INVITE response message to the stack entry of an 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 an RTP voice stream transparent encryption rule;
and the calling party and the called party perform VoIP encryption voice communication based on the session key skey and the RTP voice stream transparent encryption rule.
The invention pre-fills in the VoIP terminal and uses the quantum key to distribute the large-capacity main key generated by the QKD network, 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, without coupling relation, simple and high-efficient; the high-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 is realized in the real sense, and the safety of the whole system is enhanced from the top layer; and an encryption agent which is completely transparent to the VOIP application is operated in the VoIP terminal, so that the audio and video encryption of the VoIP terminal is realized under the condition of no influence and zero modification on the VoIP protocol stack and the application.
In a second aspect, the present invention provides 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 called party, the method includes the following steps:
the called party receives a reconstructed SIP protocol INVITE message sent by a calling party, an extended 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 encryption and check of the called party, a verification random number generated by the 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 an encryption agent and redirects the reconstructed SIP protocol INVITE message stacked in 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 the verification is passed, removing the key related information added by the calling party in the reconstructed SIP protocol INVITE message to obtain an original INVITE message of the SIP protocol;
the called party responds to the original INVITE message of the SIP protocol and operates an encryption agent to redirect to an INVITE response message popped from an SIP _ QUEUE QUEUE;
reading RTP protocol ports of a calling party and a called party in media fields in the INVITE response message, and setting an RTP voice stream transparent encryption rule;
and adding an extension parameter a field in an SDP message body of the INVITE response message for bearing session key verification related information, and putting the reconstructed INVITE response message into a protocol stack to be sent to a calling party.
In a third aspect, the present invention provides a method for implementing VoIP encryption and decryption by using transparent proxy and quantum key pre-injection, where the method is applied to a quantum key distribution network, and includes 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 and comprises addresses 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 using the first master key, and the first master key is any master key stored in the secure storage medium integrated by the calling party;
according to the ID identification of the first master key, taking out the master key corresponding to the calling party, and carrying out HMAC integrity check on the content applied by the session key;
after the verification is passed, 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 the calling party and the called party as a second main key, and respectively encrypting the session key material and carrying out HMAC integrity check;
and generating a key application response message, wherein the key application response message comprises session key material ciphertexts 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) of a second main key adopted by the encryption and the 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 program running in a user space and an ENCRYPT/DECRYPT transparent encryption/decryption module running in a kernel space, and a master key pre-charged by a quantum key distribution network is stored in the first secure storage medium;
the first encryption agent module is used for operating the encryption agent program and redirecting an INVITE message of an SIP protocol to an SIP _ QUEUE QUEUE;
the first data transceiver module is configured to read an INVITE message redirected to an SIP _ query 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 addresses of both calling and called parties, an ID of a first master key, and a check value obtained by performing check calculation 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, the key application response message includes session key material ciphertexts of the calling and called parties, a session key material check value of the calling and called parties, and an ID identifier of a second main key used for encryption and check of the calling and called parties, and the second main key is a quantum key corresponding to the identifiers of the calling and called parties in the quantum key distribution network;
the first key management module is used for acquiring a corresponding main key from the integrated secure storage medium based on the ID identification of the second main key, decrypting and verifying the session key material ciphertext to obtain a session key skey and reconstructing an INVITE message of an 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 party generates the session key skey and an INVITE response message, where RTP protocol ports of both calling and called parties are written in a media field in the INVITE response message, and an extended parameter a field is added; and the RTP voice stream transparent encryption module is used for receiving the INVITE response message, redirecting the INVITE response message to the stack entry of an SIP _ QUEUE QUEUE, reading RTP protocol ports of the calling party and the called party written in a media field in the INVITE response message, and setting an RTP voice stream transparent encryption rule; and the transparent encryption and decryption module is used for carrying out VoIP encryption 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 provides 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 includes an encryption agent program running in a user space and an ENCRYPT/DECRYPT transparent encryption/decryption module running in a kernel space, and the second secure storage medium stores a master key pre-charged by a quantum key distribution network;
the second data transceiver module is configured to receive a reconstructed SIP INVITE message sent by a calling party, where an extension parameter a field is added to an SDP message body of the reconstructed SIP INVITE message and 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 of a second master key used for encryption and verification of the called party, a verification random number generated in real time by the secure storage medium integrated with the calling party, and a first verification random number ciphertext generated by the calling party and encrypted by a session key skey;
the second encryption agent module is used for operating the encryption agent program and redirecting the reconstructed SIP protocol INVITE message which is stacked in an 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 the verification is passed, removing the key related information added by the calling party in the reconstructed SIP protocol INVITE message to obtain an original INVITE message of the SIP protocol;
the second data transceiver module is used for responding to the original INVITE message of the SIP protocol and operating the encryption agent program to redirect to an INVITE response message popped from an SIP _ QUEUE QUEUE; reading RTP protocol ports of the calling party and the called party in media fields in the INVITE response message, and setting an RTP voice stream transparent encryption rule; and adding an extended parameter a field in an SDP message body of the INVITE response message, wherein the extended parameter a field is used for bearing session key verification related information, and the reconstructed INVITE response message is put into a protocol stack and sent to a calling party.
In a sixth aspect, the invention provides a VoIP encryption and decryption system implemented by transparent proxy and quantum key pre-charging, where the system includes a first VoIP terminal, a second VoIP terminal, a management center and a quantum key distribution network, the first VoIP terminal, the second VoIP terminal and the management center are all connected to the quantum key distribution network, an encryption proxy 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-charged 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 an SIP protocol to an SIP _ QUEUE QUEUE;
the first VoIP terminal calls the data transceiver 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 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 session key material ciphertexts of the calling and called parties, a session key material check value of the calling and called parties, and an ID (identity) of a second main key adopted by the encryption and the check of the calling and called parties, and the second main key is a quantum key corresponding to the identifications of the calling and called parties in the quantum key distribution network;
the first VoIP terminal calls the key management module, acquires a corresponding main key from the integrated safe storage medium based on the ID identification of the second main key, decrypts and verifies the session key material ciphertext to obtain a session key skey and reconstructs an INVITE message of an SIP protocol;
the first VoIP terminal calls the data transceiver module, sends the reconstructed SIP protocol INVITE message to the first VoIP terminal, so that the called party generates the session key skey and an INVITE response message, RTP protocol ports of the calling party and the called party are written in a media field in the INVITE response message, and an extended parameter a field is added
And the first VoIP terminal calls the data transceiver module, receives the INVITE response message, redirects the INVITE response message to the stack entry of an 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 an RTP voice stream transparent encryption rule and carries out VoIP encryption voice communication with a second VoIP terminal.
The invention has the advantages that:
(1) The invention pre-fills and uses the large-capacity main key generated by QKD network (Quantum key Distribution), the key management system based on QKD network and management center is completely separated from the key management system of VoIP terminal, without coupling relation, simple and high-efficient; the high-capacity main key generated by the quantum key distribution network QKD is pre-filled and used, so that the key distribution protection process is one-time pad in the real sense, and the safety of the whole system is enhanced from the top layer; and an 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 on the VoIP protocol stack and the application.
And because the scheme of the invention is based on a transparent proxy, the key distribution system is not directly associated with the VoIP communication system, so that the VoIP software or a 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 method for implementing VoIP encryption and decryption by using transparent proxy and quantum key pre-charging according to a first embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for implementing VoIP encryption and decryption by using transparent proxy and quantum key pre-charging according to a second embodiment of the present invention;
fig. 3 is a schematic flow chart of a method for implementing VoIP encryption and decryption by using transparent proxy and quantum key pre-charging 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 system for implementing VoIP encryption and decryption by using transparent proxy and quantum key pre-charging according to a sixth embodiment of the present invention;
fig. 7 is a functional block diagram of a system for implementing VoIP encryption and decryption by using transparent proxy and quantum key pre-charging according to a sixth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
Example 1
As shown in fig. 1, a first embodiment of the present invention provides 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 adopt a Linux system or an Android system, a transparent agent and a transparent encryption/decryption program based on an iptables/netfilter and queue mechanism are run on the Linux system or the Android system, the VoIP terminal runs an encryption agent, the encryption agent executes an operating system related instruction, and redirects an INVITE message of an SIP protocol to an encryption agent. The root authority is required to be obtained on the Android system, the following instructions are executed on the Linux system and the Android system to redirect an INVITE message of the SIP protocol to a user space, and the INVITE message of the SIP protocol is processed by an encryption agent program and then enters a protocol stack again to be processed 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 INVITE message popped out of a stack, so that the management center forwards the session key application to a QKD network node, the session key application comprises addresses of a calling party and a called party, ID (identity) of a first master key and a check value obtained by carrying out check calculation on the session key application by using the first master key, and the first master key is stored in the secure storage medium;
specifically, an encryption agent program operated by the VoIP terminal calls a libnetfilter _ QUEUE function library, and reads an INVITE message of the SIP protocol redirected to the SIP _ QUEUE. And triggering the application of the session key for the INVITE message of the Outbound (OUTPUT) at the encryption agent program of the calling party, and sending the application message of the session key to the management center.
The session key application message is used for applying for obtaining a session key between VoIP terminals indicated by FROM and TO, the content of the key application message comprises addresses of the VoIP terminals indicated by FROM and TO, any master key in a safe storage medium in the terminal is randomly adopted TO carry out HMAC integrity check calculation on the key application message, and a check value and a 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 key, and is called a Hash-based Message Authentication Code.
Specifically, the management center forwards a received session key application message to a node of the QKD network, the QKD network node takes out a corresponding main key of a calling party from the QKD network according to an ID (identity) of a first main key of the calling party, HMAC (high-mobility authentication) verification is carried out on the content of the key application message, a quantum random number generator is called to generate a session key material in real time after the verification is correct, any main key corresponding to the calling party and a called party is respectively and randomly obtained from the QKD network as a second main key, and then the second main key is used for encrypting the key material and carrying out HMAC integrity verification; and then, a key application response message is formed 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 a second main key adopted by the encryption and the check of the calling party and the called party, and is sent 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, the key application response message comprises session key material ciphertexts 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) of a second main key adopted by the encryption and the check of the calling party and the called party, and the second main key is a quantum key corresponding to the identifications of the calling party and the called party in the quantum key distribution network;
s104, the calling party acquires a corresponding main key from the integrated safe storage medium based on the ID identification of the second main key, decrypts and verifies the session key material ciphertext to obtain a session key skey and reconstructs an INVITE message of an SIP protocol;
after receiving the key application response message, the calling party first obtains a corresponding master key from the integrated secure storage medium according to the ID of the second master key, and decrypts the session key material ciphertext and performs 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 party generates the session key skey and an INVITE response message, RTP protocol ports of the calling party and the called party are written in media fields in the INVITE response message, and an extended parameter a field is added;
specifically, after receiving a reconstructed SIP protocol INVITE message, a called party reads the reconstructed SIP protocol INVITE message redirected to a stack (INPUT) of an SIP _ QUEUE QUEUE by using an encryption agent program operated by the called party, and acquires a corresponding main key from an integrated safe storage medium according to an ID (identity) of a second main key in the INVITE message, so that a session key material ciphertext is decrypted and subjected to HMAC (high-speed authentication) verification; when the verification is passed, the INVITE message of the SIP protocol is reconstructed, the related information of the key added by the calling party is removed, the original INVITE message is recovered and received by the called party, and if the verification is not passed, the call is terminated.
The called party receives the original INVITE message, reconstructs the INVITE message, adds an extended 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 stack entry of an 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 an RTP voice stream transparent encryption rule;
s107, the calling party and the called party carry out VoIP encryption voice communication based on the session key skey and the RTP voice stream transparent encryption rule.
In the embodiment, a large-capacity main key generated by a QKD network (Quantum key Distribution) is pre-filled in the VoIP terminal and used, and a key management system based on the QKD network and a management center is completely separated from a key management system of the VoIP terminal, so that the key management system is free of coupling relation, simple and efficient; the high-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 is realized in the real sense, and the safety of the whole system is enhanced from the top layer; and an encryption agent which is completely transparent to the VoIP application is operated in the VoIP terminal, so that the audio and video encryption of the VoIP terminal is realized under the condition of no influence and zero modification on the VoIP protocol stack and the application.
The difference from the solution described in chinese patent publication No. CN111092905A is that: in the scheme of the embodiment, the transparent transformation from the existing VoIP plain speech to the secret speech is realized through the transparent encryption agent and the message redirection technology, 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, and zero intervention is performed on services; in addition, in the scheme of the embodiment, the pre-charged quantum key is adopted to realize one-time pad in the key distribution process, and the session key is generated by negotiation of two parties, so that the protection strength is high.
The difference with the scheme described in the Chinese patent publication No. CN102970448A is that: in the scheme of the embodiment, a netfilter packet filtering and redirecting mechanism of a Linux or Linux-based Android system and a communication mode in an ip _ queue system are adopted to intercept and process the data packet, and the method is transparent to a VoIP protocol stack and application; the scheme is used for establishing the encrypted link, the encrypted link is a virtual link, and a new physical link cannot be established based on the original VoIP communication link.
It should be noted that, in this embodiment, a dedicated secure SIM card (for a smart phone) or a secure U-shield (for a personal computer) and other high-capacity secure storage media are provided for the VoIP terminal, and a large number of master keys are pre-filled into the secure SIM card or the secure U-shield representing different QKD identities UID through the QKD network, where the key format is 4-byte key ID + n-byte key and n-byte initialization vector.
It should be understood that the value of n is related to the employed encryption algorithm, and the embodiment is not particularly limited.
It should be noted that, in the case where the VoIP terminal cannot perform key charging directly at the node of the QKD network, the proxy function of key charging may be provided by the key proxy.
It should be understood that the key distribution system or device employed in the present embodiment is based on, but not limited to, a QKD key distribution network, and the key pre-charging function involved can be implemented using any symmetric key management system or device.
In one embodiment, in the step S101: the calling party runs an encryption agent and redirects an INVITE message of the SIP protocol to a front of a SIP _ QUEUE, and the method further comprises the following steps:
sending a registration request to the management center;
and receiving the binding relationship between the VoIP terminal address returned by the management center and the QKD identity UID.
It should be noted that the management center is used for providing registration and identity binding services of the VoIP terminal, binding different QKD identities UID to different VoIP terminals and VoIP addresses, and forwarding a session key request and response between the quantum key distribution network and the VoIP terminal.
In one embodiment, in the step S101: the calling party runs an encryption agent and redirects an INVITE message of the SIP protocol to a SIP _ QUEUE QUEUE, and the method also comprises the following steps:
the calling party runs an initialization program to carry out integrity check on the secure storage medium;
and when the check is passed, obtaining the use authorization of the master key stored in the secure storage medium.
It should be noted that, 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 obtain the usage authorization of the master key stored in the secure storage medium through PIN code verification and other manners, so as to ensure that the secure storage medium is in an available state before an encrypted VoIP phone call is dialed.
In one embodiment, the step S104: the calling party acquires a corresponding main key from the integrated secure storage medium based on the ID identification of the second main key, decrypts and verifies the session key material ciphertext to obtain a session key skey and reconstructs an INVITE message of an 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 main 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 main key, and determining that the verification is passed;
s144, obtaining a session key skey based on the session key material transformation by adopting a cryptographic function conforming to forward security;
s145, adding an extended parameter a field in an SDP message body of the INVITE message to obtain the INVITE message of the reconstructed SIP protocol, wherein the extended parameter a field bears 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, an ID (identity) of a second main key adopted by encryption and check of the called party, a verification random number generated by the safe storage medium integrated by the 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 extended parameter a field in an SDP (session description protocol) of the INVITE 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 ID of the second main key used for encryption of the called party taken from the response message, the session key material ciphertext encrypted by the second main key, the ID of the second main key used for computing the HMAC, the HMAC check value of the session key material computed by the second main key, the verification random number generated in real time, and the first verification random number ciphertext encrypted by the session key skey are obtained. And then, calling an interface function to send the reconstructed INVITE message into a protocol stack to a called party, and generating an INVITE response message by the called party.
In an embodiment, after the called party receives the reconstructed SIP protocol INVITE message, the encryption agent running thereon reads the reconstructed INVITE message redirected to the push (INPUT) of the SIP _ QUEUE, takes out the corresponding main key from the message according to the second main key ID to perform HMAC verification and decrypt a key material, and transforms a session key skey on the basis of the key material and uses the session key skey to decrypt a verification random number. After the verification is passed, the related information of the key added by the calling party agent in the message is removed, and the original SIP message is recovered and put into a protocol stack to be accepted by the called party.
After the called party receives the original INVITE message, an encryption agent program running on the original INVITE message reads an INVITE response message redirected to an Outbound (OUTPUT) of an SIP _ QUEUE QUEUE, reconstructs the message, and adds an extended parameter a field to bear session key check related information:
a=verify noncev+noncev_encrypted_xxx
namely, a second verification random number generated in real time and a second verification random number ciphertext encrypted by adopting the session key skey are added. And then calling an interface function to put the reconstructed INVITE response message into a protocol stack to be sent to a 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
it should be noted that ENCRYPT and DECRYPT are modules developed according to the netfilter mechanism of Linux, and belong to a part of an encryption agent module, and perform transparent encryption and decryption processing on the content of a data message, where the encryption mode is CBC (integer multiple of algorithm packet length) + OFB (algorithm packet length mantissa).
In an embodiment, an extended parameter a field in the INVITE response message carries session key check information, where the session key check information includes an 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 by using a 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 stack entry of an 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 an RTP voice stream transparent encryption rule, and the method comprises the following steps of:
s151, the calling party runs an encryption agent and reads the INVITE response message which is redirected to the 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;
it should be noted that, after passing the verification, the INVITE response message is reconstructed, the related information of the key added by the called party agent in the message is removed, and the original INVITE response message of the SIP is restored and put into a protocol stack to be accepted by the calling party; if the verification is passed, the call is terminated.
S153, after the verification is passed, the calling party removes the key verification information added by the called party in the INVITE response message to obtain an INVITE original response message;
s154, the calling party reads the RTP protocol ports of the calling party and the called party written in the media field in the original INVITE response message, and sets an RTP voice stream transparent encryption rule.
It should be noted that, the calling party reads RTP protocol ports RTP-CALL/RTP-CALLED of the calling party and the CALLED party according to the media field (m field) in the INVITE and response message, 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
it should be noted that ENCRYPT and DECRYPT are kernel modules developed according to the netfilter mechanism of Linux, which belong to a part of an encryption agent module, and perform transparent encryption and decryption processing on the content of a data message, and the encryption mode is CBC (integer multiple of 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 data content is encrypted by adopting a transparent encryption and decryption mode of CBC (integral multiple of algorithm packet length) + OFB (algorithm packet length mantissa), without affecting a frame header control field.
In an embodiment, the method further comprises the steps of:
when the calling party and the called party are terminated, the calling party operates an encryption agent to read a BYE message or a CANCEL message redirected to an SIP _ QUEUE QUEUE;
and deleting the RTP voice stream transparent encryption rule and clearing the session key skey, and then, re-stacking and sending the BYE message or the CANCEL message.
In one embodiment, after each SIP session is finished by the calling party and the called party, the used master key is cleared by the calling party, the called party and the QKD network node.
Example 2
As shown in fig. 2, a second embodiment of the present invention provides 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 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 extended 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, an ID (identity) of a second main key adopted by encryption and check of the called party, a verification random number generated by the 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;
s202, the called party runs an encryption agent and redirects the reconstructed SIP protocol INVITE message which is pushed to an 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, the key related information added by the calling party in the reconstructed SIP protocol INVITE message is removed, and an original INVITE message of the SIP protocol is obtained;
s205, the called party responds to the original INVITE message of the SIP protocol and operates an encryption agent to redirect to an INVITE response message popped from a SIP _ QUEUE QUEUE;
s206, reading RTP protocol ports of a calling party and a called party in media fields in the INVITE response message, and setting an RTP voice stream transparent encryption rule;
it should be noted that, the CALLED party reads RTP protocol ports RTP-CALL/RTP-CALL of the calling party and the CALLED party according to a media field (m field) in the INVITE response message, 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
it should be noted that ENCRYPT and DECRYPT are modules developed according to the netfilter mechanism of Linux, and belong to a part of an encryption agent module, and perform transparent encryption and decryption processing on the content of a data message, where the encryption mode is CBC (integer multiple of algorithm packet length) + OFB (algorithm packet length mantissa).
And S207, adding an extension parameter a field in an SDP message body of the INVITE response message, wherein the extension parameter a field is used for bearing session key verification related information, and putting the reconstructed INVITE response message into a protocol stack to be 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 stack entry of the SIP _ QUEUE, reads the RTP protocol ports of the calling and called parties written in the media fields in the INVITE response message, and sets the RTP voice stream transparent encryption rule; then, the calling party and the called party perform VoIP encryption voice communication based on the session key skey and the RTP voice stream transparent encryption rule.
In the embodiment, the large-capacity master key generated by the QKD network is pre-filled in the VoIP terminal and used, and a key management system based on the QKD network and a management center is completely separated from a key management system of the VoIP terminal, so that the method has no coupling relation, and is simple and efficient; the high-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 is realized in the real sense, and the safety of the whole system is enhanced from the top layer; and an 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 on 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 main key from the secure storage medium integrated by the called party according to the ID of the second main key, wherein the acquired corresponding main key comprises a decryption main key and a verification main key;
s232, decrypting the session key material ciphertext of the called party by using the decryption main key to obtain the session key material of the called party;
s233, the verification main key is used for verifying the session key material verification value of the called party, and the verification is confirmed to be passed;
s234, obtaining a session key skey based on the material transformation of the session key by adopting a cryptographic function conforming to forward security;
s234, based on the session key skey, decrypting and verifying the first verification random number ciphertext.
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 agent, recovers the NVITE message of the original SIP protocol, and puts the NVITE message into the protocol stack to be received by the called party; if the verification is not passed, the call is terminated.
In an embodiment, the step S207: adding an extended parameter a field in an SDP message body of the INVITE response message, wherein the extended parameter a field is used for bearing session key verification related information, and placing the reconstructed INVITE response message into a protocol stack to be sent to a calling party, and the method specifically comprises the following steps:
s271, the called party responds to the original INVITE message, the encryption agent program running on the original INVITE message reads the original INVITE response message redirected to an Outbound (OUTPUT) of the SIP _ QUEUE QUEUE, reconstructs the original INVITE response message, and adds an extended parameter a field to bear the session key check related information:
a=verify noncev+noncev_encrypted_xxx
namely, a second authentication random number generated by the called party integrated secure storage medium in real time and a second authentication random number cipher text encrypted with the session key skey generated by the called party are added.
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 also comprises the following steps:
sending a registration request to the management center;
and receiving the binding relationship between the VoIP terminal address and the QKD identity UID returned by the management center.
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 also comprises the following steps:
the called party runs an initialization program to carry out integrity check on the secure storage medium;
and when the check is passed, obtaining 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 calling and called parties terminate the call, the called party operates an encryption agent to read a BYE message or a CANCEL message redirected to an SIP _ QUEUE QUEUE;
and deleting the RTP voice stream transparent encryption rule, clearing the session key skey, and then, re-stacking and sending the BYE message or the CANCEL message.
Example 3
As shown in fig. 3, a third embodiment of the present invention further provides a method for implementing VoIP encryption and decryption by using transparent proxy and quantum key pre-charging, 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 addresses of both calling and called parties, ID (identity) of a first master key and a check value obtained by checking and calculating the session key application by using the first master key, and the first master key is any master key stored in the secure storage medium integrated by the calling party;
s302, according to the ID identification of the first master key, a master key corresponding to a calling party is taken out, and HMAC integrity check is carried out on the content applied by the session key;
s303, after the verification is passed, calling a quantum random number generator to generate session key materials of the calling party and the called party in real time;
it should be noted that, when the verification fails, 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 carrying out HMAC integrity check;
s305, generating a key application response message, wherein the key application response message comprises session key material ciphertexts of the calling party and the called party, a session key material verification value of the calling party and the called party, and an ID (identity) of a second main key adopted by the encryption and verification of the calling party and the called party.
It should be noted that, the process 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 that a large number of pre-filled master keys are adopted to realize one-time pad; 2) The key distribution process and the voice data encryption and decryption process are transparent to the VOIP application; 3) The session key is generated by a handshake negotiation of both parties of the communication and verified in the handshake.
It should be noted that the quantum key distribution network includes quantum network nodes and a quantum network link control center, and implements services such as quantum key generation, quantum key relay, quantum key provision, and the like; the quantum network node is used for storing the generated quantum key, receiving a key application of a key agent, and providing the key for the key agent or directly providing a key filling service; the quantum network link control center is used for establishing quantum key distribution and relay links among the nodes according to the quantum network node IDs.
In an embodiment, the method further comprises the steps of:
receiving a key charging request sent by a VoIP terminal;
and based on the key filling request, filling a master key into a secure storage medium integrated in the VoIP terminal, wherein the format of the master key is 4 bytes of key ID + n bytes of key + n bytes of initialization vector.
It should be appreciated that the quantum key distribution network employed in the present embodiment pre-populates the 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 provides 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 in the VoIP terminal, the first encryption agent module 11 includes an encryption agent program operating in a user space and an ENCRYPT/DECRYPT transparent encryption/decryption module operating in a kernel space, and the first secure storage medium 13 stores a master key pre-charged by a quantum key distribution network;
the first encryption agent module 11 is configured to run the encryption agent program, and redirect an INVITE message of an SIP protocol to an SIP _ QUEUE;
the first data transceiver module 14 is configured to read an INVITE message redirected to an SIP _ query QUEUE, and send a session key application to a management center based on the INVITE message popped up, so that the management center forwards the session key application to a QKD network node, where the session key application includes addresses of both parties of a calling party and a called party, an ID identifier of a first master key, and a check value obtained by performing check calculation 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 14 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, the key application response message includes session key material ciphertexts of both calling and called parties, a session key material check value of both calling and called parties, and an ID identifier of a second master key used for encryption and verification of both calling and called parties, and the second master key is a quantum key corresponding to the identifiers of both calling and called parties in the quantum key distribution network;
the first key management module 12 is configured to obtain a corresponding master key from the secure storage medium integrated with the second master key based on the ID of the second master key, decrypt and verify the session key material ciphertext, obtain a session key skey, and reconstruct an INVITE message of an 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 generates the session key skey and an INVITE response message, where RTP protocol ports of both calling and called parties are written in a media field in the INVITE response message, and an extended parameter a field is added; and the RTP voice stream transparent encryption module is used for receiving the INVITE response message, redirecting the INVITE response message to the stack entry of an SIP _ QUEUE QUEUE, reading RTP protocol ports of the calling party and the called party written in a media field in the INVITE response message, and setting an RTP voice stream transparent encryption rule; and the transparent encryption and decryption module is used for carrying out VoIP encryption voice communication and calling the transparent encryption and decryption module to carry out transparent encryption and decryption on the data message.
In the embodiment, the large-capacity symmetric master key generated by the QKD network is pre-filled in the VoIP terminal, and a key management system based on the QKD network and a management center is completely separated from a key management system of the VoIP terminal, so that the method has no coupling relation, and is simple and efficient; the high-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 is realized in the real sense, and the safety of the whole system is enhanced from the top layer; and an encryption agent which is completely transparent to the VoIP application is operated in the VoIP terminal, so that the audio and video encryption of the VoIP terminal is realized under the condition of no influence and zero modification on 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 relationship 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 secure storage medium;
and when the check is passed, obtaining the use authorization of the master key stored in the secure storage medium.
In an embodiment, the first key management module 12 is further specifically configured to:
according to the ID identification of the second master key, acquiring a corresponding master key from the integrated safe storage medium, 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 main key to obtain a session key material of the calling party;
verifying the session key material check value of the calling party by using the verification main key to determine that the verification is passed;
obtaining a session key skey based on the session key material transformation by adopting a cryptographic function conforming to forward security;
and adding an extended parameter a field in an SDP message body of the INVITE message to obtain the reconstructed INVITE message of the SIP protocol, wherein the extended parameter a field bears 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 encryption and check of the called party, a verification random number generated by the safe storage medium integrated by the 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 stack of the SIP _ QUEUE QUEUE;
calling a key management module, and decrypting and verifying the second verification random number ciphertext by using the session key skey generated by the key management module;
after the verification is passed, an encryption agent 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 the media field in the original INVITE response message, and setting an RTP voice stream transparent encryption rule.
In an embodiment, the first encryption agent module 11 is further configured to:
when the calling party and the called party are terminated, the calling party operates an encryption agent to read a BYE message or a CANCEL message redirected to an SIP _ QUEUE QUEUE;
and deleting the RTP voice stream transparent encryption rule, clearing the session key skey, and then, re-stacking and sending the BYE message or the CANCEL message.
It should be noted that other embodiments or implementation methods of the VoIP terminal according to the present invention can refer to the method embodiment 1 described above, and no redundancy is provided here.
Example 5
As shown in fig. 5, a fifth embodiment of the present invention provides 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 includes an encryption agent program operating in a user space and an ENCRYPT/DECRYPT transparent encryption/decryption module operating in a kernel space, and the second secure storage medium 23 stores a master key pre-charged by a quantum key distribution network;
the second data transceiver module 24 is configured to receive a reconstructed SIP INVITE message sent by a calling party, where an extension parameter a field is added in an SDP message body of the reconstructed SIP INVITE message and 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 of a second main key used for encryption and check of the called party, 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 generated by the calling party to generate a session key skey encryption;
the second encryption agent module 21 is configured to run the encryption agent program, and redirect the reconstructed SIP protocol INVITE message stacked in 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 the verification is passed, removing the key related information added by the calling party in the reconstructed SIP protocol INVITE message to obtain an original INVITE message of the SIP protocol;
the second data transceiver module 24 is configured to respond to the original INVITE message of the SIP protocol, and operate the encryption agent to redirect to an INVITE response message popped from an SIP _ QUEUE; reading RTP protocol ports of the calling party and the called party in media fields in the INVITE response message, and setting an RTP voice stream transparent encryption rule; and adding an extended parameter a field in an SDP message body of the INVITE response message, wherein the extended parameter a field is used for bearing session key verification related information, and the reconstructed INVITE response message is put into a protocol stack and sent to a calling party.
In the embodiment, the large-capacity symmetric main key generated by the QKD network is pre-filled in the VoIP terminal and used, and a key management system based on the QKD network and a management center is completely separated from a key management system of the VoIP terminal, so that the system has no coupling relation, and is simple and efficient; the high-capacity main key generated by the quantum key distribution network QKD is pre-filled and used, so that the key distribution protection process is one-time pad in the real sense, and the safety of the whole system is enhanced from the top layer; and an encryption agent which is completely transparent to the VoIP application is operated in the VoIP terminal, so that the audio and video encryption of the VoIP terminal is realized under the condition of no influence and zero modification on the VoIP protocol stack and the application.
In an embodiment, the second key management module 22 is further configured to:
according to the ID identification of the second master key, acquiring a corresponding master key from the secure storage medium integrated by the called party, wherein the acquired corresponding master key comprises a decryption master key and a verification master key;
decrypting the session key material ciphertext of the called party by using the decryption main key to obtain a session key material of the called party;
verifying the session key material check value of the called party by using a verification main key to determine that the verification is passed;
obtaining a session key skey based on the material transformation of the session key by adopting a cryptographic function conforming to forward security;
and 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:
responding to the original INVITE message, reading the original INVITE response message redirected to an Outbound (OUTPUT) of the SIP _ QUEUE by an encryption agent program running on the original INVITE response message, reconstructing the original INVITE response message, and adding an extended parameter a field to bear session key check related information:
a=verify noncev+noncev_encrypted_xxx
namely, a second authentication random number generated by the called party integrated secure storage medium in real time and a second authentication random number cipher text encrypted with the session key skey generated by the called party are added.
And calling an interface function to place 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 is passed, obtaining 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 calling and called parties terminate the call, the called party operates an encryption agent to read a BYE message or a CANCEL message redirected to an SIP _ QUEUE QUEUE;
and deleting the RTP voice stream transparent encryption rule and clearing the session key skey, and then, re-stacking and sending the BYE message or the CANCEL message.
It should be noted that other embodiments or implementation methods of the VoIP terminal according to the present invention can refer to the above method embodiment 2, and it is not redundant here.
As shown in fig. 6, a sixth embodiment of the present invention further provides a VoIP encryption and decryption system implemented by using transparent proxy and quantum key pre-charging, 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, 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, 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-charged by the quantum key distribution network is stored in the secure storage medium;
the first VoIP terminal 10 calls the encryption agent module, runs the encryption agent program, and redirects the INVITE message of the SIP protocol to the SIP _ QUEUE;
the first VoIP terminal 10 calls the data transceiver module, reads the INVITE message redirected to the SIP _ QUEUE, and sends a session key application to a 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 session key material ciphertexts of the calling and called parties, a session key material check value of the calling and called parties, and an ID (identity) of a second main key adopted by the encryption and the check of the calling and called parties, and the second main key is a quantum key corresponding to the identifications of the calling and called parties in the quantum key distribution network;
the first VoIP terminal 10 calls the key management module, acquires the corresponding master key from the secure storage medium integrated with the first VoIP terminal based on the ID of the second master key, decrypts and verifies the cipher text of the session key material, and obtains the session key skey and reconstructs the INVITE message of the SIP protocol;
the first VoIP terminal 10 calls the data transceiver module, sends the reconstructed SIP INVITE message to the first VoIP terminal, so that the called party generates the session key skey and the INVITE response message, wherein RTP protocol ports of the calling and called parties are written in a media field in the INVITE response message, and an extended parameter a field is added
The first VoIP terminal 10 calls the data transceiver module, receives the INVITE response message, redirects the INVITE response message to the push of the SIP _ QUEUE, reads the RTP protocol ports of the calling and called parties written in the media field in the INVITE response message, sets the RTP voice stream transparent encryption rule, and performs VoIP encrypted voice communication with the second VoIP terminal.
In the embodiment, the large-capacity symmetric main key generated by the QKD network is pre-filled in the VoIP terminal and used, and a key management system based on the QKD network and a management center is completely separated from a key management system of the VoIP terminal, so that the system has no coupling relation, and is simple and efficient; the high-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 is realized in the real sense, and the safety of the whole system is enhanced from the top layer; and an encryption agent which is completely transparent to the VoIP application is operated in the VoIP terminal, so that the audio and video encryption of the VoIP terminal is realized under the condition of no influence and zero modification on the VoIP protocol stack and the application.
As shown in fig. 7, a working flow of implementing the VoIP encryption and decryption system by using transparent proxy and quantum key pre-charging according to this embodiment is as follows:
(1) And 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) The method comprises the steps of respectively inserting the secure storage medium into a first VoIP terminal and a second VoIP terminal, operating an initialization program to carry out integrity check on the secure storage medium, obtaining use authorization of a main secret key stored in the secure storage medium through modes such as PIN code verification and the like, and ensuring that the secure storage medium is in an available state before an encrypted VoIP phone is dialed.
(3) The first VoIP terminal runs the encryption agent, the encryption agent executes the relevant instructions of the operating system, and the protocol message of the SIP is redirected to the encryption agent. The root authority is required to be obtained on the Android system, the following instructions are executed on the Linux and the Android system to redirect an INVITE message of an SIP protocol to a user space, the SIP message is processed by an encryption agent program and then enters a protocol stack again to be processed 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) And the first VoIP terminal initiates an SIP call, and an encryption agent program operated by the first VoIP terminal calls a libnetfilter _ QUEUE function library to read the SIP message redirected to the SIP _ QUEUE QUEUE. In an encryption agent program of a first VoIP terminal, for an INVITE message of an Outbound (OUTPUT), triggering key application, sending a key application message TO a management center, applying for a session key between VOIP terminals indicated by FROM and TO in the SIP message, wherein the content of the key application message comprises VOIP addresses indicated by FROM and TO, randomly adopting any master key of the terminal as a first master key TO carry out HMAC integrity check calculation on the application message, and attaching a check value and the used first master key ID TO the message.
(5) The management center forwards the key application message to the QKD network node, the QKD network node takes out a corresponding calling party main key according to the first VoIP terminal main key ID to carry out HMAC verification on the content of the key application message, a quantum random number generator is used for generating session key materials in real time after verification is correct, any main key of the first VoIP terminal and any main key of the second VoIP terminal are respectively adopted as a second main key to encrypt the key materials at random, HMAC integrity verification is carried out, and a key application response message consisting of a cipher text, a verification value and the main key ID for encryption and verification of the session key materials of the first VoIP terminal and the second VoIP terminal is sent to the management center and is further forwarded to the calling party by the management center.
(6) After receiving the key application response message, the first VoIP terminal takes out the master key according to the second master key ID to decrypt the session key material and perform HMAC verification, then reconstructs INVITE message of SIP protocol, transforms the session key skey on the basis of the key material by adopting cryptographic function (such as HMAC) conforming to forward security, and adds an extended parameter a field in SDP (session description protocol) of 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 ID of the main key used for encryption of the called party taken from the response message, the cipher text of the session key material encrypted by the main key, the ID of the main key used for computing the HMAC, the HMAC of the session key material computed by the main key, and the verification random number generated in real time and the cipher text of the verification random number encrypted by skey. Then calling an interface function to send the reconstructed SIP message into a protocol stack;
(7) And the second VoIP terminal receives the INVITE message of the SIP protocol, the encryption agent program operated on the second VoIP terminal reads the INVITE message redirected to an INPUT (INPUT) of the SIP _ QUEUE QUEUE, a corresponding main key is taken out from the message according to the main key ID to carry out HMAC verification and decrypt a key material, and a session key skey is converted on the basis of the key material in the same way as the calling party and is used for decrypting the verification random number. After the verification is passed, the SIP message is reconstructed, the key related information added by the calling party agent is removed, and the original SIP message is recovered and put into a protocol stack to be received by the called party.
(8) The second VoIP terminal responds to the INVITE message, the encryption agent program running thereon reads the INVITE response message redirected to the OUTPUT (OUTPUT) of the SIP _ QUEUE, reconstructs the message, and adds an extended parameter a field to carry session key check related information:
a=verify noncev+noncev_encrypted_xxx
namely, the verification random number generated in real time and the verification random number ciphertext encrypted by skey are added. And then calling an interface function to place the reconstructed SIP message into a protocol stack for sending. 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 DECRYPT are modules developed according to a netfilter mechanism of Linux, belong to a part of an encryption agent module, and carry out transparent encryption and decryption processing on the content of a data message, wherein an encryption mode is CBC (integral multiple of algorithm packet length) + OFB (algorithm packet length mantissa).
(9) The first VoIP terminal receives the INVITE response message, and the encryption agent running thereon reads the INVITE response message redirected to the Inbound (INPUT) of the SIP _ QUEUE, and decrypts the authentication random number using skey. After the verification is passed, the SIP message is reconstructed, the key related information added by the second VoIP terminal agent is removed, and the original SIP response message is recovered and put into a protocol stack to be received by the calling party. Meanwhile, the first VoIP terminal reads RTP-CALL/RTP-CALLED of RTP protocol ports of the calling party and the CALLED party according to media fields (m fields) in the INVITE and the response message, 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 DECRYPT are kernel modules developed according to a netfilter mechanism of Linux, belong to a part of an encryption agent module, and are used for transparently encrypting and decrypting the content of a data message, and the encryption mode is CBC (integral multiple of 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 (integral multiple of algorithm packet length) + OFB (algorithm packet length mantissa), without influencing a frame header control field.
(11) When any party hangs up or the call is terminated, the encryption agent programs operated by the first VoIP terminal and the second VoIP terminal read the BYE or CANCEL message redirected to the SIP _ QUEUE QUEUE, delete the RTP voice stream encryption rule and clear the session key, and then put the BYE or CANCEL message on the stack again for transmission.
It should be noted that the logic and/or steps shown in the flowcharts or otherwise described herein, such as an ordered listing of executable instructions that can be considered to implement logical functions, can 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). Further, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can 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 should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, 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, any one or combination of the following technologies, which are well known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description of the specification, reference to the description of "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like 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 invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. 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 "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Although embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are exemplary and not to be construed as limiting the present invention, and that changes, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (17)

1. A method for realizing VoIP encryption and decryption by adopting transparent proxy and quantum key pre-charging is characterized in that the method is applied to a VoIP terminal, a secure storage medium is integrated in the VoIP terminal, a main 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 comprises the following steps:
the calling party operates an encryption agent and redirects an INVITE message of an SIP protocol to an SIP _ QUEUE QUEUE;
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 INVITE message popped up so that the management center can forward the session key application to a QKD network node, wherein the session key application comprises addresses of a calling party and a called party, ID (identity) of a first main key and a check value obtained by carrying out check calculation on the session key application by using the first main key, and the first main key is stored in the 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, the key application response message comprises session key material ciphertexts 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) of a second main key adopted by the encryption and the check of the calling party and the called party, and the second main key is a quantum key corresponding to the identifications of the calling party and the called party in the quantum key distribution network;
the calling party acquires a corresponding main key from the integrated safe storage medium based on the ID identification of the second main key, decrypts and verifies the session key material ciphertext to obtain a session key skey and reconstructs an INVITE message of an SIP protocol;
a calling party sends a reconstructed SIP protocol INVITE message to a called party so that the called party generates the session key skey and an INVITE response message, RTP protocol ports of a calling party and a called party are written in media fields in the INVITE response message, and an extended parameter a field is added;
the calling party receives the INVITE response message, redirects the INVITE response message to the stack entry of an 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 an RTP voice stream transparent encryption rule;
and the calling party and the called party perform VoIP encryption voice communication based on the session key skey and the RTP voice stream transparent encryption rule.
2. The method of claim 1 for implementing VoIP encryption and decryption using a transparent proxy and quantum key pre-charging, wherein before the calling party runs an encryption proxy to redirect the INVITE message of SIP protocol to SIP _ QUEUE, the method further comprises:
sending a registration request to the management center;
and receiving the binding relationship between the VoIP terminal address returned by the management center and the QKD identity UID.
3. The method of claim 1 for implementing VoIP encryption and decryption using transparent proxy and quantum key pre-charging, wherein before the calling party runs an encryption proxy to redirect an INVITE message of SIP protocol to a SIP _ QUEUE, the method further comprises:
the calling party runs an initialization program to carry out integrity check on the secure storage medium;
and when the check is passed, obtaining the use authorization of the master key stored in the secure storage medium.
4. The method for implementing VoIP encryption and decryption through transparent proxy and quantum key pre-charging according to claim 1, wherein the calling party obtains a corresponding master key from the integrated secure storage medium based on the ID of the second master key, decrypts and verifies the ciphertext of the session key material to obtain a skey of the session key, and reconstructs an INVITE message of an SIP protocol, including:
according to the ID identification of the second master key, acquiring a corresponding master key from the integrated safe storage medium, 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 main key to obtain a session key material of the calling party;
verifying the session key material check value of the calling party by using a verification main key to determine that the verification is passed;
obtaining a session key skey based on the material transformation of the session key by adopting a cryptographic function conforming to forward security;
and adding an extended parameter a field in an SDP message body of the INVITE message to obtain the reconstructed INVITE message of the SIP protocol, wherein the extended parameter a field bears 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 encryption and check of the called party, a verification random number generated by the safe storage medium integrated by the 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 using transparent proxy and quantum key pre-injection according to claim 4, wherein an extended parameter a field in the INVITE response message carries session key check information, which 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 cipher text encrypted with a session key skey generated by the called party;
the calling party receives the INVITE response message, redirects the INVITE response message to the stacking 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 RTP voice stream transparent encryption rule, including:
the calling party runs an encryption agent and reads the INVITE response message which is redirected to the stack of the SIP _ QUEUE QUEUE;
the calling party uses the session key skey generated by the calling party to decrypt and verify the second verification random number ciphertext;
after the verification is passed, the calling party removes the key verification information added by the called party in the INVITE response message to obtain an INVITE original response message,
and the calling party reads RTP protocol ports of the calling party and the called party written in the media field in the original INVITE response message and sets an RTP voice stream transparent encryption rule.
6. The method of claim 1, wherein the VoIP encryption and decryption method using transparent proxy and quantum key pre-charging comprises:
and the calling party and the called party carry out VoIP encryption voice communication and carry out transparent encryption and decryption processing on the data message, wherein the encryption mode adopts a CBC algorithm combined with an OFB algorithm.
7. The method of claim 4 for implementing VoIP encryption and decryption using a transparent proxy and quantum key pre-charging, the method further comprising:
when the calling party and the called party are terminated, the calling party operates an encryption agent to read a BYE message or a CANCEL message redirected to an SIP _ QUEUE QUEUE;
and deleting the RTP voice stream transparent encryption rule, clearing the session key skey, and then, re-stacking and sending the BYE message or the CANCEL message.
8. A method for realizing VoIP encryption and decryption by adopting transparent proxy and quantum key pre-charging is characterized in that 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 comprises the following steps:
the called party receives a reconstructed SIP protocol INVITE message sent by a calling party, an extended 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 encryption and check of the called party, a verification random number generated by the 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 an 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 the verification is passed, removing the key related information added by the calling party in the reconstructed SIP protocol INVITE message to obtain an original INVITE message of the SIP protocol;
the called party responds to the original INVITE message of the SIP protocol and operates an encryption agent to redirect to an INVITE response message popped from an SIP _ QUEUE QUEUE;
reading RTP protocol ports of a calling party and a called party in media fields in the INVITE response message, and setting an RTP voice stream transparent encryption rule;
and adding an extended parameter a field in an SDP message body of the INVITE response message, wherein the extended parameter a field is used for bearing session key verification related information, and the reconstructed INVITE response message is put into a protocol stack and is sent to a calling party.
9. The method of claim 8, wherein the steps of regenerating the session key skey and decrypting and verifying the first verification random number ciphertext based on the reconstructed SIP INVITE message comprise:
according to the ID identification of the second master key, acquiring a corresponding master key from the secure storage medium integrated by the called party, wherein the acquired corresponding master key comprises a decryption master key and a verification master key;
decrypting the session key material ciphertext of the called party by using the decryption main key to obtain a session key material of the called party;
verifying the session key material check value of the called party by using a verification main key to determine that the verification is passed;
obtaining a session key skey based on the material transformation of the session key by adopting a cryptographic function conforming to forward security;
and decrypting and verifying the first verification random number ciphertext based on the session key skey.
10. The method 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 the management center;
and receiving the binding relationship between the VoIP terminal address and the QKD identity UID returned by the management center.
11. The method 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 is passed, obtaining 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-charging as claimed in claim 10, wherein said method further comprises:
when the calling party and the called party are terminated, the called party operates an encryption agent to read a BYE message or a CANCEL message redirected to an SIP _ QUEUE QUEUE;
and deleting the RTP voice stream transparent encryption rule, clearing the session key skey, and then, re-stacking and sending the BYE message or the CANCEL message.
13. A method for realizing VoIP encryption and decryption by adopting transparent proxy and quantum key pre-charging is characterized in that the method is applied to a quantum key distribution network 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 addresses 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 using the first master key, and the first master key is any master key stored in the safe storage medium integrated by the calling party;
according to the ID identification of the first master key, taking out the master key corresponding to the calling party, and carrying out HMAC integrity check on the content applied by the session key;
after the verification is passed, a quantum random number generator is called to generate session key materials of the calling party and the called party in real time;
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 carrying out HMAC integrity check;
and generating a key application response message, wherein the key application response message comprises session key material ciphertexts 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) of a second main key adopted by the encryption and the 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-charging as claimed in claim 13, wherein said method further comprises:
receiving a key charging request sent by a VoIP terminal;
and based on the key filling request, filling a master key into a secure storage medium integrated in the VoIP terminal, wherein the format of the master key is 4 bytes of key ID + n bytes of key + n bytes of initialization vector.
15. A VoIP terminal is characterized in that a first encryption agent module, a first key management module, a first secure storage medium and a first data transceiver module are integrated in the VoIP terminal, the first encryption agent module comprises an encryption agent program running in a user space and an ENCRYPT/DECRYPT transparent encryption and decryption module running in a kernel space, and a main 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 operating the encryption agent program and redirecting an INVITE message of an SIP protocol to an SIP _ QUEUE QUEUE;
the first data transceiver module is configured to read an INVITE message redirected to an SIP _ query 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 addresses of both calling and called parties, an ID of a first master key, and a check value obtained by performing check calculation 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, the key application response message includes session key material ciphertexts of the calling and called parties, a session key material check value of the calling and called parties, and an ID identifier of a second main key used for encryption and check of the calling and called parties, and the second main key is a quantum key corresponding to the identifiers of the calling and called parties in the quantum key distribution network;
the first key management module is used for acquiring a corresponding main key from the integrated secure storage medium based on the ID identification of the second main key, decrypting and verifying the session key material ciphertext to obtain a session key skey and reconstructing an INVITE message of an 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 party generates the session key skey and an INVITE response message, where RTP protocol ports of both calling and called parties are written in a media field in the INVITE response message, and an extended parameter a field is added; and the RTP voice stream transparent encryption module is used for receiving the INVITE response message, redirecting the INVITE response message to the stack entry of an SIP _ QUEUE QUEUE, reading RTP protocol ports of the calling party and the called party written in a media field in the INVITE response message, and setting an RTP voice stream transparent encryption rule; and the voice communication module is used for carrying out VoIP encryption voice communication based on the session key skey and the RTP voice stream transparent encryption rule.
16. A VoIP terminal is characterized in that a second encryption agent module, a second key management module, a second secure storage medium and a second data transceiver module are integrated in the VoIP terminal, the second encryption agent module comprises an encryption agent program running in a user space and an ENCRYPT/DECRYPT transparent encryption and decryption module running in a kernel space, and a main key pre-filled by a quantum key distribution network is stored in the second secure storage medium;
the second data transceiver module is configured to receive a reconstructed SIP INVITE message sent by a calling party, where an extension parameter a field is added to an SDP message body of the reconstructed SIP INVITE message and 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 of a second master key used for encryption and verification of the called party, a verification random number generated in real time by the secure storage medium integrated with the calling party, and a first verification random number ciphertext generated by the calling party and encrypted by a session key skey;
the second encryption agent module is used for operating the encryption agent program and redirecting the reconstructed SIP protocol INVITE message which is stacked in an 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 the verification is passed, removing the key related information added by the calling party in the reconstructed SIP protocol INVITE message to obtain an original INVITE message of the SIP protocol;
the second data transceiver module is used for responding to the original INVITE message of the SIP protocol and operating the encryption agent program to redirect to an INVITE response message popped from an SIP _ QUEUE QUEUE; reading RTP protocol ports of a calling party and a called party in media fields in the INVITE response message, and setting an RTP voice stream transparent encryption rule; and adding an extension parameter a field in an SDP message body of the INVITE response message for bearing session key verification related information, and putting the reconstructed INVITE response message into a protocol stack to be sent to a calling party.
17. A VoIP encryption and decryption system realized by transparent proxy and quantum key pre-charging 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;
the first VoIP terminal calls the encryption agent module, runs the encryption agent program and redirects an INVITE message of an SIP protocol to an SIP _ QUEUE QUEUE;
the first VoIP terminal calls the data transceiver 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 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 session key material ciphertexts of the calling and called parties, a session key material check value of the calling and called parties, and an ID (identity) of a second main key adopted by the encryption and the check of the calling and called parties, and the second main key is a quantum key corresponding to the identifications of the calling and called parties in the quantum key distribution network;
the first VoIP terminal calls the key management module, acquires a corresponding main key from the integrated safe storage medium based on the ID identification of the second main key, decrypts and verifies the cipher text of the session key material to obtain a session key skey and reconstructs an INVITE message of an SIP (session initiation protocol);
the first VoIP terminal calls the data transceiver module, sends the reconstructed SIP protocol INVITE message to the first VoIP terminal, so that the called party generates the session key skey and an INVITE response message, RTP protocol ports of the calling party and the called party are written in a media field in the INVITE response message, and an extended parameter a field is added
And the first VoIP terminal calls the data transceiver module, receives the INVITE response message, redirects the INVITE response message to the stack entry of an SIP _ QUEUE QUEUE, reads RTP protocol ports of the calling party and the called party written in media fields in the INVITE response message, sets an RTP voice stream transparent encryption rule and carries out VoIP encrypted voice communication with a 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 true CN115567209A (en) 2023-01-03
CN115567209B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116684093A (en) * 2023-08-02 2023-09-01 中电信量子科技有限公司 Identity authentication and key exchange method and system
CN116743380A (en) * 2023-08-14 2023-09-12 中电信量子科技有限公司 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

Cited By (3)

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

Also Published As

Publication number Publication date
CN115567209B (en) 2023-09-22

Similar Documents

Publication Publication Date Title
KR101438243B1 (en) Sim based authentication
US8275403B2 (en) Security in a mobile communication system
CN115567209B (en) VoIP encryption and decryption method by adopting transparent proxy and quantum key pre-filling
JP4515411B2 (en) Reusing security associations to improve handover performance
CN101330504B (en) Method for implementing transport layer safety of SIP network based on sharing cryptographic key
CN110870277A (en) Introducing middleboxes into secure communication between a client and a server
EP1374533B1 (en) Facilitating legal interception of ip connections
EP2140711A1 (en) An authentication method
CN115567210A (en) Method and system for realizing zero trust access by quantum key distribution
CN115567206A (en) Method and system for realizing encryption and decryption of network data message by quantum distribution key
CN112602344A (en) End-to-end security for roaming 5G-NR communications
CN114630290A (en) Key agreement method, device, equipment and storage medium for voice encryption communication
WO2017197968A1 (en) Data transmission method and device
WO2023216531A1 (en) Communication authentication processing method and apparatus, device and computer readable storage medium
CN115589288A (en) Method for realizing end-to-end VoIP encrypted communication based on quantum key pre-charging
CN115567192A (en) Method and system for realizing transparent encryption and decryption of multicast data by quantum key distribution
CN114040385A (en) VoLTE-based encrypted call system and method
Khozooyi et al. Security in mobile governmental transactions
CN114567439B (en) Identity authentication method and device
CN114205170B (en) Bridging port platform networking communication and service encryption calling method
US20240097903A1 (en) Ipcon mcdata session establishment method
CN115941178A (en) Method for realizing OPC UA reverse proxy server supporting encryption mode
CN115589292A (en) Encrypted call method and system for realizing end-to-end VoIP (Voice over Internet protocol) one-call multi-secret
CN114531225A (en) End-to-end communication encryption method, device, storage medium and terminal equipment
CN117812581A (en) Session data secure communication method, post quantum secure channel device and system

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