Conversation encryption method and device, equipment, storage medium and program product
By generating the first access tree in the blockchain network and encrypting call data using the system public key, the problem of complex key negotiation and inability to support multi-party calls in the existing encrypted call technology is solved, decentralized encryption and decryption management is realized, and call security and flexibility are improved.
Patent Information
- Application Number
- CN202411619566.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-18
AI Technical Summary
In the existing encrypted call technology, the key negotiation process is complicated and cannot support multi-party calls, and there is a single point of failure and risk of being attacked.
The blockchain network is used for encryption and decryption management, and the call data is encrypted by generating the first access tree and using the system public key to encrypt the call data, decentralized encryption and decryption management is realized, and multi-party secure calls are supported.
Improve call security, support multi-party encrypted calls, and enhance flexibility, avoiding single point of failure and attack risks.
Smart Images

Figure CN119653353A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to an encrypted call method, device, equipment, storage medium and program product. Background Art
[0002] In order to ensure the privacy and security of calls, it is usually necessary to encrypt call data. In related technologies, end-to-end encryption is usually used to protect call data, and the encryption key is negotiated by both parties of the call or allocated by a third-party key management center to each terminal participating in the encrypted call.
[0003] However, the key negotiation process is complex and cannot support multi-party calls. The method of uniformly distributing keys by a third-party key management center has a single point of failure and the risk of attack. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide an encrypted call method, device, equipment, storage medium and program product, which are used to achieve decentralized encryption and decryption management, improve call security, and support multi-party secure calls.
[0005] In order to achieve the above objectives, the present application embodiment adopts the following technical solutions: In a first aspect, an embodiment of the present application provides an encrypted call method, which is applied to a blockchain network, and the method includes: receiving an encrypted call request from a first terminal, the encrypted call request being used to request an encrypted call with a second terminal having second attribute information; In response to an encrypted call request from a first terminal, generating a first access tree based on first attribute information and the second attribute information of the first terminal, and returning the first access tree to the first terminal; receiving a first ciphertext from the first terminal, where the first ciphertext is obtained by encrypting call data of the first terminal using a system public key of the blockchain network and the first access tree; The first ciphertext is forwarded to the second terminal.
[0006] In a second aspect, an embodiment of the present application provides an encrypted call method, which is applied to a first terminal, and the method includes: Sending an encrypted call request to the blockchain network, where the encrypted call request is used to request an encrypted call with a second terminal having second attribute information; Receiving a first access tree from the blockchain network, and encrypting call data of the first terminal using the first access tree and a system public key of the blockchain network to obtain a first ciphertext, wherein the first access tree is generated based on first attribute information and the second attribute information of the first terminal; The first ciphertext is sent to the blockchain network, where the first ciphertext is used by the blockchain network to forward to the second terminal.
[0007] In a third aspect, an embodiment of the present application provides an encrypted call method, which is applied to a second terminal, and the method includes: receiving a first ciphertext from a blockchain network, where the first ciphertext is obtained by encrypting call data of the first terminal by using a first access tree and a system public key of the blockchain network, where the first access tree is generated by the blockchain network based on first attribute information and the second attribute information of the first terminal and sent to the first terminal when the first terminal requests an encrypted call with a second terminal having second attribute information; The first ciphertext is decrypted using the system public key and the second attribute information to obtain the call data of the first terminal.
[0008] In a fourth aspect, an embodiment of the present application provides an encrypted call device, which is applied to a blockchain network, and the device includes: A first receiving module, configured to receive an encrypted call request from a first terminal, wherein the encrypted call request is used to request an encrypted call with a second terminal having second attribute information; A first generating module, configured to generate a first access tree based on the first attribute information and the second attribute information of the first terminal in response to the encrypted call request, and return the first access tree to the first terminal; The first receiving module is further used to receive a first ciphertext from the first terminal, where the first ciphertext is obtained by encrypting the call data of the first terminal using the system public key of the blockchain network and the first access tree; The first sending module is used to forward the first ciphertext to the second terminal.
[0009] In a fifth aspect, an embodiment of the present application provides an encrypted call device, applied to a first terminal, the device comprising: A second sending module, used to send an encrypted call request to the blockchain network, where the encrypted call request is used to request an encrypted call with a second terminal having second attribute information; a first processing module, configured to receive a first access tree from the blockchain network, and to encrypt call data of the first terminal using the first access tree and a system public key of the blockchain network to obtain a first ciphertext, wherein the first access tree is generated based on first attribute information and the second attribute information of the first terminal; The second sending module is also used to send the first ciphertext to the blockchain network, and the first ciphertext is used by the blockchain network to forward it to the second terminal.
[0010] In a sixth aspect, an embodiment of the present application provides an encrypted call device, applied to a second terminal, the device comprising: A third receiving module is used to receive a first ciphertext from a blockchain network, where the first ciphertext is obtained by encrypting call data of the first terminal by using a first access tree and a system public key of the blockchain network, and the first access tree is generated by the blockchain network based on the first attribute information and the second attribute information of the first terminal and sent to the first terminal when the first terminal requests an encrypted call with a second terminal having second attribute information; The second processing module is used to decrypt the first ciphertext by using the system public key and the second attribute information to obtain the call data of the first terminal.
[0011] In a seventh aspect, an embodiment of the present application provides an electronic device, including: processor; a memory for storing instructions executable by the processor; In which, the processor is configured to execute the instructions to implement the encrypted call method provided in the first aspect; or, the processor is configured to execute the instructions to implement the encrypted call method provided in the second aspect; or, the processor is configured to execute the instructions to implement the encrypted call method provided in the third aspect.
[0012] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the encrypted call method provided in the first aspect; or, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the encrypted call method provided in the second aspect; or, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the encrypted call method provided in the third aspect.
[0013] In the ninth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps in the encrypted call method provided in the first aspect; or, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps in the encrypted call method provided in the second aspect; or, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps in the encrypted call method provided in the third aspect.
[0014] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: When the first terminal requests encryption with the second terminal having the second attribute information, the blockchain network generates a first access tree for the first terminal and returns it to the first terminal. The first terminal uses the first access tree and the system public key of the blockchain network to encrypt the call data of the first terminal to obtain the first ciphertext, and forwards the first ciphertext to the second terminal through the blockchain network. In this way, an encrypted call between the first terminal and the second terminal is realized. Secondly, the first access tree is a data structure for encryption and decryption, and is generated by the blockchain network. The decentralized and tamper-proof characteristics of the blockchain network and the recursive structure of the first access tree limit the access to the call data encrypted by the first access tree to only the party having the second attribute information, thereby improving the call security between the first terminal and the second terminal. In addition, the first terminal only needs to specify the second attribute information that the terminal that can encrypt the call with it must have, without specifying a specific mobile phone number, so that any second terminal with the second attribute information can participate in the encrypted call, thereby realizing multi-party encrypted calls and improving the flexibility of encrypted calls. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 A schematic diagram of a system architecture involved in an embodiment of the present application; Figure 2 A flowchart of an encrypted call method provided by an embodiment of the present application; Figure 3 A schematic diagram of the structure of a first access tree provided for an embodiment of the present application; Figure 4 A flowchart of an encrypted call method provided for another embodiment of the present application; Figure 5 A schematic diagram of the structure of a second access tree provided for one embodiment of the present application; Figure 6 A flowchart of an encrypted call method provided for another embodiment of the present application; Figure 7 A flowchart of an encrypted call method provided for another embodiment of the present application; Figure 8 A flowchart of an encrypted call method provided for another embodiment of the present application; Fig. 9 A flowchart of an encrypted call method provided for another embodiment of the present application; Fig.10 A schematic diagram of the structure of an encrypted communication device provided by an embodiment of the present application; Fig.11 A schematic diagram of the structure of an encrypted communication device provided by another embodiment of the present application; Fig.12 A schematic diagram of the structure of an encrypted communication device provided by another embodiment of the present application; Fig.13 A schematic diagram of the structure of an electronic device provided for one embodiment of the present application. DETAILED DESCRIPTION
[0016] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0017] The terms "first", "second", etc. in this specification and claims are used to distinguish similar objects, and are not used to describe a particular order or precedence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein. In addition, "and / or" in this specification and claims means at least one of the connected objects, and the character " / " generally means that the objects associated with each other are in an "or" relationship.
[0018] Before introducing the encrypted call method provided by the embodiment of the present application in detail, a brief introduction to the system architecture involved in the embodiment is given first. Figure 1 , is a schematic diagram of a system architecture shown in an embodiment of the present application, wherein the system mainly includes multiple terminals 110, an enterprise platform 120 to which each terminal belongs, and a blockchain network 130. A communication connection is established between each terminal 110 and its enterprise platform 120, between each terminal 110 and the blockchain network 130, and between each enterprise platform 120 and the blockchain network 130.
[0019] As an example, the blockchain network 130 includes multiple blockchain nodes and blockchains. The blockchain node is used to uniformly manage the encryption and decryption strategies and write them into the blockchain, and then send them to the enterprise platform 120 to which each terminal 110 belongs, which is forwarded by the enterprise platform 120 to each terminal 110. Each terminal 110 encrypts its own call data based on the encryption and decryption strategy and then forwards it to the other party through the blockchain node, and decrypts the ciphertext of the call data forwarded by the other party through the blockchain node. In this way, not only can the decentralized and tamper-proof characteristics of the blockchain be utilized to realize decentralized encryption and decryption strategy management and improve call security, but it is also beneficial for each enterprise platform 120 to monitor the call process of the terminal 110 of its own user.
[0020] The blockchain is used to store relevant data generated during the encrypted call process between multiple terminals 110, including but not limited to: the encryption and decryption strategies generated by the blockchain nodes, the ciphertext of the call data sent by each terminal 110, the public keys of each enterprise platform 120, etc.
[0021] Based on the system architecture introduced above, the encrypted call method provided in the embodiment of the present application is described in detail with reference to the accompanying drawings.
[0022] Please refer to Figure 2 , is a flowchart of an encrypted call method provided by an embodiment of the present application, which describes a specific implementation method of interaction between a first terminal, a blockchain network, and a second terminal. Figure 2 As shown, the method comprises the following steps: S202: The first terminal sends an encrypted call request to the blockchain network.
[0023] The encrypted call request is used to request an encrypted call with a second terminal having second attribute information. In the embodiment of the present application, each terminal has corresponding attribute information, which may include but is not limited to: the user ID, name, mobile phone number, and platform ID (Eid) of the enterprise platform to which the called party belongs.
[0024] As an example, the encrypted call request may carry the second attribute information. The second attribute information may be specified by the first terminal according to actual needs. Exemplarily, the first terminal displays a control for inputting the attribute information in the call operation interface, and the user of the first terminal inputs the second attribute information through the control.
[0025] S204, the blockchain network responds to the encrypted call request, generates a first access tree based on the first attribute information and the second attribute information of the first terminal, and returns it to the first terminal.
[0026] The first access tree is a data structure used to describe encryption and decryption strategies, which uses a tree structure to represent the conditions that must be met for an encrypted call with the first terminal. In the embodiment of the present application, the first access tree is used to describe the second attribute information required for an encrypted call with the first terminal.
[0027] Specifically, the first access tree includes a connected root node, a first leaf node, and a second leaf node. The first leaf node corresponds to the first attribute information. The second leaf node corresponds to the second attribute information. The root node represents the logical relationship between the first leaf node and the second leaf node to form the conditions required to perform an encrypted call with the first terminal. As an example, the root node adopts the number of connected leaf nodes. and a threshold To describe. When , it is an OR gate, that is, the logical relationship represented is "or"; when When , it is an AND gate, which means the logical relationship it represents is "and".
[0028] For example, if terminal A requests to have an encrypted conversation with terminals with the second attributes id_B1 and id_B2, the blockchain network generates the following Figure 3 The first access tree shown. The first access tree includes a root node R, a first leaf node id_A, and two second leaf nodes id_B1 and id_B2, wherein the first leaf node id_A corresponds to the first attribute information of terminal A, the second leaf node id_B1 corresponds to the second attribute information id_B1, and the second leaf node id_B2 corresponds to the second attribute information id_B2. The logical relationship represented by the root node R is "or", that is, the terminal with the second attribute id_B1 or id_B2 can have an encrypted conversation with terminal A.
[0029] In addition, in order to accurately identify and forward the ciphertext of the call data between the first terminal and the second terminal, the blockchain network can also add a platform identifier as a prefix before the attribute information corresponding to each leaf node. The prefix of the first leaf node is the platform identifier of the first enterprise platform to which the first terminal belongs, and the prefix of the second leaf node is the platform identifier of the second enterprise platform to which the second terminal belongs.
[0030] In an embodiment of the present application, after generating the first access tree, the blockchain network can return the first access tree to the first terminal in various appropriate ways.
[0031] In one embodiment, the blockchain network can return the first access tree directly to the first terminal. Considering that in the encryption process based on the first access tree, it is usually necessary to generate a corresponding ciphertext for each leaf node to achieve the purpose of hiding the first access tree, and the ciphertext corresponding to each leaf node is usually generated by the index value of the leaf node and the polynomial generated for the root node, and the polynomial contains a constant. Based on this, the blockchain node can also generate a third random number and send it directly to the first terminal. The third random number can be used by the first terminal as a constant in the polynomial of the root node to achieve the hiding of the first access tree in the process of generating the first ciphertext, thereby further improving the security of the call. Among them, the third random number is randomly selected from the prime number field.
[0032] In another embodiment, the blockchain network returns the first access tree to the first enterprise platform to which the first terminal belongs, and the first access tree is used by the first enterprise platform to generate a third random number, and the third random number and the first access tree are sent to the first terminal. In this way, the third random number is owned by the first enterprise platform, which can not only reduce the risk of illegal persons obtaining the third random number and obtaining call data, further improve call security, but also facilitate the first enterprise platform to monitor the call data of the first terminal.
[0033] It should be noted that the blockchain network can also generate a call identifier SessionId for the call in response to the encrypted call request to uniquely identify the call, store the call identifier in correspondence with all data generated during the call, and return the call identifier to the first terminal.
[0034] In another embodiment, the blockchain network further generates a system public key and a system private key before the above S204. The system public key can be shared with the first terminal, the first enterprise platform, the second terminal with the second attribute information, and the second enterprise platform to which the second terminal belongs, but the system private key is only stored in the blockchain to prevent the system private key from being leaked.
[0035] As an example, the system public key is generated by the first random number. In order to prevent illegal persons from obtaining the system public key from the blockchain network, the blockchain network includes n blockchain nodes, and the blockchain network can divide the first random number into n parts to obtain n second random numbers, and store the n second random numbers in the n blockchain nodes respectively, and each blockchain node stores a second random number.
[0036] As an example, the system public key may be generated by the following formula (1), and the system private key may be generated by the following formula (2).
[0037] (1) (2) in, Represents the system public key; Indicates the system private key; represents a bilinear group, which supports bilinear mappings; Represents the generator of the bilinear group, which is used to construct all other elements in the bilinear group; represents a bilinear map; represents the first random number; Represents the fourth random number.
[0038] S206: The first terminal uses the first access tree and the system public key of the blockchain network to encrypt the call data of the first terminal to obtain a first ciphertext.
[0039] The call data may include but is not limited to voice data, video data, etc.
[0040] In one embodiment, after the above S202, the first terminal also receives a third random number from the first enterprise platform. Accordingly, in the above S206, the first terminal uses the system public key of the blockchain network and the third random number to encrypt the call data of the first terminal to obtain the fifth ciphertext; performs exponential operation on the third random number to obtain the sixth ciphertext; generates a polynomial of the root node based on the third random number, and generates the seventh ciphertext of each leaf node based on the polynomial and the index value of each leaf node in the first access tree; generates the first ciphertext based on the first access tree, the fifth ciphertext, the sixth ciphertext and the seventh ciphertext of each leaf node in the first access tree.
[0041] Exemplarily, the root node polynomial is set satisfy ,in, Represents the third random number, and the order of the polynomial is the threshold of the root node minus 1, and then the polynomial is randomly generated Then, for each leaf node, the node value of the leaf node is generated based on the polynomial of the root node and the index value of the leaf node, that is, ,in, Represents a leaf node Node value, indicating a leaf node The index value of the leaf node order, such as Figure 3 The index value of the first leaf node id_A is 1, the index value of the second leaf node id_B1 is 2, and the index value of the second leaf node id_B2 is 2. Represents a leaf node The parent node of , that is, the root node.
[0042] Further, the first ciphertext is generated by the following formula (3).
[0043] (3) in, represents the first ciphertext, represents the first visited tree, represents the call data of the first terminal, represents a bilinear map, represents the first random number, Represents the system public key, represents the third random number, represents the fifth ciphertext, represents the sixth ciphertext, represents a leaf node, represents the set of leaf nodes in the first visited tree, Represents a leaf node The node value of and Represents a leaf node The seventh ciphertext, Indicates that from the leaf node The operation of extracting attribute information from .
[0044] As a result, the call data, the third random number and the first access tree of the first terminal can be better hidden in the first ciphertext, increasing the difficulty of cracking the first ciphertext and further improving the communication security. Moreover, since the third random number is generated by the first enterprise platform and the first enterprise platform stores the first attribute information, the first enterprise platform can decrypt the first ciphertext to obtain the communication data of the first terminal and realize call monitoring of the first terminal.
[0045] In another implementation, the first terminal may also generate a third random number, and according to the above encryption method, use the third random number, the system public key and the first access tree to encrypt the call data of the first terminal to obtain the first ciphertext.
[0046] The above describes some implementation methods of the above S206. Of course, it should be understood that the above S206 can also be implemented in other ways, which are not limited in the present embodiment.
[0047] S208, the first terminal sends the first ciphertext to the blockchain network.
[0048] In one embodiment, the first terminal may directly interact with the blockchain network and send the first ciphertext to the blockchain network.
[0049] In another embodiment, the first terminal may send the first ciphertext to the first enterprise platform, which forwards it to the blockchain network. This method is conducive to the first enterprise platform monitoring the call of the first terminal.
[0050] S210, the blockchain network forwards the first ciphertext to the second terminal.
[0051] In one embodiment, the blockchain network can decrypt the first ciphertext based on the system private key to obtain the first access tree, and then directly interact with the second terminal according to the second attribute information corresponding to the second leaf node in the first access tree to forward the first ciphertext to the second terminal.
[0052] In another embodiment, the blockchain network can decrypt the first ciphertext based on the system private key to obtain the first access tree, and then determine the second enterprise platform according to the prefix of the second leaf node in the first access tree, and forward the first ciphertext to the second enterprise platform to which the second terminal belongs, and the second enterprise platform forwards it to the second terminal with the second attribute information. In this way, it is convenient for the second enterprise platform to monitor the call of the second terminal.
[0053] S212: The second terminal uses the second attribute information and the system public key to decrypt the first ciphertext to obtain the call data of the first terminal.
[0054] The second terminal can decrypt the first ciphertext through a recursive algorithm. Specifically, the second terminal generates its own private key based on the second attribute information, as shown in the following formula (4); then, the first access tree is obtained from the first ciphertext, and the first ciphertext is decrypted through the recursive algorithm shown in the following formula (5) to obtain the call data of the first terminal.
[0055] (4) (5) In the above formula (4), represents the private key of the second terminal, represents the first random number, represents the fourth random number, represents the fifth random number, Indicates the second attribute information, Indicates the second attribute information The field value of the j-th attribute field in represents the fifth random number randomly generated for the jth attribute, and belong, represents the prime number field, represents a hash function, which is used to map the attribute value of the jth attribute to an element in the bilinear group. In the above formula (5), represents a recursive algorithm, represents the first ciphertext, represents the call data of the first terminal, represents the third random number, represents the fifth ciphertext, represents the sixth ciphertext, represents the system public key, and A is obtained by the following formula (6).
[0056] (6) in, Represents a leaf node. When the leaf node is a root node, .
[0057] In the encrypted call method provided by the embodiment of the present application, when the first terminal requests encryption with the second terminal having the second attribute information, the blockchain network generates a first access tree for the first terminal and returns it to the first terminal, and the first terminal uses the first access tree and the system public key of the blockchain network to encrypt the call data of the first terminal to obtain the first ciphertext, and forwards the first ciphertext to the second terminal through the blockchain network. In this way, an encrypted call between the first terminal and the second terminal is realized. Secondly, the first access tree is a data structure for encryption and decryption, and is generated by the blockchain network. The decentralized and tamper-proof characteristics of the blockchain network and the recursive structure of the first access tree limit the access to the call data encrypted by the first access tree to only the party having the second attribute information, thereby improving the call security between the first terminal and the second terminal. In addition, the first terminal only needs to specify the second attribute information that the terminal that can encrypt the call with it must have, without specifying a specific mobile phone number, so that as long as the second terminal with the second attribute information can participate in the encrypted call, it can realize multi-party encrypted calls and improve the flexibility of encrypted calls.
[0058] In another embodiment, the second terminal may also encrypt its own call data and send it to the blockchain network, which will then forward it to the first terminal.
[0059] Specifically, if Figure 4 As shown, after the above S212, the encrypted call method provided in the embodiment of the present application may further include: S214: The second terminal obtains a first access tree from the first ciphertext.
[0060] S216: The second terminal updates the first access tree to obtain a second access tree.
[0061] In one embodiment, the second terminal modifies the first attribute information corresponding to the first leaf node in the first access tree into the second attribute information, and modifies the second attribute information corresponding to the second leaf node into the first attribute information, thereby obtaining a second access tree. Thus, it is equivalent to exchanging the first leaf node and the second leaf node, so that the second leaf node becomes the new first leaf node, and the first leaf node becomes the new second leaf node, and the second access tree is obtained for indicating that the call data of the second terminal is transmitted to the first terminal having the first attribute information.
[0062] For example, Figure 5 As shown, if the second terminal is a terminal with the second attribute information id_B1, if the terminal wants to encrypt its call data and transmit it to the first terminal, the first attribute information corresponding to the first leaf node is modified to correspond to the second attribute information id_B1, and the second attribute information corresponding to the second leaf node is modified to correspond to the first attribute information id_A, thereby achieving Figure 5 The interaction between the first leaf node id_A and the second leaf node id_B1 in the first access tree shown in (a) gives Figure 5 The second visit tree shown in (b).
[0063] S218, the second terminal uses the second access tree and the system public key to encrypt the call data of the second terminal to obtain a second ciphertext.
[0064] The specific implementation of the above S218 is similar to the specific implementation of the above S206 and will not be repeated here.
[0065] S220, the second terminal sends a second ciphertext to the blockchain network.
[0066] The specific implementation of the above S220 is similar to the specific implementation of the above S208 and will not be repeated here.
[0067] S222, the blockchain network forwards the second ciphertext to the first terminal.
[0068] The specific implementation of the above S220 is similar to the specific implementation of the above S210 and will not be repeated here.
[0069] S224, the first terminal decrypts the second ciphertext using the first attribute information and the system public key to obtain the call data of the second terminal.
[0070] The specific implementation of the above S224 is similar to the specific implementation of the above S212 and will not be repeated here.
[0071] In this way, a two-way encrypted conversation is achieved between the first terminal and the second terminal.
[0072] It is worth noting that during a multi-party encrypted call, any second terminal can also choose to encrypt its own call data and send it to other second terminals. In this case, the second terminal as the sender can exchange the first leaf node in the first access tree with the second leaf node corresponding to the second attribute information of the second terminal as the receiver, so that the second leaf node becomes the new first leaf node, and the first leaf node in the first access tree becomes the new second leaf node, and the third access tree is obtained. In a similar manner to the above, the call data is encrypted and sent to the second terminal as the receiver through the blockchain network.
[0073] In another embodiment, when the third random number used to obtain the first ciphertext is generated based on the first enterprise platform, the blockchain network also receives a third ciphertext sent by the first enterprise platform. The third ciphertext is obtained by encrypting the third random number using the private key of the first enterprise platform.
[0074] Furthermore, in the case where the blockchain network forwards the first ciphertext to the second terminal through the second enterprise platform to which the second terminal belongs, the call encryption method provided in the embodiment of the present application also includes the following steps: the second enterprise platform sends a decryption request for the first ciphertext to the blockchain network, and sends the public key of the second enterprise platform and the third ciphertext to the first enterprise platform; receives the fourth ciphertext returned by the first enterprise platform, the fourth ciphertext being a third random number obtained by decrypting the third ciphertext based on the enterprise platform's own private key, and encrypting the third random number using the public key of the second enterprise platform; and returns the fourth ciphertext to the second enterprise platform.
[0075] Exemplarily, the call data of the first terminal is indexed by the call identifier and stored in the blockchain network in the order of timestamps. The second enterprise platform can carry the call identifier and timestamp in the decryption request. After receiving the decryption request, the blockchain network first verifies whether the second terminal belongs to the second enterprise platform. If so, the public key of the second enterprise platform and the third ciphertext are sent to the first enterprise platform.
[0076] In this way, the second enterprise platform can use its own private key to decrypt the fourth ciphertext to obtain the third random number, and then decrypt the first ciphertext based on the third random number and the stored second attribute information to obtain the call data of the first terminal, thereby realizing call monitoring between the first terminal and the second terminal.
[0077] Exemplarily, the second enterprise platform can obtain the call data of the first terminal by decrypting using the following formula (7).
[0078] (7) in, represents the call data of the first terminal, represents the fifth ciphertext, represents the first random number, Represents a bilinear map.
[0079] To facilitate those skilled in the art to understand the encryption call method provided in the above embodiment, Figure 6 , the interaction process between the first terminal, the first enterprise platform, the blockchain network, the second terminal and the second enterprise platform is described in detail. Figure 6 As shown, the interaction process includes the following steps: S602: The first terminal sends an encrypted call request to the blockchain network.
[0080] The encrypted call request is used to request an encrypted call with the second terminal having the second attribute information.
[0081] S604, the blockchain network responds to the encrypted call request, generates a call identifier for the call, generates a first access tree based on the first attribute information and the second attribute information of the first terminal and returns it to the first terminal, and sends the call identifier and the first access tree to the first enterprise platform.
[0082] S606: The first enterprise platform generates a third random number, and sends the third random number, the call identifier, and the first access tree to the first terminal.
[0083] S608, the first terminal uses the third random number, the first access tree and the system public key of the blockchain network to encrypt the call data of the first terminal, obtains the first ciphertext and sends it to the blockchain network.
[0084] S610, the blockchain network forwards the first ciphertext to the second enterprise platform.
[0085] S612: The second enterprise platform generates a sixth random number, and sends the first ciphertext and the sixth random number to the second terminal.
[0086] S614: The second terminal uses the second attribute information and the system public key of the blockchain network to decrypt the first ciphertext to obtain the call data and the first access tree of the first terminal.
[0087] S616, the second terminal updates the first access tree to obtain the second access tree, and uses the sixth random number, the second access tree and the system public key of the blockchain network to encrypt the call data of the second terminal to obtain the second ciphertext.
[0088] S618, the second terminal sends the second ciphertext to the blockchain network.
[0089] S620, the blockchain network forwards the second ciphertext to the first enterprise platform.
[0090] S622: The first enterprise platform forwards the second ciphertext to the first terminal.
[0091] S624, the first terminal uses the first attribute information and the system public key of the blockchain network to decrypt the second ciphertext to obtain the call data of the second terminal.
[0092] The specific implementation of the above S602~S624 can refer to Figure 2 , Figure 4 The specific implementation methods of the corresponding steps in will not be repeated here.
[0093] Figure 7A flowchart of an encrypted call method provided for an embodiment of the present application is provided. The method is applied to a blockchain network, that is, the execution subject of the method can be a blockchain network. Figure 7 As shown, the method comprises the following steps: S702: Receive an encrypted call request from a first terminal.
[0094] The encrypted call request is used to request an encrypted call with a second terminal having second attribute information.
[0095] S704, in response to the encrypted call request of the first terminal, generating a first access tree based on the first attribute information of the first terminal and the second attribute information indicated by the encrypted call request, and returning the first access tree to the first terminal.
[0096] S706: Receive a first ciphertext from the first terminal.
[0097] The first ciphertext is obtained by encrypting the call data of the first terminal using the system public key of the blockchain network and the first access tree.
[0098] S708: Forward the first ciphertext to the second terminal.
[0099] In another embodiment, the system public key is generated based on the first random number, and the blockchain network includes n blockchain nodes, where n is an integer greater than 1. Before the above S702, the encrypted call method provided by this embodiment also includes: dividing the first random number into n parts to obtain n second random numbers; and storing the n second random numbers in the n blockchain nodes respectively.
[0100] In another embodiment, after the above S708, the encrypted call method provided in this embodiment also includes: receiving a second ciphertext from the second terminal, the second ciphertext is obtained by encrypting the call data of the second terminal using the system public key and the second access tree, and the second access tree is obtained by the second terminal updating the first access tree in the first ciphertext; forwarding the second ciphertext to the first terminal for decryption.
[0101] In another embodiment, the first ciphertext is obtained by encrypting the call data of the first terminal using the system public key of the blockchain network, the first access tree and the third random number. The above S708 includes: returning the first access tree to the first enterprise platform to which the first terminal belongs, the first access tree is used by the first enterprise platform to generate a third random number, and sending the first access tree and the third random number to the first terminal. After the above S704, the encrypted call method provided in this embodiment also includes: receiving the third ciphertext sent by the first enterprise platform, the third ciphertext is obtained by encrypting the third random number using the private key of the first enterprise platform.
[0102] In another embodiment, after the above S708, the call encryption method provided in this embodiment also includes: in response to a decryption request for the first ciphertext from the second enterprise platform to which the second terminal belongs, sending the public key and the third ciphertext of the second enterprise platform to the first enterprise platform; receiving the fourth ciphertext returned by the first enterprise platform, the fourth ciphertext being a third random number obtained by decrypting the third ciphertext based on the enterprise platform's own private key, and encrypting the third random number using the public key of the second enterprise platform; and returning the fourth ciphertext to the second enterprise platform.
[0103] The specific implementation of each step from S702 to S708 can be found in Figure 2 The specific implementation methods of the corresponding steps in the illustrated embodiment will not be repeated here.
[0104] Figure 8 A flowchart of an encrypted call method provided by an embodiment of the present application is shown below. The method is applied to a first terminal, that is, the execution subject of the method can be the first terminal. Figure 8 As shown, the method comprises the following steps: S802, sending an encrypted call request to the blockchain network.
[0105] The encrypted call request is used to request an encrypted call with a second terminal having second attribute information.
[0106] S804, receiving a first access tree from the blockchain network, and using the first access tree and the system public key of the blockchain network to encrypt the call data of the first terminal to obtain a first ciphertext.
[0107] The first access tree is generated based on the first attribute information and the second attribute information of the first terminal.
[0108] S806, sending the first ciphertext to the blockchain network.
[0109] The first ciphertext is forwarded to the second terminal through the blockchain network.
[0110] In another embodiment, the first access tree includes a connected root node, a first leaf node, and a second leaf node, the first leaf node corresponds to the first attribute information, the second leaf node corresponds to the second attribute information, and the root node represents the logical relationship between the first leaf node and the second leaf node. After the above S802, the encrypted call method provided in this embodiment also includes: receiving a third random number from the first enterprise platform to which the first terminal belongs. The above S804 includes: using the system public key of the blockchain network and the third random number to encrypt the call data of the first terminal to obtain the fifth ciphertext; performing an exponential operation on the third random number to obtain the sixth ciphertext; generating a polynomial of the root node based on the third random number, and generating a seventh ciphertext of each leaf node based on the polynomial and the index value of each leaf node in the first access tree; generating the first ciphertext based on the first access tree, the fifth ciphertext, the sixth ciphertext, and the seventh ciphertext of each leaf node in the first access tree.
[0111] In another embodiment, after the above S806, the encrypted call method provided in this embodiment also includes: receiving a second ciphertext from the blockchain network, the second ciphertext is sent to the blockchain network after the second terminal uses the system public key and the second access tree to encrypt the call data of the second terminal, and the second access tree is obtained by the second terminal updating the first access tree obtained from the first ciphertext; using the first attribute information and the system public key to decrypt the second ciphertext to obtain the call data of the second terminal.
[0112] The specific implementation of each step from S802 to S806 can be found in Figure 2 The specific implementation methods of the corresponding steps in the illustrated embodiment will not be repeated here.
[0113] Fig. 9 A flowchart of an encrypted call method provided by an embodiment of the present application is provided. The method is applied to a second terminal, that is, the execution subject of the method can be the second terminal. Fig. 9 The method comprises the following steps: S902, receiving a first ciphertext from the blockchain network.
[0114] The first ciphertext is obtained by the first terminal using the first access tree and the system public key of the blockchain network to encrypt the call data of the first terminal. When the first access tree is requested by the first terminal to have an encrypted call with the second terminal having the second attribute information, the blockchain network generates and sends it to the first terminal based on the first attribute information and the second attribute information of the first terminal.
[0115] S904: Decrypt the first ciphertext using the system public key and the second attribute information to obtain the call data of the first terminal.
[0116] In another embodiment, after the above S904, the encrypted call method provided in this embodiment also includes: obtaining a first access tree from the first ciphertext; updating the first access tree to obtain a second access tree; using the second access tree and the system public key to encrypt the call data of the second terminal to obtain a second ciphertext; sending the second ciphertext to the blockchain network, and the second ciphertext is used by the blockchain network to forward to the first terminal.
[0117] In another embodiment, the first access tree includes a connected root node, a first leaf node, and a second leaf node, the first leaf node corresponds to the first attribute information, the second leaf node corresponds to the second attribute information, and the root node represents the logical relationship between the first leaf node and the second leaf node. The above-mentioned updating of the first access tree to obtain the second access tree includes: modifying the first attribute information corresponding to the first leaf node to the second attribute information, and modifying the second attribute information corresponding to the second leaf node to the first attribute information, to obtain the second access tree.
[0118] The specific implementation of each step from S92 to S904 can be found in Figure 2 The specific implementation methods of the corresponding steps in the illustrated embodiment will not be repeated here.
[0119] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0120] Based on the same inventive concept, an embodiment of the present application also provides an encrypted communication device.
[0121] Please refer to Fig.10 , is a schematic diagram of the structure of an encrypted communication device 1000 provided in one embodiment of the present application. The device 1000 is applied to a blockchain network, and the device includes: The first receiving module 1010 is used to receive an encrypted call request from a first terminal, where the encrypted call request is used to request an encrypted call with a second terminal having second attribute information; A first generating module 1020, configured to generate a first access tree based on the first attribute information and the second attribute information of the first terminal in response to the encrypted call request, and return the first access tree to the first terminal; The first receiving module 1010 is further used to receive a first ciphertext from the first terminal, where the first ciphertext is obtained by encrypting the call data of the first terminal using the system public key of the blockchain network and the first access tree; The first sending module 1030 is configured to forward the first ciphertext to the second terminal.
[0122] In one embodiment, the system public key is generated based on a first random number, and the blockchain network includes n blockchain nodes, where n is an integer greater than 1; The encrypted communication device 1000 further includes: A splitting module, used for splitting the first random number into n parts to obtain n second random numbers; A storage module is used to store the n second random numbers in the n blockchain nodes respectively.
[0123] In one embodiment, the first receiving module is further used to receive a second ciphertext from the second terminal, where the second ciphertext is obtained by encrypting call data of the second terminal using the system public key and the second access tree, and the second access tree is obtained by the second terminal updating the first access tree in the first ciphertext; The first sending module is further used to forward the second ciphertext to the first terminal for decryption.
[0124] In one embodiment, the first ciphertext is obtained by encrypting the call data of the first terminal using the system public key of the blockchain network, the first access tree and a third random number; The first sending module is used to return the first access tree to the first enterprise platform to which the first terminal belongs, the first access tree being used by the first enterprise platform to generate the third random number, and to send the first access tree and the third random number to the first terminal; The first receiving module is further used to receive a third ciphertext sent by the first enterprise platform, where the third ciphertext is obtained by encrypting the third random number using the private key of the first enterprise platform.
[0125] In one embodiment, the encrypted communication device 1000 further includes: a first decryption module, configured to send the public key of the second enterprise platform and the third ciphertext to the first enterprise platform in response to a decryption request for the first ciphertext from the second enterprise platform to which the second terminal belongs; The first receiving module is further configured to receive a fourth ciphertext returned by the first enterprise platform, where the fourth ciphertext is obtained by decrypting the third ciphertext by the enterprise platform based on its own private key to obtain the third random number, and encrypting the third random number using the public key of the second enterprise platform; The first sending module is further configured to return the fourth ciphertext to the second enterprise platform.
[0126] Obviously, the encrypted communication device 1000 provided in the embodiment of the present application can be used as the above Figure 7 The execution subject of the encrypted call method shown in the figure can thus realize the encrypted call method described above. Figure 7 Since the principle is the same, the functions realized are not described again here.
[0127] Please refer to Fig.11 , is a schematic diagram of a structure of an encrypted communication device 1100 provided in one embodiment of the present application. The device 1100 is applied to a first terminal, and the device includes: A second sending module 1110 is used to send an encrypted call request to the blockchain network, where the encrypted call request is used to request an encrypted call with a second terminal having second attribute information; A first processing module 1120 is configured to receive a first access tree from the blockchain network, and to encrypt call data of the first terminal using the first access tree and a system public key of the blockchain network to obtain a first ciphertext, wherein the first access tree is generated based on first attribute information and the second attribute information of the first terminal; The second sending module 1110 is further used to send the first ciphertext to the blockchain network, and the first ciphertext is used by the blockchain network to forward it to the second terminal.
[0128] In one embodiment, the first access tree includes a connected root node, a first leaf node, and a second leaf node, the first leaf node corresponds to the first attribute information, the second leaf node corresponds to the second attribute information, and the root node represents a logical relationship between the first leaf node and the second leaf node; The first processing module is further configured to receive a third random number from a first enterprise platform to which the first terminal belongs; When the first processing module uses the first access tree and the system public key of the blockchain network to encrypt the call data of the first terminal to obtain a first ciphertext, the first processing module performs the following steps: Encrypting the call data of the first terminal using the system public key of the blockchain network and the third random number to obtain a fifth ciphertext; Performing an exponential operation on the third random number to obtain a sixth ciphertext; Generate a polynomial of the root node based on the third random number, and generate a seventh ciphertext of each leaf node based on the polynomial and the index value of each leaf node in the first access tree; A first ciphertext is generated based on the first access tree, the fifth ciphertext, the sixth ciphertext, and the seventh ciphertext of each leaf node in the first access tree.
[0129] In one embodiment, the first processing module is further configured to: receiving a second ciphertext from the blockchain network, where the second ciphertext is sent to the blockchain network after the second terminal encrypts call data of the second terminal using the system public key and the second access tree, and the second access tree is obtained by the second terminal updating the first access tree obtained from the first ciphertext; The second ciphertext is decrypted using the first attribute information and the system public key to obtain the call data of the second terminal.
[0130] Obviously, the first terminal 1100 provided in the embodiment of the present application can be used as the above Figure 8 The execution subject of the encrypted call method shown in the figure can thus realize the encrypted call method described above. Figure 8 Since the principle is the same, the functions realized are not described again here.
[0131] Please refer to Fig.12 , is a schematic diagram of a structure of an encrypted communication device 1200 provided in one embodiment of the present application. The device 1200 is applied to a second terminal, and the device includes: The third receiving module 1210 is used to receive a first ciphertext from the blockchain network, where the first ciphertext is obtained by encrypting the call data of the first terminal by the first terminal using the first access tree and the system public key of the blockchain network, and the first access tree is generated by the blockchain network based on the first attribute information and the second attribute information of the first terminal and sent to the first terminal when the first terminal requests an encrypted call with the second terminal having the second attribute information; The second processing module 1220 is configured to decrypt the first ciphertext by using the system public key and the second attribute information to obtain the call data of the first terminal.
[0132] In one embodiment, the second processing module is further configured to: Obtaining the first access tree from the first ciphertext; Updating the first access tree to obtain a second access tree; Encrypting the call data of the second terminal using the second access tree and the system public key to obtain a second ciphertext; The second ciphertext is sent to the blockchain network, where the second ciphertext is used by the blockchain network to forward to the first terminal.
[0133] In one embodiment, the first access tree includes a connected root node, a first leaf node, and a second leaf node, the first leaf node corresponds to the first attribute information, the second leaf node corresponds to the second attribute information, and the root node represents a logical relationship between the first leaf node and the second leaf node; When the second processing module updates the first access tree to obtain the second access tree, the second processing module performs the following steps: The first attribute information corresponding to the first leaf node is modified to the second attribute information, and the second attribute information corresponding to the second leaf node is modified to the first attribute information, to obtain a second access tree.
[0134] Obviously, the second terminal 1200 provided in the embodiment of the present application can be used as the above Fig. 9 The execution subject of the encrypted call method shown in the figure can thus realize the encrypted call method described above. Fig. 9 Since the principle is the same, the functions realized are not described again here.
[0135] Fig.13 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Fig.13 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0136] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.13 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0137] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0138] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming an encrypted communication device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations: receiving an encrypted call request from a first terminal, the encrypted call request being used to request an encrypted call with a second terminal having second attribute information; In response to an encrypted call request from a first terminal, generating a first access tree based on first attribute information and the second attribute information of the first terminal, and returning the first access tree to the first terminal; receiving a first ciphertext from the first terminal, where the first ciphertext is obtained by encrypting call data of the first terminal using a system public key of the blockchain network and the first access tree; The first ciphertext is forwarded to the second terminal.
[0139] Alternatively, the processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming an encrypted communication device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations: Sending an encrypted call request to the blockchain network, where the encrypted call request is used to request an encrypted call with a second terminal having second attribute information; Receiving a first access tree from the blockchain network, and encrypting call data of the first terminal using the first access tree and a system public key of the blockchain network to obtain a first ciphertext, wherein the first access tree is generated based on first attribute information and the second attribute information of the first terminal; The first ciphertext is sent to the blockchain network, where the first ciphertext is used by the blockchain network to forward to the second terminal.
[0140] Alternatively, the processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming an encrypted communication device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations: receiving a first ciphertext from a blockchain network, where the first ciphertext is obtained by encrypting call data of the first terminal by using a first access tree and a system public key of the blockchain network, where the first access tree is generated by the blockchain network based on first attribute information and the second attribute information of the first terminal and sent to the first terminal when the first terminal requests an encrypted call with a second terminal having second attribute information; The first ciphertext is decrypted using the system public key and the second attribute information to obtain the call data of the first terminal.
[0141] The above application Figure 7 The method executed by the encrypted communication device disclosed in the embodiment shown in the figure, as described in the present application Figure 8 The method performed by the encrypted communication device disclosed in the embodiment shown or the above-mentioned application Fig. 9 The method performed by the encrypted call device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0142] The electronic device may also perform Figure 7 The method and the encrypted communication device are implemented in Figure 7 Alternatively, the electronic device may also perform the functions of the embodiments shown. Figure 8 The method and the encrypted communication device are implemented in Figure 8 Alternatively, the electronic device may also perform the functions of the embodiments shown. Fig. 9 The method and the encrypted communication device are implemented in Fig. 9 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.
[0143] Of course, in addition to software implementation methods, the electronic device of the present application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0144] The present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, enable the electronic device to execute Figure 7 The method of the embodiment shown is specifically used to perform the following operations: receiving an encrypted call request from a first terminal, the encrypted call request being used to request an encrypted call with a second terminal having second attribute information; In response to an encrypted call request from a first terminal, generating a first access tree based on first attribute information and the second attribute information of the first terminal, and returning the first access tree to the first terminal; receiving a first ciphertext from the first terminal, where the first ciphertext is obtained by encrypting call data of the first terminal using a system public key of the blockchain network and the first access tree; The first ciphertext is forwarded to the second terminal.
[0145] Alternatively, when the instruction is executed by an electronic device including multiple application programs, the electronic device can execute Figure 7 The method of the embodiment shown is specifically used to perform the following operations: Sending an encrypted call request to the blockchain network, where the encrypted call request is used to request an encrypted call with a second terminal having second attribute information; Receiving a first access tree from the blockchain network, and encrypting call data of the first terminal using the first access tree and a system public key of the blockchain network to obtain a first ciphertext, wherein the first access tree is generated based on first attribute information and the second attribute information of the first terminal; The first ciphertext is sent to the blockchain network, where the first ciphertext is used by the blockchain network to forward to the second terminal.
[0146] Alternatively, when the instruction is executed by an electronic device including multiple application programs, the electronic device can execute Figure 7 The method of the embodiment shown is specifically used to perform the following operations: receiving a first ciphertext from a blockchain network, where the first ciphertext is obtained by encrypting call data of the first terminal by using a first access tree and a system public key of the blockchain network, where the first access tree is generated by the blockchain network based on first attribute information and the second attribute information of the first terminal and sent to the first terminal when the first terminal requests an encrypted call with a second terminal having second attribute information; The first ciphertext is decrypted using the system public key and the second attribute information to obtain the call data of the first terminal.
[0147] In short, the above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0148] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0149] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0150] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0151] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
Claims
1. An encrypted call method, characterized in that: Applied to a blockchain network, the method comprises: receiving an encrypted call request from a first terminal, the encrypted call request being used to request an encrypted call with a second terminal having second attribute information; In response to the encrypted call request, generating a first access tree based on the first attribute information and the second attribute information of the first terminal, and returning the first access tree to the first terminal; receiving a first ciphertext from the first terminal, where the first ciphertext is obtained by encrypting call data of the first terminal using a system public key of the blockchain network and the first access tree; The first ciphertext is forwarded to the second terminal.
2. The method according to claim 1, characterized in that After forwarding the first ciphertext to the second terminal, the method further includes: receiving a second ciphertext from the second terminal, where the second ciphertext is obtained by encrypting call data of the second terminal using the system public key and the second access tree, and the second access tree is obtained by the second terminal updating the first access tree in the first ciphertext; The second ciphertext is forwarded to the first terminal for decryption.
3. The method according to claim 1, characterized in that The first ciphertext is obtained by encrypting the call data of the first terminal using the system public key of the blockchain network, the first access tree and a third random number; The returning the first access tree to the first terminal includes: Returning the first access tree to a first enterprise platform to which the first terminal belongs, where the first access tree is used by the first enterprise platform to generate the third random number, and sending the first access tree and the third random number to the first terminal; After returning the first access tree to the first enterprise platform to which the first terminal belongs, the method further includes: A third ciphertext sent by the first enterprise platform is received, where the third ciphertext is obtained by encrypting the third random number using a private key of the first enterprise platform.
4. The method according to claim 3, characterized in that After forwarding the first ciphertext to the second terminal, the method further includes: In response to a decryption request for the first ciphertext from a second enterprise platform to which the second terminal belongs, sending a public key of the second enterprise platform and the third ciphertext to the first enterprise platform; receiving a fourth ciphertext returned by the first enterprise platform, wherein the fourth ciphertext is obtained by decrypting the third ciphertext by the enterprise platform based on its own private key and encrypting the third random number by using the public key of the second enterprise platform; The fourth ciphertext is returned to the second enterprise platform.
5. An encrypted call method, characterized in that: Applied to a first terminal, the method includes: Sending an encrypted call request to the blockchain network, where the encrypted call request is used to request an encrypted call with a second terminal having second attribute information; Receiving a first access tree from the blockchain network, and encrypting call data of the first terminal using the first access tree and a system public key of the blockchain network to obtain a first ciphertext, wherein the first access tree is generated based on first attribute information and the second attribute information of the first terminal; The first ciphertext is sent to the blockchain network, where the first ciphertext is used by the blockchain network to forward to the second terminal.
6. The method according to claim 5, characterized in that The first access tree includes a connected root node, a first leaf node, and a second leaf node, the first leaf node corresponds to the first attribute information, the second leaf node corresponds to the second attribute information, and the root node represents a logical relationship between the first leaf node and the second leaf node; After sending the encrypted call request to the blockchain network, the method further includes: receiving a third random number from a first enterprise platform to which the first terminal belongs; The step of using the first access tree and the system public key of the blockchain network to encrypt the call data of the first terminal to obtain a first ciphertext includes: Encrypting the call data of the first terminal using the system public key of the blockchain network and the third random number to obtain a fifth ciphertext; Performing an exponential operation on the third random number to obtain a sixth ciphertext; Generate a polynomial of the root node based on the third random number, and generate a seventh ciphertext of each leaf node based on the polynomial and the index value of each leaf node in the first access tree; A first ciphertext is generated based on the first access tree, the fifth ciphertext, the sixth ciphertext, and the seventh ciphertext of each leaf node in the first access tree.
7. The method according to claim 5, characterized in that After sending the first ciphertext to the blockchain network, the method further includes: receiving a second ciphertext from the blockchain network, where the second ciphertext is sent to the blockchain network after the second terminal encrypts call data of the second terminal using the system public key and the second access tree, and the second access tree is obtained by the second terminal updating the first access tree obtained from the first ciphertext; The second ciphertext is decrypted using the first attribute information and the system public key to obtain the call data of the second terminal.
8. An encrypted call method, characterized in that: Applied to the second terminal, the method includes: receiving a first ciphertext from a blockchain network, where the first ciphertext is obtained by encrypting call data of the first terminal by using a first access tree and a system public key of the blockchain network, where the first access tree is generated by the blockchain network based on first attribute information and the second attribute information of the first terminal and sent to the first terminal when the first terminal requests an encrypted call with a second terminal having second attribute information; The first ciphertext is decrypted using the system public key and the second attribute information to obtain the call data of the first terminal.
9. The method according to claim 8, characterized in that After decrypting the first ciphertext by using the system public key and the second attribute information to obtain the call data of the first terminal, the method further includes: Obtaining the first access tree from the first ciphertext; Updating the first access tree to obtain a second access tree; Encrypting the call data of the second terminal using the second access tree and the system public key to obtain a second ciphertext; The second ciphertext is sent to the blockchain network, where the second ciphertext is used by the blockchain network to forward to the first terminal.
10. The method according to claim 9, characterized in that The first access tree includes a connected root node, a first leaf node, and a second leaf node, the first leaf node corresponds to the first attribute information, the second leaf node corresponds to the second attribute information, and the root node represents a logical relationship between the first leaf node and the second leaf node; The updating of the first access tree to obtain a second access tree includes: The first attribute information corresponding to the first leaf node is modified to the second attribute information, and the second attribute information corresponding to the second leaf node is modified to the first attribute information, to obtain a second access tree.
11. An encrypted communication device, characterized in that: Applied to a blockchain network, the device comprises: A first receiving module, configured to receive an encrypted call request from a first terminal, wherein the encrypted call request is used to request an encrypted call with a second terminal having second attribute information; A first generating module, configured to generate a first access tree based on the first attribute information and the second attribute information of the first terminal in response to the encrypted call request, and return the first access tree to the first terminal; The first receiving module is further used to receive a first ciphertext from the first terminal, where the first ciphertext is obtained by encrypting the call data of the first terminal using the system public key of the blockchain network and the first access tree; The first sending module is used to forward the first ciphertext to the second terminal.
12. An encrypted communication device, characterized in that: Applied to a first terminal, the device includes: A second sending module, used to send an encrypted call request to the blockchain network, where the encrypted call request is used to request an encrypted call with a second terminal having second attribute information; a first processing module, configured to receive a first access tree from the blockchain network, and to encrypt call data of the first terminal using the first access tree and a system public key of the blockchain network to obtain a first ciphertext, wherein the first access tree is generated based on first attribute information and the second attribute information of the first terminal; The second sending module is also used to send the first ciphertext to the blockchain network, and the first ciphertext is used by the blockchain network to forward it to the second terminal.
13. An encrypted communication device, characterized in that: Applied to a second terminal, the device includes: A third receiving module is used to receive a first ciphertext from a blockchain network, where the first ciphertext is obtained by encrypting call data of the first terminal by using a first access tree and a system public key of the blockchain network, and the first access tree is generated by the blockchain network based on the first attribute information and the second attribute information of the first terminal and sent to the first terminal when the first terminal requests an encrypted call with a second terminal having second attribute information; The second processing module is used to decrypt the first ciphertext by using the system public key and the second attribute information to obtain the call data of the first terminal.
14. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the encrypted call method as described in any one of claims 1 to 4; or, the processor is configured to execute the instructions to implement the encrypted call method as described in any one of claims 5 to 7; or, the processor is configured to execute the instructions to implement the encrypted call method as described in any one of claims 8 to 10.
15. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is enabled to execute the encrypted call method as described in any one of claims 1 to 4; or, when the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is enabled to execute the encrypted call method as described in any one of claims 5 to 7; or, when the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is enabled to execute the encrypted call method as described in any one of claims 8 to 10.
16. A computer program product, characterized in that The computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps in the encrypted call method as described in any one of claims 1 to 4; or, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps in the encrypted call method as described in any one of claims 5 to 7; or, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps in the encrypted call method as described in any one of claims 8 to 10.