Implementation method for multiple encryption and decryption modes of intermediate service

Through the SM2+SM4 hybrid encryption method, the problem of difficulty in taking into account the security and efficiency of the encryption mechanism when intermediary services are connected to external systems is solved, and high security and high efficiency of data transmission are achieved.

CN118900180APending Publication Date: 2024-11-05BANK OF TIANJIN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411206113.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

When intermediary services are connected with external systems, it is difficult to take into account the security and efficiency of the existing encryption mechanism, resulting in poor security or low efficiency during information transmission.

Method used

Using SM2+SM4 hybrid encryption method, the client and the server regularly exchange SM2 keys, and encrypt service messages through SM4, combining SID and client public key-encrypted response messages to achieve secure data transmission.

Benefits of technology

Through the SM2+SM4 hybrid encryption method, high security and high efficiency transmission of data are achieved, taking into account information security and performance requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118900180A_ABST
    Figure CN118900180A_ABST
Patent Text Reader

Abstract

The invention provides a method for realizing multiple encryption and decryption modes of an intermediate service. The method comprises the following steps that: a client and a server regularly exchange SM2 secret keys with each other; the client needs to send a message when performing service triggering; the server side decrypts the message to obtain a response message; encrypting the response message by using a client public key, and returning the response message to the client; the client carries out decryption to obtain the SM4; encrypting a service message by using the SM4, and sending the SID and the encrypted service message to the server; acquiring a corresponding SM4 by using the SID; the server analyzes the message, carries out service processing, and organizes a corresponding service message; the SM4 encrypts the service message and returns the encrypted service message to the client; the SM4 is abandoned; and the client analyzes the message and carries out service processing. And data security is realized by adopting an SM2 + SM4 hybrid encryption mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of encryption and decryption of business systems, and in particular to a method for realizing multiple encryption and decryption modes for intermediate business. Background Art

[0002] Intermediary business connects to various business systems within the bank and to various external systems outside the bank. It connects to various external systems outside the bank through dedicated lines. When connecting to each system, for information security, encryption mechanisms are generally required during information transmission. However, there are many external systems for intermediary business connection, and each external system has its own security requirements, and the various encryption mechanisms are also different.

[0003] The existing technology uses symmetric encryption, which is fast but has poor security, while asymmetric encryption is highly secure but has low efficiency. Summary of the invention

[0004] In view of the above problems, the present invention is proposed to provide a method for implementing multiple encryption and decryption modes for intermediate services that overcomes the above problems or at least partially solves the above problems.

[0005] According to one aspect of the present invention, a method for implementing multiple encryption and decryption modes for an intermediate service is provided, the method comprising:

[0006] The client and server exchange SM2 keys regularly.

[0007] The client needs to send a message to trigger the service;

[0008] The server decrypts the message to obtain a response message;

[0009] Encrypting the response message using the client public key and returning it to the client;

[0010] The client decrypts and obtains SM4;

[0011] Encrypt the service message using the SM4, and send the SID and the encrypted service message to the server;

[0012] Use SID to obtain the corresponding SM4;

[0013] The server parses the message, performs business processing, and organizes the corresponding business message;

[0014] SM4 encrypts the service message and returns it to the client;

[0015] Abandoned SM4;

[0016] The client parses the message and performs business processing.

[0017] Optionally, the client needs to send a message for service triggering, specifically including: first generating a SID, organizing a message A00101, encrypting it with a server public key, and sending it to the server.

[0018] Optionally, the server decrypts the message to obtain a response message, specifically including: obtaining SID, generating SM4 key, temporarily storing SID and SM4 key, and assembling A00101 response message.

[0019] Optionally, the client and the server periodically exchange SM2 keys with each other, specifically including:

[0020] For the first offline exchange, confirm that the transaction has been suspended or all exchanges are conducted offline before the exchange;

[0021] The intermediary business requests the social security to exchange secret keys. After receiving the request, the social security uses the old secret key to decrypt and generate a new key pair and save it. At the same time, it returns the new public key to the bank. The new public key will be used in subsequent interactions.

[0022] Optionally, the client decrypts and obtains SM4 specifically includes: the client decrypts and obtains SM4, encrypts the service message with SM4, and sends the SID and the encrypted service message to the server.

[0023] Optionally, the server parsing the message specifically includes: the server using the SID to obtain the corresponding SM4 and parse the message.

[0024] Optionally, the client parses the message, and the service processing specifically includes: the client uses the original SM4 to parse the message and perform subsequent service processing.

[0025] The present invention provides a method for implementing multiple encryption and decryption methods for intermediate services, the implementation method comprising: the client and the server periodically exchange SM2 secret keys with each other; the client needs to send a message for service triggering; the server decrypts the message to obtain a response message; the response message is encrypted using the client public key and returned to the client; the client decrypts and obtains SM4; the service message is encrypted using the SM4, and the SID and the encrypted service message are sent to the server; the corresponding SM4 is obtained using the SID; the server parses the message, performs service processing, and organizes the corresponding service message; the SM4 encrypts the service message and returns it to the client; the SM4 is discarded; the client parses the message and performs service processing. The SM2+SM4 hybrid encryption method is adopted to achieve data security.

[0026] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0028] Figure 1 A flowchart of a method for implementing multiple encryption and decryption modes for an intermediate service provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0029] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0030] The terms "comprises" and "having" and any variations thereof in the description embodiments, claims and drawings of the present invention are intended to cover non-exclusive inclusions, for example, including a series of steps or units.

[0031] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0032] The transaction messages between the intermediate business system and the external system are encrypted with the SM2+SM4 national encryption algorithm and sent as Base64 encoded strings. The character set for all system message transmissions is UTF-8.

[0033] Due to its own business needs, the system needs to exchange data with the external social security system. The data during the exchange has sensitive information and needs to be encrypted, so the national encryption algorithm is used. Considering comprehensive security and performance, the SM2+SM4 hybrid encryption method is used to achieve data security.

[0034] like Figure 1 As shown, the client and server periodically exchange SM2 keys (for the first offline exchange, confirm that the transaction has been suspended before the exchange or that all exchanges are offline).

[0035] The intermediary business requests the social security to exchange secret keys. After receiving the request, the social security uses the old secret key to decrypt and generate a new key pair and save it. At the same time, it returns the new public key to the bank. The new public key is used for subsequent interactions.

[0036] The client service triggers the sending of a message, generates a SID, organizes the message A00101, encrypts it with the server public key, and sends it to the server;

[0037] Decrypt, obtain SID, generate SM4 key, temporarily store SID and SM4 key, assemble A00101 response message, encrypt it with client public key, and return it to client;

[0038] The client decrypts and obtains SM4, encrypts the service message with SM4, and sends the SID and encrypted service message to the server;

[0039] The server uses the SID to obtain the corresponding SM4 and parse the message, performs business processing, and organizes the corresponding business message;

[0040] The server SM4 encrypts the service message, returns it to the client and discards SM4;

[0041] The client uses the original SM4 to parse the message and perform subsequent business processing.

[0042] Beneficial effect: Taking security and performance into consideration, SM2+SM4 hybrid encryption is adopted to achieve data security.

[0043] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for implementing multiple encryption and decryption methods for an intermediary service, characterized in that: The implementation method includes: The client and server exchange SM2 keys regularly. The client needs to send a message to trigger the service; The server decrypts the message to obtain a response message; Encrypting the response message using the client public key and returning it to the client; The client decrypts and obtains SM4; Encrypt the service message using the SM4, and send the SID and the encrypted service message to the server; Use SID to obtain the corresponding SM4; The server parses the message, performs business processing, and organizes the corresponding business message; SM4 encrypts the service message and returns it to the client; Abandoned SM4; The client parses the message and performs business processing.

2. The method for implementing multiple encryption and decryption modes for intermediary services according to claim 1, characterized in that: The client needs to send a message to trigger the service, which specifically includes: generating SID first, organizing the message A00101, encrypting it with the server public key, and sending it to the server.

3. The method for implementing multiple encryption and decryption modes for an intermediary service according to claim 1, characterized in that: The server decrypts the message to obtain the response message, specifically including: obtaining the SID, generating the SM4 key, temporarily storing the SID and the SM4 key, and assembling the A00101 response message.

4. The method for implementing multiple encryption and decryption modes for an intermediary service according to claim 1, characterized in that: The client and the server periodically exchange SM2 keys with each other, specifically including: For the first offline exchange, confirm that the transaction has been suspended or all exchanges are conducted offline before the exchange; The intermediary business requests the social security to exchange secret keys. After receiving the request, the social security uses the old secret key to decrypt and generate a new key pair and save it. At the same time, it returns the new public key to the bank. The new public key will be used in subsequent interactions.

5. The method for implementing multiple encryption and decryption modes for intermediary services according to claim 1, characterized in that: The client decrypts and obtains SM4 specifically includes: the client decrypts and obtains SM4, encrypts the service message with SM4, and sends the SID and the encrypted service message to the server.

6. The method for implementing multiple encryption and decryption modes for an intermediary service according to claim 1, characterized in that: The server side parsing the message specifically includes: the server side uses the SID to obtain the corresponding SM4 and parses the message.

7. The method for implementing multiple encryption and decryption modes for intermediary services according to claim 1, characterized in that: The client parses the message, and the service processing specifically includes: the client uses the original SM4 to parse the message and perform subsequent service processing.