WO2022126972A1 - 数据通信方法、密钥管理系统、设备及存储介质 - Google Patents

数据通信方法、密钥管理系统、设备及存储介质 Download PDF

Info

Publication number
WO2022126972A1
WO2022126972A1 PCT/CN2021/090448 CN2021090448W WO2022126972A1 WO 2022126972 A1 WO2022126972 A1 WO 2022126972A1 CN 2021090448 W CN2021090448 W CN 2021090448W WO 2022126972 A1 WO2022126972 A1 WO 2022126972A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
key
request
private key
ciphertext
Prior art date
Application number
PCT/CN2021/090448
Other languages
English (en)
French (fr)
Inventor
王俊
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022126972A1 publication Critical patent/WO2022126972A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0825Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0281Proxies
    • 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
    • H04L63/0442Network 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 wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • H04L63/062Network architectures or network communication protocols for network security for supporting key management in a packet data network for key distribution, e.g. centrally by trusted party
    • 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/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Definitions

  • the present application relates to the technical field of information security, and in particular, to a data communication method, a key management system, a device and a storage medium.
  • data communication between the client and server of Internet applications is usually carried out by means of HTTP request-API service response.
  • This is a data encryption method, and the encrypted ciphertext data is used for transmission.
  • multiple users usually share the key for encryption and decryption, resulting in security risks in the data transmission between the client and the server.
  • the current encryption and decryption code is embedded in the client or server in an intrusive way, the current system has too many non-business codes, and the code is highly intrusive, resulting in a high degree of coupling of the business system.
  • Embodiments of the present application provide a data communication method, a key management system, a device, and a storage medium to solve the problem that the existing current system has too many non-service codes, and the codes are highly intrusive, resulting in a high degree of coupling between service systems.
  • a data communication method is applied to a key management system, wherein the key management system comprises a proxy client and a proxy server; the proxy client is connected with a data requester, and the proxy server is connected with a service responder; the Data communication methods include:
  • the proxy client When the data requester initiates a data request to the service responder, the proxy client is triggered to encrypt the request message data using the private key to obtain ciphertext request data, so that the data requester can base the data requester on the The ciphertext request data initiates a data request to the service responder;
  • the proxy server When the service responder receives the data request, the proxy server is triggered to decrypt the ciphertext request data by using the private key to obtain plaintext request data, so that the service responder can use the private key to decrypt the ciphertext request data.
  • the plaintext request data is processed according to the preset business logic, and the response message data is obtained;
  • the proxy server When the service responder responds to the data request, the proxy server is triggered to encrypt the response message data with the private key to obtain ciphertext response data, so as to return the ciphertext response data to the the data requester;
  • the proxy client When the data requester receives the ciphertext response data, the proxy client is triggered to decrypt the ciphertext response data by using the private key to obtain plaintext response data, so as to complete data communication.
  • a key management system comprising:
  • the private key acquisition module is used to acquire the private key corresponding to the data requester
  • the first encryption module is configured to trigger the proxy client to encrypt the request message data by using the private key when the data requester initiates a data request to the service responder to obtain ciphertext request data, so that all The data requester initiates a data request to the service responder based on the ciphertext request data;
  • the first decryption module is configured to trigger the proxy server to use the private key to decrypt the ciphertext request data when the service responder receives the data request to obtain plaintext request data, so that the The service responder performs processing according to the preset business logic based on the plaintext request data to obtain response message data;
  • the second encryption module is configured to trigger the proxy server to use the private key to encrypt the response message data when the service responder responds to the data request to obtain ciphertext response data, so as to encrypt the The ciphertext response data is returned to the data requester;
  • a second decryption module configured to trigger the proxy client to decrypt the ciphertext response data using the private key when the data requester receives the ciphertext response data to obtain plaintext response data, to complete data communication.
  • a computer device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, the processor implements the following steps when executed:
  • the proxy client When the data requester initiates a data request to the service responder, the proxy client is triggered to encrypt the request message data using the private key to obtain ciphertext request data, so that the data requester can base the data requester on the The ciphertext request data initiates a data request to the service responder;
  • the proxy server When the service responder receives the data request, the proxy server is triggered to decrypt the ciphertext request data by using the private key to obtain plaintext request data, so that the service responder can use the private key to decrypt the ciphertext request data.
  • the plaintext request data is processed according to the preset business logic, and the response message data is obtained;
  • the proxy server When the service responder responds to the data request, the proxy server is triggered to encrypt the response message data with the private key to obtain ciphertext response data, so as to return the ciphertext response data to the the data requester;
  • the proxy client When the data requester receives the ciphertext response data, the proxy client is triggered to decrypt the ciphertext response data by using the private key to obtain plaintext response data, so as to complete data communication.
  • a computer storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
  • the proxy client When the data requester initiates a data request to the service responder, the proxy client is triggered to encrypt the request message data using the private key to obtain ciphertext request data, so that the data requester can base the data requester on the The ciphertext request data initiates a data request to the service responder;
  • the proxy server When the service responder receives the data request, the proxy server is triggered to decrypt the ciphertext request data by using the private key to obtain plaintext request data, so that the service responder can use the private key to decrypt the ciphertext request data.
  • the plaintext request data is processed according to the preset business logic, and the response message data is obtained;
  • the proxy server When the service responder responds to the data request, the proxy server is triggered to encrypt the response message data with the private key to obtain ciphertext response data, so as to return the ciphertext response data to the the data requester;
  • the proxy client When the data requester receives the ciphertext response data, the proxy client is triggered to decrypt the ciphertext response data by using the private key to obtain plaintext response data, so as to complete data communication.
  • FIG. 1 is a schematic diagram of an application environment of a data communication method in an embodiment of the present application
  • FIG. 3 is a flowchart of a data communication method in an embodiment of the present application.
  • Fig. 4 is a specific flow chart of step S201 in Fig. 2;
  • FIG. 5 is a flowchart of a data communication method in an embodiment of the present application.
  • FIG. 6 is a flowchart of a data communication method in an embodiment of the present application.
  • FIG. 7 is a flowchart of a data communication method in an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a key management system in an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a computer device in an embodiment of the present application.
  • the method can be applied to a key management system
  • the key management system includes a proxy client and a proxy server;
  • the proxy client is connected to a data requester (ie, a client installed on a computer device), the The proxy server connects with the service responder (ie, the server).
  • the computer equipment communicates with the server through the key management system.
  • Computer devices can be, but are not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices.
  • the server side can be implemented as an independent server.
  • a data communication method including the following steps:
  • the method can be applied to a key management system, where the key management system is set between the client and the server, so that the key is directly triggered during data communication between the client and the server
  • the corresponding proxy client or proxy server in the management system encrypts and decrypts, reduces non-business codes and reduces the coupling degree of business systems; at the same time, the key management system can manage the user's private key uniformly, which is convenient for maintenance.
  • the proxy client is used to connect to the data requester to encrypt and decrypt the data sent or received by the data requester.
  • the proxy server is used to connect to the service responder to encrypt and decrypt the data sent or received by the service responder.
  • the proxy protection terminal can be implemented by a plug-in
  • the proxy server can be implemented by a plug-in or an interceptor.
  • the key management system can generate corresponding private keys for different data requesters, so as to use the private keys for encryption and decryption when subsequent data requesters and service responders conduct data communication, so as to avoid data
  • the situation of multiple users sharing the key during communication improves the security of data communication between the client (data requester) and the server (service responder).
  • the above-mentioned target code can also be stored in a node of a blockchain.
  • the request message data is unencrypted message data corresponding to this data request. Specifically, when the data requester initiates a data request to the service responder, the proxy client seal encrypts the request message data to generate ciphertext request data, and then initiates a data request to the API service responder.
  • the proxy server is triggered to decrypt the ciphertext request data by using the private key to obtain the plaintext request data, so that the service responder can process the plaintext request data according to the preset business logic, Get response message data.
  • the plaintext request data refers to plaintext data obtained after decrypting the ciphertext request data.
  • Response packet data refers to unencrypted response data.
  • the proxy server is triggered to decrypt the ciphertext request data by using the private key to obtain the plaintext request data, so that the service responder can process the plaintext request data according to the preset business logic, Get response message data.
  • the proxy server When the service responder responds to the data request, the proxy server is triggered to encrypt the response message data with a special key to obtain ciphertext response data, so as to return the ciphertext response data to the data requester.
  • the proxy server when the service responder responds to the data request, the proxy server is triggered to encrypt the response message data with a private key to obtain ciphertext response data, so as to return the ciphertext response data to the data requester.
  • the plaintext response data refers to response data obtained after decrypting the ciphertext response data. Specifically, when the data requester receives the ciphertext response data returned by the service responder, the proxy client is triggered to decrypt the ciphertext response data using the private key to obtain plaintext response data to complete data communication.
  • the key system first generates a dedicated key for the response of the data requester according to the preset key generation rules.
  • key when the data requester initiates a data request to the service responder, before sending the data request to the service responder, the proxy client is triggered to encrypt the request message data with a special key, and obtain a ciphertext request data, to initiate a data request to the service responder based on the ciphertext request data; at this time, the service responder receives the data request and triggers the proxy server to use the private key to decrypt the ciphertext request data to obtain the plaintext request data, so that the The server responder processes the plaintext request data according to the preset business logic to obtain the response message data; then, before the service responder responds to the data request, triggers the proxy server to encrypt the response message data with a private key to obtain the encrypted data. Finally, when the data requester initiates a data request to the service responder according to the preset key generation rules.
  • corresponding private keys are generated for different data requesters, so that when subsequent data requesters and service responders conduct data communication, the private keys are used for encryption and decryption, so as to avoid excessive data communication during data communication.
  • the situation that users share the key occurs, which improves the security of data communication between the client (data requester) and the server (service responder).
  • the proxy client is triggered to encrypt the request message data with a private key, or the ciphertext response data is decrypted, and the proxy server is triggered to use a dedicated key.
  • the key encrypts the ciphertext response data, or decrypts the ciphertext request data, so as to extract the key encryption and decryption involved in the interactive communication between the client and the server from the original business, as a separate key management system , set between the client and the server, to achieve the purpose of directly triggering the corresponding proxy client or proxy server in the key management system to encrypt and decrypt when data communication is performed between the client and the server, reducing the original
  • the non-business code in the business system reduces the coupling degree of the business system.
  • the method further includes the following steps:
  • step S301 is consistent with step S201, and to avoid repetition, details are not repeated here.
  • the user ID corresponding to the data requesting party is a blacklist ID; step. Specifically, by judging whether the user ID corresponding to the data requester of this data communication is in the blacklist, that is, the blacklist ID, if it is, it is determined that there may be potential security risks, and the special password corresponding to the data requester will not be generated. key.
  • S302 Use an asymmetric encryption algorithm to generate an asymmetric key corresponding to the data requester; wherein, the asymmetric key includes a public key and a private key.
  • the asymmetric key is used to encrypt and decrypt the private key.
  • the public key in the asymmetric key is used for the encryption and decryption of the proxy client; the private key is used for the encryption and decryption of the proxy server.
  • the asymmetric encryption algorithm in this embodiment includes, but is not limited to, an RSA algorithm, a DSA algorithm, an ECC algorithm, and a DH algorithm, which is not limited here.
  • the private key is a symmetric key, that is, the data requester and the service responder use the same key for encryption and decryption.
  • the private key is encrypted by using an asymmetric key, so that the data requester and the service responder use different keys for encryption and decryption, which can effectively improve the security of the private key.
  • the above-mentioned target code can also be stored in a node of a blockchain.
  • the proxy server When the service responder receives the data request, the proxy server is triggered to use the private key to decrypt the first key; and the proxy server is triggered to use the decrypted private key to decrypt the ciphertext request data to obtain plaintext Request data, so that the server responder processes the request data in plaintext according to the preset business logic, and obtains the response message data.
  • S305 When the service responder responds to the data request, trigger the proxy server to encrypt the private key with the private key to obtain a second key; and, use the second key to encrypt the response message data to obtain a ciphertext response data, and return the ciphertext response data to the data requester.
  • the overall process of data communication between the client and the server is described below with reference to the key system in this embodiment: when a data requester initiates a data request to the service responder, the data request is sent Before reaching the service responder, trigger the proxy client to encrypt the private key with the public key, and use the private key to encrypt the request message data to obtain the ciphertext request data, so as to initiate the request to the service responder based on the ciphertext request data. data request; at this time, the service responder receives the data request and triggers the proxy server to use the private key to decrypt the encrypted private key; and triggers the proxy server to use the decrypted private key to decrypt the ciphertext request data.
  • Decrypt to obtain plaintext request data so that the server responder can process the plaintext request data according to the preset business logic to obtain response message data; and before the service responder responds to the data request, trigger the proxy server to use the private key to pair the private key with the private key. and encrypt the response message data with the encrypted private key, obtain the ciphertext response data, and return the ciphertext response data to the data requester; finally, the ciphertext response is received at the data requester
  • the proxy client is triggered to use the public key to decrypt the encrypted private key; and, use the decrypted private key to decrypt the ciphertext response data to obtain plaintext response data to complete data communication.
  • step S201 specifically includes the following steps:
  • the key length of the private key includes, but is not limited to, 128 bits or 256 bits, which can be configured according to actual needs, and is not limited here.
  • S402 Generate a private key with a key length based on the specific information corresponding to the data requester and the random number.
  • the specific information refers to the exclusive data corresponding to the data requester that can be used to prove the user's identity, such as user ID, user role, and so on. Specifically, by combining specific information with random numbers, a private key with a fixed key length is generated, so that the private key is bound to the user's identity, and different users use different keys to realize multi-scene encryption. key requirements to improve system security.
  • the method further includes:
  • S501 Configure the first key validity period corresponding to the private key and the second key validity period of the asymmetric key.
  • S502 Update the private key according to the validity period of the first key; and, update the asymmetric key according to the validity period of the second key.
  • the validity period of the first key and the validity period of the second key may be the same or different.
  • step S302 can be repeatedly executed to update the private key corresponding to the data requester;
  • step S202 can be repeatedly executed , to update the asymmetric key corresponding to the data requester.
  • the method further includes the following steps:
  • S601 Store the first key in the first cache.
  • S602 Store the second key in the second cache.
  • the first key refers to the private key encrypted by the public key corresponding to the data requester.
  • the second key refers to the private key encrypted by the private key corresponding to the service responder.
  • the first cache is used to store the first key corresponding to the data requester.
  • the second cache is used to store the second key corresponding to the service responder.
  • S604 When the service responder receives the data request, trigger the proxy server to decrypt the first key using the private key; and trigger the proxy server to use the decrypted private key to decrypt the ciphertext request data to obtain plaintext Request data, so that the server responder processes the request data in plaintext according to the preset business logic, and obtains the response message data.
  • S606 When the data requester receives the ciphertext response data, trigger the proxy client to use the public key to decrypt the second key; and, use the decrypted private key to decrypt the ciphertext response data to obtain plaintext response data , to complete data communication.
  • the first key or the second key can be encrypted.
  • the key cache is used, so that when the data requester communicates with the service responder subsequently, the first key or the second key can be directly read from the cache for encryption without repeating the steps of private key encryption, which improves system performance.
  • step S505 the method further includes the following steps:
  • the data in the first cache and the data in the second cache also need to be updated synchronously to ensure that subsequent data communications are encrypted or decrypted using the updated key.
  • the method further includes the following steps:
  • S801 Perform deduplication detection on the asymmetric key updated by the data requester.
  • the updated asymmetric key can be De-duplication processing to further improve key security.
  • a key management system is provided, and the key management system is in one-to-one correspondence with the data communication method in the above-mentioned embodiment.
  • the key management system includes a private key acquisition module 10 , a first encryption module 20 , a first decryption module 30 , a second encryption module 40 and a second decryption module 50 .
  • the detailed description of each functional module is as follows:
  • the private key acquisition module 10 is configured to acquire the private key corresponding to the data requester.
  • the first encryption module 20 is configured to trigger the proxy client to encrypt the request message data with a private key when the data requester initiates a data request to the service responder, and obtain the ciphertext request data, so that the data requester can base on the ciphertext Request data initiates a data request to the service responder.
  • the first decryption module 30 is configured to, when the service responder receives the data request, trigger the proxy server to use the private key to decrypt the ciphertext request data, and obtain the plaintext request data, so that the service responder can follow the preset request based on the plaintext request data. Set the business logic to process and get the response message data.
  • the second encryption module 40 is configured to, when the service responder responds to the data request, trigger the proxy server to encrypt the response message data with the private key to obtain the ciphertext response data, so as to return the ciphertext response data to the data requester .
  • the second decryption module 50 is configured to trigger the proxy client to decrypt the ciphertext response data by using the private key when the data requester receives the ciphertext response data, and obtain plaintext response data to complete the data communication.
  • Each module in the above key management system can be implemented in whole or in part by software, hardware and combinations thereof.
  • the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided, and the computer device may be a server, and its internal structure diagram may be as shown in FIG. 10 .
  • the computer device includes a processor, memory, a network interface, and a database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a computer storage medium and an internal memory.
  • the computer storage medium stores an operating system, a computer program and a database.
  • the internal memory provides an environment for the execution of the operating system and computer programs in the computer storage medium.
  • the database of the computer device is used to store data generated or acquired during the execution of the data communication method, such as private keys.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer program when executed by a processor, implements a data communication method.
  • a computer device including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor executes the computer program, the data communication methods in the above embodiments are implemented. or, when the processor executes the computer program, the functions of each module/unit in this embodiment of the key management system are implemented.
  • a computer storage medium is provided, and a computer program is stored on the computer storage medium.
  • the steps of the data communication method in the above embodiment are implemented. To avoid repetition, details are not repeated here.
  • the computer program is executed by the processor, the functions of each module/unit in this embodiment of the above key management system are implemented to avoid repetition, which will not be repeated here.
  • the computer-readable storage medium may be non-volatile or volatile.
  • any reference to memory, storage, database or other medium used in the various embodiments provided in this application may include non-volatile and/or volatile memory.
  • Module completion that is, dividing the internal structure of the key management system into different functional units or modules to complete all or part of the functions described above.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)

Abstract

本申请涉及信息安全技术领域,尤其涉及一种数据通信方法、密钥管理系统、设备及存储介质。该数据通信方法包括获取数据请求方对应的专用密钥;当数据请求方发起数据请求时,代理客户端采用专用密钥加密,得到密文请求数据;当服务响应方接收到数据请求时,代理服务端采用专用密钥解密,得到明文请求数据,以使服务响应方基于明文请求数据按照预设业务逻辑处理,得到响应报文数据;当服务响应方响应数据请求时,代理服务端采用专用密钥对加密,得到密文响应数据;当数据请求方接收到密文响应数据时,代理客户端采用专用密钥解密,得到明文响应数据。该方法可有效降低业务系统的耦合度。本申请还涉及区块链技术领域,专用密钥可存储至区块链中。

Description

数据通信方法、密钥管理系统、设备及存储介质
本申请以2020年12月16日提交的申请号为202011486200.4,发明名称为“数据通信方法、密钥管理系统、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及信息安全技术领域,尤其涉及一种数据通信方法、密钥管理系统、设备及存储介质。
背景技术
目前互联网应用的客户端和服务端之间通常通过HTTP请求-API服务响应的方式进行数据通信,为防止数据通信过程中用户或服务端的明文数据被劫持与篡改,客户端与服务端会约定某种数据加密方式,以加密后的密文数据进行传输,但对于不同的用户通常会出现多个用户共用密钥进行加解密的情况,导致客户端和服务端之间的数据传输存在安全隐患。此外,由于当前加解密代码是采用侵入式方式嵌入至客户端或服务端中,使得当前系统的非业务代码过多,代码侵入性强,导致业务系统耦合度高。
技术问题
本申请实施例提供一种数据通信方法、密钥管理系统、设备及存储介质,以解决现有的当前系统的非业务代码过多,代码侵入性强,导致业务系统耦合度高的问题。
技术解决方案
一种数据通信方法,应用于密钥管理系统,密钥管理系统包括代理客户端和代理服务端;所述代理客户端与数据请求方连接,所述代理服务端与服务响应方连接;所述数据通信方法包括:
获取数据请求方对应的专用密钥;
当所述数据请求方向服务响应方发起数据请求时,触发所述代理客户端采用所述专用密钥对请求报文数据进行加密,得到密文请求数据,以使所述数据请求方基于所述密文请求数据向所述服务响应方发起数据请求;
当所述服务响应方接收到所述数据请求时,触发所述代理服务端采用所述专用密钥对所述密文请求数据进行解密,得到明文请求数据,以使所述服务响应方基于所述明文请求数据按照预设业务逻辑进行处理,得到响应报文数据;
当所述服务响应方响应所述数据请求时,触发所述代理服务端采用所述专用密钥对响应报文数据进行加密,得到密文响应数据,以将所述密文响应数据返回至所述数据请求方;
当所述数据请求方接收到所述密文响应数据时,触发所述代理客户端采用所述专用密钥对所述密文响应数据进行解密,得到明文响应数据,以完成数据通信。
一种密钥管理系统,包括:
专用密钥获取模块,用于获取数据请求方对应的专用密钥;
第一加密模块,用于当所述数据请求方向服务响应方发起数据请求时,触发所述代理客户端采用所述专用密钥对请求报文数据进行加密,得到密文请求数据,以使所述数据请求方基于所述密文请求数据向所述服务响应方发起数据请求;
第一解密模块,用于当所述服务响应方接收到所述数据请求时,触发所述代理服务端采用所述专用密钥对所述密文请求数据进行解密,得到明文请求数据,以使所述服务响应方基于所述明文请求数据按照预设业务逻辑进行处理,得到响应报文数据;
第二加密模块,用于当所述服务响应方响应所述数据请求时,触发所述代理服务端采用所述专用密钥对响应报文数据进行加密,得到密文响应数据,以将所述密文响应数据返回至所述数据请求方;
第二解密模块,用于当所述数据请求方接收到所述密文响应数据时,触发所述代理客户端采用所述专用密钥对所述密文响应数据进行解密,得到明文响应数据,以完成数据通信。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行时实现如下步骤:
获取数据请求方对应的专用密钥;
当所述数据请求方向服务响应方发起数据请求时,触发所述代理客户端采用所述专用密钥对请求报文数据进行加密,得到密文请求数据,以使所述数据请求方基于所述密文请求数据向所述服务响应方发起数据请求;
当所述服务响应方接收到所述数据请求时,触发所述代理服务端采用所述专用密钥对所述密文请求数据进行解密,得到明文请求数据,以使所述服务响应方基于所述明文请求数据按照预设业务逻辑进行处理,得到响应报文数据;
当所述服务响应方响应所述数据请求时,触发所述代理服务端采用所述专用密钥对响应报文数据进行加密,得到密文响应数据,以将所述密文响应数据返回至所述数据请求方;
当所述数据请求方接收到所述密文响应数据时,触发所述代理客户端采用所述专用密钥对所述密文响应数据进行解密,得到明文响应数据,以完成数据通信。
一种计算机存储介质,所述计算机存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如下步骤:
获取数据请求方对应的专用密钥;
当所述数据请求方向服务响应方发起数据请求时,触发所述代理客户端采用所述专用密钥对请求报文数据进行加密,得到密文请求数据,以使所述数据请求方基于所述密文请求数据向所述服务响应方发起数据请求;
当所述服务响应方接收到所述数据请求时,触发所述代理服务端采用所述专用密钥对所述密文请求数据进行解密,得到明文请求数据,以使所述服务响应方基于所述明文请求数据按照预设业务逻辑进行处理,得到响应报文数据;
当所述服务响应方响应所述数据请求时,触发所述代理服务端采用所述专用密钥对响应报文数据进行加密,得到密文响应数据,以将所述密文响应数据返回至所述数据请求方;
当所述数据请求方接收到所述密文响应数据时,触发所述代理客户端采用所述专用密钥对所述密文响应数据进行解密,得到明文响应数据,以完成数据通信。
有益效果
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例中数据通信方法的一应用环境示意图;
图2是本申请一实施例中数据通信方法的一流程图;
图3是本申请一实施例中数据通信方法的一流程图;
图4是图2中步骤S201的一具体流程图;
图5是本申请一实施例中数据通信方法的一流程图;
图6是本申请一实施例中数据通信方法的一流程图;
图7是本申请一实施例中数据通信方法的一流程图;
图8是本申请一实施例中数据通信方法的一流程图;
图9是本申请一实施例中密钥管理系统的一示意图;
图10是本申请一实施例中计算机设备的一示意图。
本发明的实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
该方法可应用于密钥管理系统,所述密钥管理系统包括代理客户端和代理服务端;所述代理客户端与数据请求方(即指安装在计算机设备上的客户端)连接,所述代理服务端与服务响应方(即服务端)连接。其中,计算机设备通过密钥管理系统与服务器进行通信。计算机设备可以但不限于各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备。服务端可以用独立的服务器来实现。
在一实施例中,如图2所示,提供一种数据通信方法,包括如下步骤:
S201:获取数据请求方对应的专用密钥。
具体地,本方法可应用在一种密钥管理系统中,该密钥管理系统设置在客户端和服务端之间,以在客户端和服务端之间进行数据通信时,直接触发该密钥管理系统中对应的代理客户端或代理服务端进行加解密,减少非业务代码,降低业务系统的耦合度;同时该密钥管理系统可对用户的专用密钥进行统一管理,方便维护。其中,代理客户端用于连接数据请求方,以对数据请求方发送或接收的数据进行加解密。代理服务端用于连接服务响应方,以对服务响应方发送或接收的数据进行加解密。需要说明的是,该代理金额护端可通过插件实现,该代理服务端通过插件或拦截器实现。
具体地,该密钥管理系统可针对不同的数据请求方生成对应的专用密钥,以在后续数据请求方与服务响应方进行数据通信时,采用该专用密钥进行加解密,以避免在数据通信时多用户共用密钥的情况出现,提高客户端(数据请求方)与服务端(服务响应方)数据通信的安全性。
需要强调的是,为进一步保证上述专用密钥的私密和安全性,上述目标代码还可以存储于一区块链的节点中。
S202:当数据请求方向服务响应方发起数据请求时,触发代理客户端采用专用密钥对请求报文数据进行加密,得到密文请求数据,以使数据请求方基于密文请求数据向服务响应方发起数据请求。
其中,请求报文数据为本次数据请求对应的未经加密处理的报文数据。具体地,当数据请求方向服务响应方发起数据请求时,该代理客户端封对请求报文数据进行加密生成密文请求数据,再向API服务响应方发起数据请求。
S203:当服务响应方接收到数据请求时,触发代理服务端采用专用密钥对密文请求数据进行解密,得到明文请求数据,以使服务响应方基于明文请求数据按照预设业务逻辑进行处理,得到响应报文数据。
其中,明文请求数据是指对密文请求数据解密后所得到的明文数据。响应报文数据是指未经加密处理的响应数据。具体地,当服务响应方接收到数据请求时,触发代理服务端采用专用密钥对密文请求数据进行解密,得到明文请求数据,以便服务响应方基于明文请求数据按照预设业务逻辑进行处理,得到响应报文数据。
S204:当服务响应方响应数据请求时,触发代理服务端采用专用密钥对响应报文数据进行加密,得到密文响应数据,以将密文响应数据返回至数据请求方。
具体地,当服务响应方响应数据请求时,触发代理服务端采用专用密钥对响应报文数据进行加密,得到密文响应数据,以将密文响应数据返回至数据请求方。
S205:当数据请求方接收到密文响应数据时,触发代理客户端采用专用密钥对密文响应数据进行解密,得到明文响应数据,以完成数据通信。
其中,明文响应数据是指对密文响应数据进行解密后所得到的响应数据。具体地,当数据请求方接收服务响应方返回的密文响应数据时,触发代理客户端采用专用密钥对密文响应数据进行解密,得到明文响应数据,以完成数据通信。
作为一实施方式,以下结合本方法的密钥系统对客户端和服务端之间数据通信的整体过程进行说明:首先该密钥系统先按照预设的密钥生成规则生成数据请求方回应的专用密钥,当数据请当数据请求方向服务响应方发起数据请求时,在将该数据请求发送至服务响应方之前,触发代理客户端采用专用密钥对请求报文数据进行加密,得到密文请求数据,以基于密文请求数据向服务响应方发起数据请求;此时,服务响应方接收该数据请求,触发代理服务端采用专用密钥对密文请求数据进行解密,得到明文请求数据,以使服务器响应方基于明文请求数据按照预设业务逻辑进行处理,得到响应报文数据;然后,在服务响应方响应数据请求之前,触发代理服务端采用专用密钥对响应报文数据进行加密,得到密文响应数据,并将密文响应数据返回至数据请求方;最后,在数据请求方接收到密文响应数据时,触发代理客户端采用专用密钥对密文响应数据进行解密,得到明文响应数据,以完成数据通信。
本实施例中,通过针对不同的数据请求方生成对应的专用密钥,以在后续数据请求方与服务响应方进行数据通信时,采用该专用密钥进行加解密,以避免在数据通信时多用户共用密钥的情况出现,提高客户端(数据请求方)与服务端(服务响应方)数据通信的安全性。然后,在数据通信时,在数据请求方向服务响应方发起数据请求时,触发代理客户端采用专用密钥对请求报文数据进行加密,或者对密文响应数据进行解密,触发代理服务端采用专用密钥对密文响应数据加密,或者对密文请求数据进行解密,以将客户端与服务端之间交互通信所涉及的密钥加解密抽离出原始的业务,作为单独的密钥管理系统,设置在客户端和服务端之间,实现在客户端和服务端之间进行数据通信时,直接触发该密钥管理系统中对应的代理客户端或代理服务端进行加解密的目的,减少原业务系统中的非业务代码,降低业务系统的耦合度。
在一实施例中,如图3所示,该方法还包括如下步骤:
S301:获取数据请求方对应的专用密钥。
具体地,步骤S301与步骤S201保持一致,为避免重复,此处不再赘述。进一步地,在生成数据请求方对应的专用密钥之前还可进一步判断数据请求方对应的用户ID是否为黑名单ID;若不为黑名单ID,则执行生成数据请求方对应的专用密钥的步骤。具体地,通过判断本次数据通信的数据请求方对应的用户ID是否在黑名单中,即黑名单ID,若在,则判定可能存在安全隐患,则不会生成该数据请求方对应的专用密钥。
S302:采用非对称加密算法生成数据请求方对应的非对称密钥;其中,非对称密钥包括公钥和私钥。
其中,非对称密钥用于对专用密钥进行加解密。该非对称密钥中的公钥用于代理客户端的加解密;私钥用于代理服务端的加解密。本实施例中的非对称加密算法包括但不限于RSA算法、DSA算法、ECC算法以及DH算法,此处不做限定。
可以理解地是,该专用密钥为对称密钥,即数据请求方与服务响应方的加解密所采用的密钥相同,当任何一端密钥泄露,则会出现安全隐患,且采用相同的专用密钥进行加解密,需要多次生成不同的专用密钥以规避风险,加重了密钥管理的负担。故本实施例中,为解决上述问题通过采用非对称密钥对专用密钥进行加密,使数据请求方与服务响应方的加解密采用不同的密钥,可有效提升专用密钥的安全性。
需要强调的是,为进一步保证上述非对称密钥中私钥的私密和安全性,上述目标代码还可以存储于一区块链的节点中。
S303:当数据请求方向服务响应方发起数据请求时,触发代理客户端采用公钥对专用密钥进行加密,得到第一密钥;以及,采用第一密钥对请求报文数据进行加密,得到密文请求数据,以基于密文请求数据向服务响应方发起数据请求。
S304:当服务响应方接收到数据请求时,触发代理服务端采用私钥对第一密钥进行解密;以及,触发代理服务端采用解密后的专用密钥对密文请求数据进行解密,得到明文请求数据,以使服务器响应方基于明文请求数据按照预设业务逻辑进行处理,得到响应报文数据。
S305:当服务响应方响应数据请求时,触发代理服务端采用私钥对专用密钥进行加密,得到第二密钥;以及,采用第二密钥对响应报文数据进行加密,得到密文响应数据,并将密文响应数据返回至数据请求方。
S306:当数据请求方接收到密文响应数据时,触发代理客户端采用公钥对第二密钥进行解密;以及,采用解密后的专用密钥对密文响应数据进行解密,得到明文响应数据,以完成数据通信。
作为另一实施方式,以下结合本实施例中的密钥系统对客户端和服务端之间数据通信的整体过程进行说明:当数据请求方向服务响应方发起数据请求时,在将该数据请求发送至服务响应方之前,触发代理客户端采用公钥对专用密钥进行加密,以及采用专用密钥对请求报文数据进行加密,得到密文请求数据,以便基于密文请求数据向服务响应方发起数据请求;此时,服务响应方接收到数据请求,触发代理服务端采用私钥对加密后的专用密钥进行解密;以及,触发代理服务端采用解密后的专用密钥对密文请求数据进行解密,得到明文请求数据,以使服务器响应方基于明文请求数据按照预设业务逻辑进行处理,得到响应报文数据;并在服务响应方响应数据请求之前,触发代理服务端采用私钥对专用密钥进行加密;以及,采用加密后的专用密钥对响应报文数据进行加密,得到密文响应数据,并将密文响应数据返回至数据请求方;最后,在数据请求方接收到密文响应数据时,触发代理客户端采用公钥对加密后的专用密钥进行解密;以及,采用解密后的专用密钥对密文响应数据进行解密,得到明文响应数据,以完成数据通信。
在一实施例中,如图4所示,步骤S201中,具体包括如下步骤:
S401:获取专用密钥的密钥长度。
其中,专用密钥的密钥长度包括但不限于128位或256位,可根据实际需求配置,此处不做限定。
S402:基于数据请求方对应的特定信息以及随机数,生成密钥长度的专用密钥。
其中,特定信息即指数据请求方对应的可用于证明用户身份的专属数据,例如用户ID、用户角色等等。具体地,通过将特定信息与随机数结合的方式,生成固定密钥长度的专用密钥,以使专用密钥与用户身份绑定,不同的用户所采用的密钥不同,实现多场景的密钥需求,提升系统安全性。
在一实施例中,如图5所示,该方法还包括:
S501:配置专用密钥对应的第一密钥有效期以及非对称密钥的第二密钥有效期。
S502:根据第一密钥有效期,更新专用密钥;以及,根据第二密钥有效期,更新非对称密钥。
其中,第一密钥有效期与第二密钥有效期可相同或不同。具体地,当系统当前日期为第一密钥有效期时,可重复执行步骤S302,以更新该数据请求方对应的专用密钥;当系统当前日期为第二密钥有效期时,可重复执行步骤S202,以更新该数据请求方对应的非对称密钥。
在一实施例中,如图6所示,该方法还包括如下步骤:
S601:将第一密钥存储至第一缓存中。
S602:将第二密钥存储至第二缓存中。
其中,第一密钥指数据请求方对应的采用公钥加密后的专用密钥。第二密钥指服务响应方对应的采用私钥加密后的专用密钥。第一缓存用于存储数据请求方对应的第一密钥。第二缓存用于存储服务响应方对应的第二密钥。
S603:当数据请求方再次向服务响应方发起数据请求时,触发代理客户端采用缓存的第一密钥对请求报文数据进行加密,得到密文请求数据,以基于密文请求数据向服务响应方发起数据请求。
S604:当服务响应方接收到数据请求时,触发代理服务端采用私钥对第一密钥进行解密;以及,触发代理服务端采用解密后的专用密钥对密文请求数据进行解密,得到明文请求数据,以使服务器响应方基于明文请求数据按照预设业务逻辑进行处理,得到响应报文数据。
S605:当服务响应方响应数据请求时,触发代理服务端采用缓存的第二密钥对响应报文数据进行加密,得到密文响应数据,并将密文响应数据返回至数据请求方。
S606:当数据请求方接收到密文响应数据时,触发代理客户端采用公钥对第二密钥进行解密;以及,采用解密后的专用密钥对密文响应数据进行解密,得到明文响应数据,以完成数据通信。
可以理解地,在采用公钥对专用密钥进行加密得到第一密钥后,以及在采用私钥对专用密钥进行加密后得到第二密钥后,可将第一密钥或第二密钥缓存,以便后续该数据请求方与服务响应方进行通信时,可直接从缓存中读取第一密钥或第二密钥进行加密,无需重复执行专用密钥加密的步骤,提高系统性能。
在一实施例中,如图7所示,步骤S505之后,该方法还包括如下步骤:
S701:当更新专用密钥时,清除第一缓存中的数据以及第二缓存中的数据;或者,
S702:当更新非对称密钥时,清除第一缓存中的数据以及第二缓存中数据。
具体地,在更新专用密钥或非对称密钥后,还需要同步更新第一缓存中的数据以及第二缓存中数据,以保证后续数据通信采用更新后的密钥进行加密或解密。
在一实施例中,如图8所示,该方法还包括如下步骤:
S801:对数据请求方更新后的非对称密钥进行去重检测。
S802:若数据请求方对应的非对称密钥与其他数据请求方对应的非对称密钥相同,则重复执行步骤S302。
具体地,为避免更新后的非对称密钥与系统中存储的其他数据请求方对应的非对称密钥出现重复的情况,可在生成非对称密钥后,对更新后的非对称密钥进行去重处理,以进一步提升密钥安全性。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
在一实施例中,提供一种密钥管理系统,该密钥管理系统与上述实施例中数据通信方法一一对应。如图9所示,该密钥管理系统包括专用密钥获取模块10、第一加密模块20、第一解密模块30、第二加密模块40和第二解密模块50。各功能模块详细说明如下:
专用密钥获取模块10,用于获取数据请求方对应的专用密钥。
第一加密模块20,用于当数据请求方向服务响应方发起数据请求时,触发代理客户端采用专用密钥对请求报文数据进行加密,得到密文请求数据,以使数据请求方基于密文请求数据向服务响应方发起数据请求。
第一解密模块30,用于当服务响应方接收到数据请求时,触发代理服务端采用专用密钥对密文请求数据进行解密,得到明文请求数据,以使服务响应方基于明文请求数据按照预设业务逻辑进行处理,得到响应报文数据。
第二加密模块40,用于当服务响应方响应数据请求时,触发代理服务端采用专用密钥对响应报文数据进行加密,得到密文响应数据,以将密文响应数据返回至数据请求方。
第二解密模块50,用于当数据请求方接收到密文响应数据时,触发代理客户端采用专用密钥对密文响应数据进行解密,得到明文响应数据,以完成数据通信。
关于密钥管理系统的各个模块以及具体限定可以参见上文中对于数据通信方法的限定,在此不再赘述。上述密钥管理系统中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图10所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括计算机存储介质、内存储器。该计算机存储介质存储有操作系统、计算机程序和数据库。该内存储器为计算机存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储执行数据通信方法过程中生成或获取的数据,如专用密钥。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种数据通信方法。
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现上述实施例中的数据通信方法的步骤;或者,处理器执行计算机程序时实现密钥管理系统这一实施例中的各模块/单元的功能。
在一实施例中,提供一计算机存储介质,该计算机存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述实施例中数据通信方法的步骤,为避免重复,这里不再赘述。或者,该计算机程序被处理器执行时实现上述密钥管理系统这一实施例中的各模块/单元的功能为避免重复,这里不再赘述。所述计算机可读存储介质可以是非易失性,也可以是易失性。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将密钥管理系统的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
以上实施例仅用以说明本申请的技术方案,而非对其限制,尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

1.一种数据通信方法,应用于密钥管理系统,其中,所述密钥管理系统包括代理客户端和代理服务端;所述代理客户端与数据请求方连接,所述代理服务端与服务响应方连接;所述数据通信方法包括:
获取数据请求方对应的专用密钥;
当所述数据请求方向服务响应方发起数据请求时,触发所述代理客户端采用所述专用密钥对请求报文数据进行加密,得到密文请求数据,以使所述数据请求方基于所述密文请求数据向所述服务响应方发起数据请求;
当所述服务响应方接收到所述数据请求时,触发所述代理服务端采用所述专用密钥对所述密文请求数据进行解密,得到明文请求数据,以使所述服务响应方基于所述明文请求数据按照预设业务逻辑进行处理,得到响应报文数据;
当所述服务响应方响应所述数据请求时,触发所述代理服务端采用所述专用密钥对响应报文数据进行加密,得到密文响应数据,以将所述密文响应数据返回至所述数据请求方;
当所述数据请求方接收到所述密文响应数据时,触发所述代理客户端采用所述专用密钥对所述密文响应数据进行解密,得到明文响应数据,以完成数据通信。
2.如权利要求1所述数据通信方法,其中,在所述获取数据请求方对应的专用密钥之后,所述数据通信方法还包括:
采用非对称加密算法生成所述数据请求方对应的非对称密钥;其中,所述非对称密钥包括公钥和私钥;
所述当所述数据请求方向服务响应方发起数据请求时,触发所述代理客户端采用所述专用密钥对请求报文数据进行加密,得到密文请求数据,包括:
当数据请求方向服务响应方发起数据请求时,触发所述代理客户端采用所述公钥对所述专用密钥进行加密,得到第一密钥;以及,采用所述第一密钥对请求报文数据进行加密,得到密文请求数据;
所述当所述服务响应方接收到所述数据请求时,触发所述代理服务端采用所述专用密钥对所述密文请求数据进行解密,得到明文请求数据,包括:
当所述服务响应方接收到所述数据请求时,触发所述代理服务端采用所述私钥对所述第一密钥进行解密;以及,触发所述代理服务端采用所述解密后的专用密钥对所述密文请求数据进行解密,得到明文请求数据;
所述当所述服务响应方响应所述数据请求时,触发所述代理服务端采用所述专用密钥对响应报文数据进行加密,得到密文响应数据,包括:
当所述服务响应方响应所述数据请求时,触发所述代理服务端采用所述私钥对所述专用密钥进行加密,得到第二密钥;以及,采用所述第二密钥对所述响应报文数据进行加密,得到密文响应数据;
所述当所述数据请求方接收到所述密文响应数据时,触发所述代理客户端采用所述专用密钥对所述密文响应数据进行解密,得到明文响应数据,包括:
当所述数据请求方接收到所述密文响应数据时,触发所述代理客户端采用所述公钥对所述第二密钥进行解密;以及,采用所述解密后的专用密钥对所述密文响应数据进行解密,得到明文响应数据。
3.如权利要求1所述数据通信方法,其中,所述获取数据请求方对应的专用密钥,包括;
获取所述专用密钥的密钥长度;
基于所述数据请求方对应的特定信息以及随机数,生成所述密钥长度的专用密钥。
4.如权利要求2所述数据通信方法,其中,在所述当数据请求方向服务响应方发起数据请求时,触发所述代理客户端采用所述公钥对所述专用密钥进行加密,得到第一密钥之后,所述数据通信方法还包括:
将所述第一密钥存储至第一缓存中;
在所述当所述服务响应方响应所述数据请求时,触发所述代理服务端采用所述私钥对所述专用密钥进行加密,得到第二密钥之后,所述数据通信方法还包括:
将所述第二密钥存储至第二缓存中;
在完成所述数据通信之后,所述数据通信方法还包括:
当所述数据请求方再次向服务响应方发起数据请求时,触发所述代理客户端采用缓存的所述第一密钥对请求报文数据进行加密,得到密文请求数据,以基于所述密文请求数据向所述服务响应方发起数据请求;
当所述服务响应方接收到所述数据请求时,触发所述代理服务端采用所述私钥对所述第一密钥进行解密;以及,触发所述代理服务端采用所述解密后的专用密钥对所述密文请求数据进行解密,得到明文请求数据,以使所述服务器响应方基于所述明文请求数据按照预设业务逻辑进行处理,得到响应报文数据;
当所述服务响应方响应所述数据请求时,触发所述代理服务端采用缓存的所述第二密钥对所述响应报文数据进行加密,得到密文响应数据,并将所述密文响应数据返回至所述数据请求方;
当所述数据请求方接收到所述密文响应数据时,触发所述代理客户端采用所述公钥对所述第二密钥进行解密;以及,采用所述解密后的专用密钥对所述密文响应数据进行解密,得到明文响应数据,以完成数据通信。
5.如权利要求4所述数据通信方法,其中,在所述采用非对称加密算法生成所述数据请求方对应的非对称密钥之后,所述数据通信方法还包括:
配置所述专用密钥对应的第一密钥有效期以及所述非对称密钥的第二密钥有效期;
在完成所述数据通信之后,所述数据通信方法还包括;
根据所述第一密钥有效期,更新所述专用密钥;以及,根据所述第二密钥有效期,更新所述非对称密钥
6.如权利要求5所述数据通信方法,其中,在所根据所述第一密钥有效期,更新所述专用密钥;以及,根据所述第二密钥有效期,更新所述非对称密钥之后,所述数据通信方法还包括:
当更新所述专用密钥时,清除所述第一缓存中的数据以及所述第二缓存中的数据;或者,
当更新所述非对称密钥时,清除所述第一缓存中的数据以及所述第二缓存中数据。
7.如权利要求4所述数据通信方法,其中,在所述将所述第二密钥存储至第二缓存中之后,所述数据通信方法还包括:
对所述数据请求方更新后的非对称密钥进行去重检测;
若所述数据请求方对应的非对称密钥与其他数据请求方对应的非对称密钥相同,则重复执行所述采用非对称加密算法生成所述数据请求方对应的非对称密钥的步骤。
8.一种密钥管理系统,其中,包括:
专用密钥获取模块,用于获取数据请求方对应的专用密钥;
第一加密模块,用于当所述数据请求方向服务响应方发起数据请求时,触发代理客户端采用所述专用密钥对请求报文数据进行加密,得到密文请求数据,以使所述数据请求方基于所述密文请求数据向所述服务响应方发起数据请求;
第一解密模块,用于当所述服务响应方接收到所述数据请求时,触发代理服务端采用所述专用密钥对所述密文请求数据进行解密,得到明文请求数据,以使所述服务响应方基于所述明文请求数据按照预设业务逻辑进行处理,得到响应报文数据;
第二加密模块,用于当所述服务响应方响应所述数据请求时,触发所述代理服务端采用所述专用密钥对响应报文数据进行加密,得到密文响应数据,以将所述密文响应数据返回至所述数据请求方;
第二解密模块,用于当所述数据请求方接收到所述密文响应数据时,触发所述代理客户端采用所述专用密钥对所述密文响应数据进行解密,得到明文响应数据,以完成数据通信。
9.一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如下步骤:
获取数据请求方对应的专用密钥;
当所述数据请求方向服务响应方发起数据请求时,触发所述代理客户端采用所述专用密钥对请求报文数据进行加密,得到密文请求数据,以使所述数据请求方基于所述密文请求数据向所述服务响应方发起数据请求;
当所述服务响应方接收到所述数据请求时,触发所述代理服务端采用所述专用密钥对所述密文请求数据进行解密,得到明文请求数据,以使所述服务响应方基于所述明文请求数据按照预设业务逻辑进行处理,得到响应报文数据;
当所述服务响应方响应所述数据请求时,触发所述代理服务端采用所述专用密钥对响应报文数据进行加密,得到密文响应数据,以将所述密文响应数据返回至所述数据请求方;
当所述数据请求方接收到所述密文响应数据时,触发所述代理客户端采用所述专用密钥对所述密文响应数据进行解密,得到明文响应数据,以完成数据通信。
10.根据权利要求9所述的计算机设备,其中,在所述获取数据请求方对应的专用密钥之后,所述数据通信方法还包括:
采用非对称加密算法生成所述数据请求方对应的非对称密钥;其中,所述非对称密钥包括公钥和私钥;
所述当所述数据请求方向服务响应方发起数据请求时,触发所述代理客户端采用所述专用密钥对请求报文数据进行加密,得到密文请求数据,包括:
当数据请求方向服务响应方发起数据请求时,触发所述代理客户端采用所述公钥对所述专用密钥进行加密,得到第一密钥;以及,采用所述第一密钥对请求报文数据进行加密,得到密文请求数据;
所述当所述服务响应方接收到所述数据请求时,触发所述代理服务端采用所述专用密钥对所述密文请求数据进行解密,得到明文请求数据,包括:
当所述服务响应方接收到所述数据请求时,触发所述代理服务端采用所述私钥对所述第一密钥进行解密;以及,触发所述代理服务端采用所述解密后的专用密钥对所述密文请求数据进行解密,得到明文请求数据;
所述当所述服务响应方响应所述数据请求时,触发所述代理服务端采用所述专用密钥对响应报文数据进行加密,得到密文响应数据,包括:
当所述服务响应方响应所述数据请求时,触发所述代理服务端采用所述私钥对所述专用密钥进行加密,得到第二密钥;以及,采用所述第二密钥对所述响应报文数据进行加密,得到密文响应数据;
所述当所述数据请求方接收到所述密文响应数据时,触发所述代理客户端采用所述专用密钥对所述密文响应数据进行解密,得到明文响应数据,包括:
当所述数据请求方接收到所述密文响应数据时,触发所述代理客户端采用所述公钥对所述第二密钥进行解密;以及,采用所述解密后的专用密钥对所述密文响应数据进行解密,得到明文响应数据。
11.如权利要求9所述的计算机设备,其中,所述获取数据请求方对应的专用密钥,包括;
获取所述专用密钥的密钥长度;
基于所述数据请求方对应的特定信息以及随机数,生成所述密钥长度的专用密钥。
12.如权利要求10所述的计算机设备,其中,在所述当数据请求方向服务响应方发起数据请求时,触发所述代理客户端采用所述公钥对所述专用密钥进行加密,得到第一密钥之后,所述数据通信方法还包括:
将所述第一密钥存储至第一缓存中;
在所述当所述服务响应方响应所述数据请求时,触发所述代理服务端采用所述私钥对所述专用密钥进行加密,得到第二密钥之后,所述数据通信方法还包括:
将所述第二密钥存储至第二缓存中;
在完成所述数据通信之后,所述数据通信方法还包括:
当所述数据请求方再次向服务响应方发起数据请求时,触发所述代理客户端采用缓存的所述第一密钥对请求报文数据进行加密,得到密文请求数据,以基于所述密文请求数据向所述服务响应方发起数据请求;
当所述服务响应方接收到所述数据请求时,触发所述代理服务端采用所述私钥对所述第一密钥进行解密;以及,触发所述代理服务端采用所述解密后的专用密钥对所述密文请求数据进行解密,得到明文请求数据,以使所述服务器响应方基于所述明文请求数据按照预设业务逻辑进行处理,得到响应报文数据;
当所述服务响应方响应所述数据请求时,触发所述代理服务端采用缓存的所述第二密钥对所述响应报文数据进行加密,得到密文响应数据,并将所述密文响应数据返回至所述数据请求方;
当所述数据请求方接收到所述密文响应数据时,触发所述代理客户端采用所述公钥对所述第二密钥进行解密;以及,采用所述解密后的专用密钥对所述密文响应数据进行解密,得到明文响应数据,以完成数据通信。
13.如权利要求12所述的计算机设备,其中,在所述采用非对称加密算法生成所述数据请求方对应的非对称密钥之后,所述数据通信方法还包括:
配置所述专用密钥对应的第一密钥有效期以及所述非对称密钥的第二密钥有效期;
在完成所述数据通信之后,所述数据通信方法还包括;
根据所述第一密钥有效期,更新所述专用密钥;以及,根据所述第二密钥有效期,更新所述非对称密钥。
14.如权利要求13所述的计算机设备,其中,在所根据所述第一密钥有效期,更新所述专用密钥;以及,根据所述第二密钥有效期,更新所述非对称密钥之后,所述数据通信方法还包括:
当更新所述专用密钥时,清除所述第一缓存中的数据以及所述第二缓存中的数据;或者,
当更新所述非对称密钥时,清除所述第一缓存中的数据以及所述第二缓存中数据。
15.一种计算机存储介质,所述计算机存储介质存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:
获取数据请求方对应的专用密钥;
当所述数据请求方向服务响应方发起数据请求时,触发所述代理客户端采用所述专用密钥对请求报文数据进行加密,得到密文请求数据,以使所述数据请求方基于所述密文请求数据向所述服务响应方发起数据请求;
当所述服务响应方接收到所述数据请求时,触发所述代理服务端采用所述专用密钥对所述密文请求数据进行解密,得到明文请求数据,以使所述服务响应方基于所述明文请求数据按照预设业务逻辑进行处理,得到响应报文数据;
当所述服务响应方响应所述数据请求时,触发所述代理服务端采用所述专用密钥对响应报文数据进行加密,得到密文响应数据,以将所述密文响应数据返回至所述数据请求方;
当所述数据请求方接收到所述密文响应数据时,触发所述代理客户端采用所述专用密钥对所述密文响应数据进行解密,得到明文响应数据,以完成数据通信。
16.如权利要求15所述的计算机存储介质,其中,在所述获取数据请求方对应的专用密钥之后,所述数据通信方法还包括:
采用非对称加密算法生成所述数据请求方对应的非对称密钥;其中,所述非对称密钥包括公钥和私钥;
所述当所述数据请求方向服务响应方发起数据请求时,触发所述代理客户端采用所述专用密钥对请求报文数据进行加密,得到密文请求数据,包括:
当数据请求方向服务响应方发起数据请求时,触发所述代理客户端采用所述公钥对所述专用密钥进行加密,得到第一密钥;以及,采用所述第一密钥对请求报文数据进行加密,得到密文请求数据;
所述当所述服务响应方接收到所述数据请求时,触发所述代理服务端采用所述专用密钥对所述密文请求数据进行解密,得到明文请求数据,包括:
当所述服务响应方接收到所述数据请求时,触发所述代理服务端采用所述私钥对所述第一密钥进行解密;以及,触发所述代理服务端采用所述解密后的专用密钥对所述密文请求数据进行解密,得到明文请求数据;
所述当所述服务响应方响应所述数据请求时,触发所述代理服务端采用所述专用密钥对响应报文数据进行加密,得到密文响应数据,包括:
当所述服务响应方响应所述数据请求时,触发所述代理服务端采用所述私钥对所述专用密钥进行加密,得到第二密钥;以及,采用所述第二密钥对所述响应报文数据进行加密,得到密文响应数据;
所述当所述数据请求方接收到所述密文响应数据时,触发所述代理客户端采用所述专用密钥对所述密文响应数据进行解密,得到明文响应数据,包括:
当所述数据请求方接收到所述密文响应数据时,触发所述代理客户端采用所述公钥对所述第二密钥进行解密;以及,采用所述解密后的专用密钥对所述密文响应数据进行解密,得到明文响应数据。
17.如权利要求15所述的计算机存储介质,其中,所述获取数据请求方对应的专用密钥,包括;
获取所述专用密钥的密钥长度;
基于所述数据请求方对应的特定信息以及随机数,生成所述密钥长度的专用密钥。
18.如权利要求16所述的计算机存储介质,其中,在所述当数据请求方向服务响应方发起数据请求时,触发所述代理客户端采用所述公钥对所述专用密钥进行加密,得到第一密钥之后,所述数据通信方法还包括:
将所述第一密钥存储至第一缓存中;
在所述当所述服务响应方响应所述数据请求时,触发所述代理服务端采用所述私钥对所述专用密钥进行加密,得到第二密钥之后,所述数据通信方法还包括:
将所述第二密钥存储至第二缓存中;
在完成所述数据通信之后,所述数据通信方法还包括:
当所述数据请求方再次向服务响应方发起数据请求时,触发所述代理客户端采用缓存的所述第一密钥对请求报文数据进行加密,得到密文请求数据,以基于所述密文请求数据向所述服务响应方发起数据请求;
当所述服务响应方接收到所述数据请求时,触发所述代理服务端采用所述私钥对所述第一密钥进行解密;以及,触发所述代理服务端采用所述解密后的专用密钥对所述密文请求数据进行解密,得到明文请求数据,以使所述服务器响应方基于所述明文请求数据按照预设业务逻辑进行处理,得到响应报文数据;
当所述服务响应方响应所述数据请求时,触发所述代理服务端采用缓存的所述第二密钥对所述响应报文数据进行加密,得到密文响应数据,并将所述密文响应数据返回至所述数据请求方;
当所述数据请求方接收到所述密文响应数据时,触发所述代理客户端采用所述公钥对所述第二密钥进行解密;以及,采用所述解密后的专用密钥对所述密文响应数据进行解密,得到明文响应数据,以完成数据通信。
19.如权利要求18所述的计算机存储介质,其中,在所述采用非对称加密算法生成所述数据请求方对应的非对称密钥之后,所述数据通信方法还包括:
配置所述专用密钥对应的第一密钥有效期以及所述非对称密钥的第二密钥有效期;
在完成所述数据通信之后,所述数据通信方法还包括;
根据所述第一密钥有效期,更新所述专用密钥;以及,根据所述第二密钥有效期,更新所述非对称密钥。
20.如权利要求19所述的计算机存储介质,其中,在所根据所述第一密钥有效期,更新所述专用密钥;以及,根据所述第二密钥有效期,更新所述非对称密钥之后,所述数据通信方法还包括:
当更新所述专用密钥时,清除所述第一缓存中的数据以及所述第二缓存中的数据;或者,
当更新所述非对称密钥时,清除所述第一缓存中的数据以及所述第二缓存中数据。
 
PCT/CN2021/090448 2020-12-16 2021-04-28 数据通信方法、密钥管理系统、设备及存储介质 WO2022126972A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011486200.4 2020-12-16
CN202011486200.4A CN112671733A (zh) 2020-12-16 2020-12-16 数据通信方法、密钥管理系统、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2022126972A1 true WO2022126972A1 (zh) 2022-06-23

Family

ID=75405570

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/090448 WO2022126972A1 (zh) 2020-12-16 2021-04-28 数据通信方法、密钥管理系统、设备及存储介质

Country Status (2)

Country Link
CN (1) CN112671733A (zh)
WO (1) WO2022126972A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115134152A (zh) * 2022-06-29 2022-09-30 北京天融信网络安全技术有限公司 数据传输方法、数据传输装置、存储介质及电子设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112671733A (zh) * 2020-12-16 2021-04-16 平安科技(深圳)有限公司 数据通信方法、密钥管理系统、设备及存储介质
CN113127900A (zh) * 2021-04-19 2021-07-16 上海同态信息科技有限责任公司 一种基于同态构型加密的隐私计算软硬件服务模式
CN114095165B (zh) * 2021-11-22 2024-04-26 中国建设银行股份有限公司 密钥更新方法、服务端设备、客户端设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050138176A1 (en) * 2003-12-23 2005-06-23 Slipstream Data Inc. Meta-data based method for local cache utilization
CN101299753A (zh) * 2008-06-17 2008-11-05 浙江大学 基于代理服务器的Web服务安全控制机制
CN101388770A (zh) * 2008-10-20 2009-03-18 华为技术有限公司 获取动态主机配置协议密钥的方法、服务器及客户端装置
CN107222473A (zh) * 2017-05-26 2017-09-29 四川长虹电器股份有限公司 在传输层对api服务数据进行加解密的方法及系统
CN112671733A (zh) * 2020-12-16 2021-04-16 平安科技(深圳)有限公司 数据通信方法、密钥管理系统、设备及存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141244B (zh) * 2006-09-08 2010-05-26 飞塔公司 网络加密数据病毒检测和消除系统和代理服务器及方法
CN202679412U (zh) * 2012-07-12 2013-01-16 郑州信大信安科技有限公司 数据传输加解密系统
CN110635912B (zh) * 2019-08-20 2022-07-15 北京思源理想控股集团有限公司 数据处理方法及装置
CN111447060A (zh) * 2020-04-01 2020-07-24 中电万维信息技术有限责任公司 一种基于代理重加密的电子文档分发方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050138176A1 (en) * 2003-12-23 2005-06-23 Slipstream Data Inc. Meta-data based method for local cache utilization
CN101299753A (zh) * 2008-06-17 2008-11-05 浙江大学 基于代理服务器的Web服务安全控制机制
CN101388770A (zh) * 2008-10-20 2009-03-18 华为技术有限公司 获取动态主机配置协议密钥的方法、服务器及客户端装置
CN107222473A (zh) * 2017-05-26 2017-09-29 四川长虹电器股份有限公司 在传输层对api服务数据进行加解密的方法及系统
CN112671733A (zh) * 2020-12-16 2021-04-16 平安科技(深圳)有限公司 数据通信方法、密钥管理系统、设备及存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115134152A (zh) * 2022-06-29 2022-09-30 北京天融信网络安全技术有限公司 数据传输方法、数据传输装置、存储介质及电子设备

Also Published As

Publication number Publication date
CN112671733A (zh) 2021-04-16

Similar Documents

Publication Publication Date Title
US10785019B2 (en) Data transmission method and apparatus
JP6307665B2 (ja) 再生不能通信セッションのためのシステムおよび方法
US8732462B2 (en) Methods and apparatus for secure data sharing
WO2022126972A1 (zh) 数据通信方法、密钥管理系统、设备及存储介质
US20200344218A1 (en) Secure message search
WO2018024056A1 (zh) 用户口令管理的方法和服务器
CN113691502B (zh) 通信方法、装置、网关服务器、客户端及存储介质
US20180091487A1 (en) Electronic device, server and communication system for securely transmitting information
US10887085B2 (en) System and method for controlling usage of cryptographic keys
WO2020252611A1 (zh) 一种数据交互方法及相关设备
CN109104273B (zh) 报文处理方法以及接收端服务器
US10630466B1 (en) Apparatus and method for exchanging cryptographic information with reduced overhead and latency
US10063655B2 (en) Information processing method, trusted server, and cloud server
CN112966287B (zh) 获取用户数据的方法、系统、设备和计算机可读介质
WO2023051337A1 (zh) 数据处理方法、装置、设备及存储介质
WO2020237880A1 (zh) 基于非对称加密技术的数据交换方法、发送终端和计算机可读存储介质
CN115473655B (zh) 接入网络的终端认证方法、装置及存储介质
WO2020253380A1 (zh) 数据加密方法、装置及终端设备
CN109802827B (zh) 密钥更新方法及密钥更新系统
CN113422832B (zh) 文件传输方法、装置、设备和存储介质
CN110995648A (zh) 安全加密方法
Mohammed et al. Secure third party auditor (tpa) for ensuring data integrity in fog computing
TW202231014A (zh) 訊息傳輸系統以及應用其中之使用者裝置與資訊安全硬體模組
WO2023116266A1 (zh) 通信加密方法、系统和装置
CN108768994B (zh) 数据匹配方法、装置及计算机可读存储介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21904911

Country of ref document: EP

Kind code of ref document: A1