Encryption service and key authorization method with encrypted data not out of domain

By generating random numbers and initial vectors on the encryption server, combining symmetric encryption and hash algorithms, data encryption and decryption within the information system is realized, data transmission trust problem is solved, data owner authorization management is enhanced, and the deployment of a wide range of network environments is supported.

CN120455080APending Publication Date: 2025-08-08ZHEJIANG ELECTRONIC INFORMATION PROD INSPECTION & RES INST (ZHEJIANG INFORMATIZATION & INDUSTRIALIZATION INTEGRATION PROMOTION CENT)
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510591109.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

Existing encryption services require data objects to be transmitted to the password server, resulting in trust issues, limiting their scope of use, and the data owner cannot effectively authorize the operator through technical means.

Method used

It provides an encryption service and key authorization method where encrypted data does not leave the domain. It generates random numbers and initial vectors through the encryption server, combines symmetric encryption algorithms and hash algorithms to realize the encryption and decryption of data in the information system, and authorization management of data users is carried out through key ID and authorization conditions.

Benefits of technology

It realizes secure encryption and decryption of data in the information system, reduces the trust requirements for encrypted services, enhances the rights management of data owners, prevents data leakage and attacks, and supports a wide range of network environment deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455080A_ABST
    Figure CN120455080A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an encryption service and key authorization method for preventing encrypted data from going out of a domain. The method comprises the following steps: a data owner applies for a key from an encryption service, manages key authorization, and authorizes a corresponding key ID to a data user; during encryption, the data user generates random pseudo data; the encryption service carries out encryption by using the authorization key according to random pseudo data given by a data user and returns a first encryption result; and the data user carries out calculation according to the first encryption result and the plaintext data to generate a corresponding ciphertext and a message identification code. During decryption, the encryption service performs encryption calculation on partial data and random pseudo data of the first encryption result by using the authorization key and returns a second encryption result; the data user performs calculation according to the second encryption result and the ciphertext data to generate an initial plaintext; if the initial plaintext passes the data verification, outputting the plaintext data, otherwise, decrypting mistakenly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data encryption protection, and in particular to an encryption service and a key authorization method in which an encryption service obtains an untrusted encrypted data object but the related key management is trusted. Background Art

[0002] With the implementation of data security and other related laws and regulations, some information systems are using cryptographic technology to encrypt and store critical data to ensure confidentiality and integrity. Traditional cryptographic services require that encrypted data objects be transmitted to the cryptographic service. Therefore, users must have a high degree of trust in the devices or platforms providing the cryptographic services, ensuring that the services are immune to data misuse or leakage. However, this high level of trust often restricts the network environments in which cryptographic services can be deployed, or requires the system or relevant organizations to build their own infrastructure and assume the corresponding data risks. This limits the scope of use of cryptographic services and, due to trust issues, prevents them from providing encryption services to a wider range of information systems. Therefore, establishing encryption services that keep encrypted data within the domain, allowing encrypted data to remain within the information system and preventing the cryptographic service from accessing the data objects, thus avoiding data security risks and focusing on key security and cryptographic computation, thereby reducing the trust required for cryptographic services, is key to the widespread adoption of cryptographic services.

[0003] On the other hand, in some systems, information system users are the data owners, and information system operators are the authorized users of the data. Especially for critical data, data owners rely on the system operator's declarations and technical measures to ensure that the data is used within the scope of the operator's declarations. However, data owners cannot effectively and reasonably authorize the operator to use the data through technical means. The key authorization method provided by this invention enables data owners to control data user authorization through encryption services independent of the user and information system systems. Summary of the Invention

[0004] To address the aforementioned issues, the present invention provides an encryption service and key authorization method for encrypted data that remains within the domain. This aims to provide an encryption service that doesn't touch the data object and provides a related key authorization method. Because the encryption service doesn't touch the encrypted data, acting as a third party independent of the user and information systems, a key authorization method can be constructed to enable users to authorize the use of their owned encrypted data running on the information system, thereby enhancing the rights and interests of data owners.

[0005] The encryption service provided by the present invention, which does not allow encrypted data to leave the domain, includes the following aspects in terms of encryption processing:

[0006] On the encryption server, the encryption server uses a secure random number generation module to generate an initialization vector, calls the key management system, obtains the key, calls the symmetric encryption interface, performs symmetric encryption calculations on the random pseudo data, and outputs the mask; the symmetric encryption algorithm supports block ciphers and stream ciphers, as follows:

[0007] IV=Random()

[0008] MASK=EnCrypt(IDkey,IV,Pseudo_P)

[0009] Where IV stands for initialization vector, Random represents the random number generation algorithm, MASK represents the mask, IDkey represents the key corresponding to the ID, IV represents the initialization vector, Pseudo_P represents the random pseudo data, and EnCrypt represents the encryption algorithm. Note that this method differs from conventional encryption methods in that the initialization vector must be generated internally by the encryption service and output along with the mask.

[0010] On the data user side, the cryptographic service SDK needs to establish a transmission channel with the encryption service side to carry out data transmission. In addition, the software cryptographic module in the cryptographic service SDK needs to perform data key operations to implement a data encryption method that does not leave the domain. The encryption processing includes:

[0011] The software cryptographic module generates random pseudo data of the same length as the data P to be encrypted by calling a secure random number generation module;

[0012] By calling the encryption service, inputting the key ID and random pseudo data, the corresponding initialization vector and mask are obtained;

[0013] The ciphertext is obtained by performing XOR calculations on the mask and plaintext, as follows:

[0014] C=MASK⊕P

[0015] Where C represents ciphertext, MASK represents mask, ⊕ represents XOR calculation, and P represents plaintext;

[0016] Generate a salt value by calling the secure random number generation module;

[0017] Select a secure cryptographic hashing algorithm and perform hash calculations on the plaintext, ciphertext, and salt value data to obtain a message authentication code, as follows:

[0018] MAC=Hash(P,C,SALT)

[0019] Among them, MAC represents message authentication code, Hash represents hash calculation, P represents plaintext, C represents ciphertext, and SALT represents salt value.

[0020] The output random pseudo data, initialization vector, salt value, ciphertext and message authentication code, 5 items of data are stored as encrypted output data;

[0021] The encryption service provided by the present invention, which does not allow encrypted data to leave the domain, includes the following aspects in the decryption process:

[0022] When decrypting data, on the encryption server, input the key ID, plaintext, and initial vector. The server calls the key management system, obtains the key, calls the symmetric encryption interface, and outputs the mask. It supports block ciphers and stream ciphers, as follows:

[0023] MASK=EnCrypt(IDkey,IV,Pseudo_P)

[0024] Where MASK represents the mask, IDkey represents the key corresponding to the ID, IV represents the initialization vector, Pseudo_P represents random pseudo data, and EnCrypt represents the encryption algorithm;

[0025] During the second encryption, the initial vector is input from the outside.

[0026] On the data user side, a software cryptographic module is built to establish a transmission channel with the server side for data transmission. In addition, the software cryptographic module needs to perform data key operations to implement a data encryption method that does not allow data to leave the domain. The decryption process includes:

[0027] By calling the encryption service, inputting the key ID, random pseudo data and initialization vector, the corresponding mask is obtained.

[0028] The initial ciphertext is obtained by performing XOR calculations on the mask and ciphertext, as follows

[0029] P*=MASK⊕C

[0030] Where P* represents the initial ciphertext, MASK represents the mask, and C represents the ciphertext.

[0031] The same cryptographic hashing algorithm as used in the encryption phase is used to perform hashing on the initial plaintext, ciphertext, and salt value data to obtain the initial message authentication code, as follows:

[0032] MAC*=Hash(P*,C,SALT)

[0033] Among them, MAC* represents the initial message authentication code, Hash represents hash calculation, P represents the initial plaintext, C represents the ciphertext, and SALT represents the salt value.

[0034] By determining whether the currently stored message authentication code is the same as the initial message authentication code, it is determined whether the decryption is successful; if the two are equal, the initial plaintext is assigned to the plaintext and the decrypted plaintext is output (P=P*); if the two are not equal, the decrypted data is not output and an alarm message indicating that the decryption authentication failed is fed back through the interface.

[0035] The encryption service provided by this invention ensures that encrypted data does not leave the domain. The software cryptographic module on the data user's end must strictly protect the mask, preventing the mask information from being leaked during the encryption or decryption process. During the decryption process, the calculated output of the initial plaintext must be strictly protected. If the message authentication code (MAC ≠ Hash(P*, C, SALT)) is not satisfied, the initial plaintext information must not be leaked.

[0036] During the encryption process, the initialization vector (IV) is generated by the encryption server using a random number generator, while the random pseudo-data is generated by the data user using a random number generator. Both are randomly generated, achieving a one-time-one-pad encryption. This makes it difficult for an attacker to encrypt the data by using the same IV and pseudo-data.

[0037] During the encryption process, the salt is randomly generated, and the message authentication code (MAC = Hash(P, C, SALT)) is generated using a cryptographic hash algorithm. Due to the one-way nature of hashing algorithms, it is difficult to find P* such that MAC == Hash(P*, C, SALT) given the message authentication code, ciphertext, and salt. Therefore, the message authentication code, salt, and ciphertext do not reveal any information about the plaintext.

[0038] During decryption, if the message authentication code (MAC) and the hash (P*, C, SALT) are not checked for identity, and P = P* is directly output, an attacker can verify the ciphertext and obtain the mask information. If the attacker uses the same input key ID, random pseudo data, and initialization vector, forges the ciphertext C*, and decrypts it to obtain the forged plaintext (P*), that is, P* = EnCypt(IDkey, IV, Pseudo_P) ⊕ C*. By performing an XOR operation on the forged original plaintext and the forged ciphertext, the mask is obtained, that is, MASK = P* ⊕ C*, resulting in the mask being leaked. Ciphertext with the same input key ID, random pseudo data, and initialization vector can be decrypted and the plaintext (P) can be obtained by decryption, that is, P = C ⊕ P* ⊕ C*.

[0039] During the decryption process, for the encryption service where the encrypted data of the present invention does not leave the domain, in the software password module of the data user side, after judging whether the mask (MAC) is the same as Hash(P*, C, SALT), if they are the same, P = P* is output, and if they are different, an alarm message indicating decryption authentication failure is output. During the encryption process, through the hash function, the relationship between the message authentication code, the salt value data, the plaintext, and the ciphertext is established, that is, MAC = Hash(P, C, SALT). Only in the encryption stage, the plaintext and ciphertext that conform to this message authentication relationship can be decrypted. For conventional ciphertext verification attacks, due to the existence of an authentication process during the decryption process, it is necessary to break the first preimage collision of the hash function. Through the security of the cryptographic hash algorithm, the above-mentioned problem of being broken is solved.

[0040] For the encryption service where the encrypted data of the present invention does not leave the domain, during the data interaction process between the encryption service side and the data user side, the transmitted data involved includes: key ID, random pseudo data, initial vector, and mask. Among them, the key ID is obtained through encryption service authorization, the random pseudo data is randomly generated by the data user side, the initial vector is randomly generated by the encryption service side, and the mask is generated by encryption calculation, without involving the encrypted data plaintext P, thus realizing the encryption service where the encrypted data does not leave the domain.

[0041] The encryption service where the encrypted data of the present invention does not leave the domain includes the following aspects in the key authorization method:

[0042] The data owner registers an account (owner account) with the encryption service, and after passing the identity authentication, applies for a certain number of keys. In the key management system, the corresponding key ID can be authorized by the data owner.

[0043] The data user registers an account (user account) with the encryption service. When the data owner joins a certain information system, as the data user, the information system requests the data owner's account to authorize the data user's account to use the right of a key ID.

[0044] In the authorization of the encryption service by the data owner, the key ID and the user account are bound, which can be expressed as <ID, user account, authorization conditions>. Among them, the authorization conditions include the authorization expiration time, the number of authorized uses, etc. The data owner returns the relevant information <ID, owner account> to the data user.

[0045] The information system holds the user account and uses the authorized key ID for encryption and decryption, and needs to interact with the encryption service through the user account. When calling the encryption service for encryption, <key ID, owner account> and random pseudo data are input; when decrypting, <key ID, owner account>, random pseudo data, and initial vector are input.

[0046] The encryption service sends information according to the user account and performs an authorized access judgment on the key ID. The encryption service determines whether there is authorization information related to <key ID, user account, *> in the key authorization of the owner account, and further determines whether the authorization conditions represented by * are met. If the requirements are met, the corresponding data encryption and decryption operations are performed and the results are returned. If the requirements are not met, information related to authorization exceptions is returned.

[0047] If the data owner needs to restrict the use of encrypted data by the data user, the data owner can log in to the encryption service through identity authentication and change the authorization conditions related to the user account on the owner account, such as disabling or deleting the authorization information, to stop the data user from encrypting and decrypting the data. Subsequently, when the data user calls the encryption and decryption functions related to <ID, owner account> through the encryption service, the authorization is abnormal and normal results cannot be returned. Thus, the data owner can master the authorization use conditions of the data user for the encrypted data through the encryption service, and realize the ownership of the data by the data owner.

[0048] The above solution provided by the present invention has the following advantages compared with the prior art:

[0049] 1. The encryption service for encrypted data without leaving the domain provided by the present invention knows that the data at the encryption service end includes the key ID, random pseudo-data, initial vector, and mask, and does not involve plaintext and ciphertext data. Without leakage of the ciphertext, random pseudo-data, and initial vector at the data user end, it will not pose a threat to data security. In conventional encryption and decryption, the data involved at the encryption service end includes the key ID, initial vector, plaintext, and ciphertext data, which involves plaintext, requires high data security requirements, strict control of data, and a high degree of trust in the password service. However, for the encryption service for encrypted data without leaving the domain provided by the present invention, the encryption service is responsible for key management and encryption calculation, processes the randomly generated random pseudo-data, and cannot obtain any information about the plaintext data by means of such data, avoiding the problem of high trust in the password service.

[0050] 2. The encryption service provided by the present invention does not allow encrypted data to leave the domain. In the transmission channel between the encryption service end and the data user end, the application layer data transmitted includes the key ID, random pseudo data, initialization vector and mask, and does not involve plaintext or ciphertext data. Conventional encryption and decryption, in the transmission channel between the encryption service end and the data user end, the application layer data transmitted includes the key ID, initialization vector, plaintext and ciphertext data, which has high requirements for data security and requires strict protection of the transmitted data to prevent data leakage. However, the encryption service provided by the present invention does not allow encrypted data to leave the domain. If the application layer data is eavesdropped, it is impossible to obtain any plaintext information with the help of such data. The leakage of related data only causes a known plaintext attack on the encryption service, thereby attacking the specific key of the key ID. Therefore, it helps to expand the deployment network environment of the encryption service from a strictly restricted local area network to a wide area network or the Internet with lower security requirements.

[0051] 3. The encryption service provided by the present invention does not allow encrypted data to leave the domain. In the transmission channel between the encryption service end and the data user end, the application layer data transmitted includes the key ID, random pseudo data, initial vector and mask, and does not involve key data. In some data encryption applications, key data is transmitted in the transmission channel between the encryption service end and the data user end, the key is stored in the software password module of the data user end, and data encryption is performed based on the key. Since the key runs outside the key management system of the encryption service, there are certain security risks in key management. However, the encryption service provided by the present invention does not allow encrypted data to leave the domain. If the application layer data is eavesdropped, the key data cannot be obtained. The key is used in the key management system of the encryption service end, and its security protection is more stringent.

[0052] 4. The encryption service provided by the present invention does not allow encrypted data to leave the domain, thereby achieving data confidentiality and integrity protection. In terms of confidentiality protection, the encryption service performs the first encryption to generate a mask (MASK), and the mask is calculated with the plaintext, such as C = MASK ⊕ P, to achieve the conversion from plaintext to ciphertext and realize data ciphertext storage. In terms of integrity protection, data integrity protection is established through the relationship between the message authentication code and salt data, plaintext, and ciphertext, namely MAC = Hash (P, C, SALT). That is, when the ciphertext, salt value, and message authentication code are modified, it is difficult to construct four data that satisfy P = = EnCypt (IDkey, IV, Pseudo_P) ⊕ C and MAC = = Hash (P, C, SALT) without the key ID usage permission.

[0053] 5. The encryption service and key authorization method provided by the present invention do not allow encrypted data to leave the domain. On the encryption service side, the data owner's authorization of data use is achieved through the data owner's authorized use and control of the key ID, ensuring that the data owner can reasonably and effectively control the owned data through an encryption service independent of the information system, including the use time range, use frequency limit, and suspension of authorized use. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0055] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0056] Attachment Figure 1 Schematic diagram of the encryption service network architecture involved in an embodiment of the present invention;

[0057] Attachment Figure 2 This is a schematic diagram of an encryption service process for preventing encrypted data from leaving the domain provided by an embodiment of the present invention;

[0058] Attachment Figure 3 Schematic diagram of a data encryption framework provided by an embodiment of the present invention;

[0059] Attachment Figure 4 Schematic diagram of a data decryption framework provided by an embodiment of the present invention;

[0060] Attachment Figure 5 This is a schematic diagram of the encryption service authorization process provided by an embodiment of the present invention;

[0061] Attachment Figure 6 This is a flowchart of encryption and decryption by a data user using an encryption service provided by an embodiment of the present invention.

[0062] Attachment Figure 7 This is a flow chart of a data owner using encryption services to change authorization according to an embodiment of the present invention.

[0063] Attachment Figure 8 This is a flow chart of identity authentication between a data user and an encryption service provided by an embodiment of the present invention.

[0064] Attachment Figure 9 This is a flow chart of data encryption performed by a data user through an encryption service provided by an embodiment of the present invention.

[0065] Attachment Figure 10 This is a flow chart of a data user performing data decryption through an encryption service provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0066] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0067] The encryption service provided by the embodiment of the present invention is as follows: Figure 1 As shown, the data owner, data user, and encryption service access each other through the network. The present invention constructs an encryption service that keeps encrypted data within the domain. It requires that during the encryption and decryption process, the encrypted data object is within the data user's security zone and cannot flow out of the network or encryption service.

[0068] The encryption service and key authorization method provided by the embodiment of the present invention for ensuring that encrypted data does not leave the domain include authorization encryption service and key authorization management service, data encryption, data decryption, and the main processing flow is as follows: Figure 2 shown.

[0069] This encryption service embodiment is described from three aspects: authorization encryption service and key authorization management service, data encryption, and data decryption.

[0070] First, the specific process for authorization encryption services and key authorization management services is as follows:

[0071] Encryption services provide authorized encryption and key authorization management services for data users and data owners. Users of encryption services can be both data users and data owners under the same account. Users must register an account with the encryption service and undergo strict identity authentication before performing encryption calculations or key authorization management.

[0072] The data owner, through the encryption service, authorizes the data user to use the corresponding key ID to realize the authorized use of the encrypted data. Figure 5 The authorization process includes the following steps:

[0073] After the data owner passes the identity authentication in the encryption service, he / she logs in to the corresponding owner account;

[0074] The data owner applies for a certain number of keys as needed;

[0075] The encryption service generates a corresponding number of keys for security protection, manages them using a key management system, and provides the corresponding key IDs to the data owner;

[0076] The data owner joins an information system and authorizes the information system to use the data to be encrypted;

[0077] As a data user, the information system requests the data owner to authorize the use of the key ID for the user account;

[0078] In the encryption service, the data owner manages the use authorization of relevant key IDs, authorizes the key ID to the user account of the data user, and under the condition of meeting the set conditions, uses the key ID for encryption and decryption calculations. The set conditions include the expiration time, the number of uses, etc.;

[0079] The data owner gives the authorization information, such as the ID of the owner account, etc. to the data user;

[0080] The data user needs to register an account in the encryption service and perform encryption and decryption calculations after passing strict identity authentication. For example Figure 6 , the encryption and decryption process includes the following process:

[0081] After passing identity authentication in the encryption service, the data user logs in to the corresponding user account. For example Figure 8 As shown, identity authentication measures usually include measures such as "account + password", digital signature and signature verification;

[0082] The data user, through the logged-in user account, applies to use the key ID of the owner account for data encryption and decryption calculations, denoted as <ID, owner account>;

[0083] The encryption service receives the user account request, uses the key ID of the owner account for data encryption and decryption. By accessing whether the key ID inside the owner account is authorized to the user account and judging whether the current authorization conditions are met; if authorized, perform encryption and decryption calculations and output the result; if not authorized, feedback the information of the authorization problem;

[0084] The data user accepts the information returned by the encryption service and processes it.

[0085] Second, the specific process of the data encryption embodiment is as follows:

[0086] The schematic diagram of the encryption implementation framework is as Figure 3 shown. Based on the encryption framework, Figure 9 an embodiment of how the data user performs data encryption through the encryption service is given. Combining Appendix Figure 3 and Appendix Figure 9, the data encryption implemented by the present invention is described in detail below through specific embodiments.

[0087] Data users authorize the use of data through the information system. Furthermore, data users need to interact with the encryption service through the provided cryptographic service SDK. The information system stores the corresponding data in local storage media, including databases and OSS object storage.

[0088] When the information system encrypts a user's plain text data, it needs to use the previously authorized key ID (see Figure 5 ), and the authorized owner account given by the user to the information system, encrypt the plaintext data through the cryptographic service SDK.

[0089] The software cryptographic module within the cryptographic service SDK generates random pseudo data of the same length based on the length of the plaintext data through the random number generator of the software cryptographic module.

[0090] The software cryptographic module sends the key ID of the authorized owner account and the random pseudo data to be encrypted to the cryptographic service. Based on the authorization information under the owner account, the cryptographic service confirms whether the current cryptographic service SDK user account can use the key ID under the owner account.

[0091] If authorization is not allowed, the authorization-related questions will be directly returned to the cryptographic service SDK. If use is allowed, the cryptographic service obtains the key (Key) corresponding to the key ID used by the owner account through the key management system, and calls the random number generator to generate an initial vector.

[0092] The cryptographic service generates an encrypted value, referred to as a mask, based on the key, initialization vector, random pseudo data, and the selected symmetric encryption algorithm. The mask is then encrypted and transmitted through the application layer and returned to the software cryptographic module of the cryptographic service SDK.

[0093] The software cryptographic module calls its own random number generator to generate a salt value, performs XOR calculations on the plaintext data to be encrypted and the mask returned by the cryptographic service platform to generate ciphertext; after splicing the plaintext, ciphertext, and salt value, a hash calculation is performed to calculate the message authentication code.

[0094] The cryptographic service SDK returns encrypted output data, including the initial vector, random pseudo data, ciphertext, salt value, and message authentication code, to the information system, which then stores the data in local storage media.

[0095] Third, the specific process of the data decryption service embodiment is as follows:

[0096] The schematic diagram of the decryption implementation framework is as follows: Figure 4 As shown. Based on the decryption framework, Figure 10 This paper provides an example of how data users can decrypt data through encryption services. Figure 4 and attached Figure 10 , the data decryption implemented by the present invention is described in detail below through specific embodiments.

[0097] When an information system needs to use encrypted data, it first reads the initial vector, random pseudo data, ciphertext, salt value, and message authentication code stored in the local storage medium.

[0098] When the information system decrypts a user's ciphertext data, it needs to use the previously authorized key ID (see Figure 5 ) and the authorized account (owner account) given by the user to the information system, and decrypt the initial vector, random pseudo data, ciphertext, salt value, and message authentication code through the cryptographic service SDK.

[0099] The cryptographic module of the Cryptographic Service SDK sends the key ID of the authorized owner account, along with the initialization vector (IV) and random pseudo-data for decryption, to the Cryptographic Service. Based on the authorization information for the owner account, the Cryptographic Service confirms whether the current Cryptographic Service SDK user account can use the key ID corresponding to the owner account.

[0100] If authorization is not allowed, the authorization-related problem information will be directly returned to the cryptographic service SDK. If use is allowed, the cryptographic service obtains the key (Key), initial vector, random pseudo data, and selected symmetric encryption algorithm of the key ID under the owner account through the key management system, generates an encrypted value, here called a mask, and transmits the mask through application layer encryption and returns it to the software cryptographic module of the cryptographic service SDK.

[0101] The software cryptographic module obtains the initial plaintext based on the ciphertext and mask through XOR calculations.

[0102] The software cryptographic module performs hash calculation based on the initial plaintext, ciphertext and salt value to calculate the initial message authentication code.

[0103] The software cryptographic module determines whether the initial message authentication code and the message authentication code are identical. If they are identical, the initial plaintext is output as plaintext data; if they are not identical, the data integrity check fails and an abnormal result is output.

[0104] The software cryptographic module returns plain text or verification failure exception information to the information system.

[0105] The above gives the process of data users using encryption services to implement data authorization encryption and decryption. When the data owner needs to make changes to the authorization of the data user, the data owner can log in to the password service and manage the authorization of the relevant key ID, such as Figure 7.

[0106] The data owner can change, disable, and perform other operations on all key IDs under the owner's account, including authorization information related to user accounts.

[0107] Subsequent data users, based on their user accounts and using the key ID under the owner account, will perform encryption and decryption, but will be subject to the constraints of relevant authorization information and may lose the authority to encrypt and decrypt data, and thus the right to use the data.

[0108] It should be noted that the present invention provides an encryption service and key authorization method that does not allow encrypted data to leave the domain. If the data user and the data owner are the same account, the corresponding authorization relationship still applies.

[0109] In addition, in traditional encryption services, only encryption services that encrypt data do not leave the domain can be used without considering the key authorization method.

[0110] As can be seen, the encryption service and key authorization method described in the embodiments of this application, which ensures that encrypted data does not leave the domain, utilizes a conventional symmetric cryptographic algorithm. By introducing new encryption and decryption processing procedures, including random number generation, hash calculation, and XOR calculations, into the software cryptographic module of the cryptographic service SDK, this achieves an encryption service that ensures that encrypted data does not leave the domain, thus ensuring the confidentiality and integrity of the data. Furthermore, since the encryption service does not access the encrypted data and acts as a third party independent of the information system and user system, key authorization management is added. Data users use the key ID authorized by the data owner to encrypt and decrypt data, thereby enabling the data owner to effectively authorize and control data users' use of the data.

[0111] The above is a detailed introduction to the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, based on the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present application.

Claims

1. An encryption service and key authorization method for preventing encrypted data from leaving the domain, characterized in that: The method comprises: The data owner applies for a key from the encryption service, manages key authorization, and authorizes the corresponding key ID to the data user; During encryption, the data user generates random pseudo data based on the size of the plaintext data; The encryption service encrypts the random pseudo data given by the data user using the authorized key and returns the first encryption result; The data user calculates the corresponding ciphertext data and message authentication code based on the first encryption result and the plaintext data; During decryption, the encryption service uses the authorized key to perform encryption calculations on part of the first encryption result and random pseudo data and returns the second encryption result; The data user generates the initial plaintext after calculating based on the second encryption result and the ciphertext data; If the initial plaintext passes the data verification, the plaintext data is output, otherwise the decryption error occurs.

2. The method according to claim 1, characterized in that The method is used in the encryption phase and further comprises: The data user generates corresponding random pseudo data based on the length of the plaintext data through the random number generation module in its own software cryptographic module; The data user requests the encryption service to encrypt the random pseudo data based on the data owner's authorization key ID; The encryption service verifies that the data owner has authorized the data user to use the key ID. The random number generation module generates an initialization vector (IV), calls the corresponding key, and uses a symmetric encryption algorithm to encrypt the random pseudo-data and generate a mask. The output of the first encryption result includes the IV and the mask. The data user generates a random salt value through the random number generation module in the cryptographic module of its own software. It uses the mask of the first encryption result and the plaintext data to generate the ciphertext. It then performs a hash calculation using the salt value, plaintext, and ciphertext data to generate the message authentication code. Output random pseudo data, salt value, initialization vector, message authentication code and ciphertext as encrypted output data.

3. The method according to claim 2, characterized in that The data encryption includes: Data encryption does not leave the domain, that is, the plaintext data to be encrypted is in the security domain of the data user, and the encryption service cannot obtain information related to the plaintext data; Data encryption uses a one-time secret key. That is, when the encryption service generates the first encryption result, the initial vector is required to be randomly generated by the encryption server to ensure a one-time secret key.

4. The method according to claim 1, wherein The method is used for decryption, comprising: The data user requests the encryption service to encrypt the random pseudo data using the initial vector from the first encryption result based on the data owner's authorization key ID. The encryption service verifies that the data owner has authorized the data user to use the key ID. The encryption service uses the same symmetric encryption algorithm as the encryption process to encrypt the random pseudo data based on the initialization vector entered by the data user to generate a second encryption result. The data user uses their own software cryptographic module and a random number generation module to generate a salt value. The second encryption result is combined with the ciphertext in the encrypted output data to generate the initial plaintext. The initial plaintext, ciphertext, and salt value are hashed to generate the initial message authentication code. If the initial message authentication code is the same as the message authentication code, the plaintext is output; If the initial message authentication code is different from the message authentication code, a decryption error alarm is output; The initial plaintext, first encryption result, second encryption result and other data generated during the calculation process need to be strictly protected in the software cryptographic module of the data user.

5. The method according to claim 4, characterized in that The decryption stage includes a data verification stage of a message authentication code, and the method includes: Perform integrity check on the encryption result, that is, perform integrity check on the ciphertext, salt value, and initial plaintext. If the ciphertext, random pseudo data, initial vector, salt value, or message authentication code is tampered with, or the key is incorrect, the message authentication code will fail the check. Through message authentication code verification, different results are output; if the verification is correct, the initial plaintext is output as the plaintext data; if the verification is incorrect, the decryption error message is output and the data of the decryption process is not output.

6. The method according to claim 1, characterized in that The key authorization of the encryption service includes: Data users use key IDs to encrypt and decrypt data. The cryptographic service needs to make judgments based on the authorization conditions set by the key ID owner before performing encryption and decryption calculations. The data owner manages the authorization of the data user through encryption services; the data owner restricts the data user's use of the data owner's data by allowing or prohibiting the data user from using the key ID.

7. A software cryptographic module, characterized in that: A software module that executes recognized or approved cryptographic algorithms and key generation, meets certain security level requirements, and can be used to perform any of the cryptographic functions described in claims 1-6, including hash calculation, random number generation, etc.

8. An encryption service, characterized in that By using the authorization interface and providing a software SDK, encrypted resources are provided to data users for use, key management, and encryption and decryption related calculations are performed. It can be used to perform the cryptographic functions described in any one of claims 1-6, including random number generation, encryption calculations, key security management, and key authorization management.

Citation Information

Cited By

  • Supervision submission-oriented data encryption storage method and system

    CN120951361A

  • Data encryption storage method and system for regulatory reporting

    CN120951361B