Rapid and secure data access control method and system based on trusted execution environment

By initializing the master key and public key in the certificate center, and using the key generation algorithm to output the transform key and private key, and combining TEE for ciphertext decryption, the problem of decryption calculation burden in the CP-ABE method is solved, improving the security and user experience of data access control.

CN120030572APending Publication Date: 2025-05-23XIAN THERMAL POWER RES INST CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing attribute-based encryption (CP-ABE) method involves a large number of exponential calculations during the decryption process, resulting in a heavy calculation burden on data users, especially on devices with limited resources, which affects the user experience.

Method used

The master key and public key PK are obtained through the certificate center using the initialization algorithm, and the master key is adjusted through the public key PK to obtain the new master key MSK. Then, a transform key SwitchK and a private key SK are output as input using the key generation algorithm. Send the private key SK to the data user, and with the assistance of the data provider and server, the ciphertext decryption operation is performed through TEE.

Benefits of technology

By reducing the computational volume of the decryption process, the security and user experience of data access control are improved, especially on resource-constrained devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120030572A_ABST
    Figure CN120030572A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data security, in particular to a rapid and secure data access control method and system based on a trusted execution environment, and the method comprises the steps: obtaining a public key PK through a certificate center, and then obtaining a new master key MSK through the public key PK; obtaining a transformation key and a private key SK according to the new master key and the attribute data set A; sending the private key SK to a data user; acquiring a ciphertext C according to the public key PK, the plaintext data M and an access strategy, sending the ciphertext C to a server, and storing the ciphertext C in a database of the server; when a data user applies for accessing data, the database imports ciphertext data into the TEE, and the server reads the transformation key from the certificate center; and according to the transformation key and the private key SK, whether decryption operation of the ciphertext is carried out or not is judged through the relationship between the attribute in the attribute data set A and the access strategy. According to the method, the data security is improved, and the calculation amount in the decryption process is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data security technology, and in particular to a fast and secure data access control method and system based on a trusted execution environment. Background Art

[0002] Fast and secure data access control based on a trusted execution environment utilizes the hardware isolation characteristics and security functions of TEE (Trusted Execution Environment) to ensure the confidentiality, integrity and security of sensitive data during access, storage and transmission. By combining identity authentication, data encryption, access control policies and real-time auditing, it is possible to achieve refined and secure control of data and effectively protect data from unauthorized access, tampering or leakage. Therefore, research on data security based on a trusted execution environment is of great significance.

[0003] Although the traditional attribute-based encryption (CP-ABE) method can achieve refined permission control based on access policies, the decryption process of CP-ABE (Ciphertext-Policy Attribute-Based Encryption) involves a large number of exponential calculations, which puts a heavy computing burden on data users, especially on resource-constrained devices (such as mobile devices), which will seriously affect the user experience. Summary of the invention

[0004] The present invention provides a fast and secure data access control method and system based on a trusted execution environment, which are used to solve the existing problems.

[0005] The purpose of the present invention can be achieved through the following technical solutions: The first aspect of the present invention is to provide a fast and secure data access control method based on a trusted execution environment, comprising: The certificate center uses the initialization algorithm to obtain the master key and public key PK, and then adjusts the master key through the public key PK to obtain the new master key MSK; Obtain the attribute data of the data user, group all the attribute data into a set and record it as attribute set A. Use the key generation algorithm to take the new master key MSK and the attribute data set A of the data user as input, output a transformation key SwitchK and a private key SK; send the private key SK to the data user; the data provider uses the encryption algorithm based on the public key PK, plaintext data M and access policy to output a ciphertext C, and send the ciphertext C to the server and store it in the server's database; When the data user applies for access to the data, the database imports the ciphertext data into the TEE, and the server reads the transformation key SwitchK from the certificate center; based on the transformation key SwitchK and the private key SK, the relationship between the attributes in the data user's attribute data set A and the access policy is used to determine whether to decrypt the ciphertext.

[0006] Furthermore, the method of obtaining the master key and the public key PK by using the initialization algorithm through the certificate center, and then adjusting the master key by using the public key PK to obtain a new master key MSK includes: Choose a bilinear group G0 of prime order p with generator g; pick two random numbers , so that ,in, Represents the set of integers modulo p, and the bilinear group G0 is used for bilinear mappings of e; According to random number and , generator g, calling the initialization algorithm through the certificate center To obtain the public key PK corresponding to each user; where the public key PK is ; Where H is a hash function; Where, represents the security requirement of the system; where e represents a bilinear mapping; The public key PK is integrated into the master key to obtain a new master key MSK. The new master key MSK is expressed as .

[0007] Furthermore, the key generation algorithm takes the new master key MSK and the attribute data set A of the data user as input, and outputs a transformation key SwitchK and a private key SK, including: The key generation algorithm uses the new master key MSK and a random value and attribute data sets As input, the certificate center calls the key generation algorithm to output a transformation key SwitchK and a private key SK; the key generation algorithm is expressed as ;in, , the transformation key SwitchK is expressed as: ); Where x is any data in the attribute set A; and yes Random values ​​in ; Finally, the transformation key SwitchK is integrated into the private key SK, and the private key SK is expressed as: .

[0008] Furthermore, the data provider outputs a ciphertext C through an encryption algorithm according to the public key PK, the plaintext data M and the access policy, including: The encryption algorithm accepts a public key PK, a plaintext data M, and an LSSS access policy As input; pass The matrix in the access policy Each row of is mapped to an attribute; let is a matrix, choose a random vector ,in, , , s is secret; With each row of the matrix Multiply, calculate ;in, Representation Matrix The number of columns; The ciphertext is constructed as: ;in, , q is the total number of attributes in the attribute set A, Represents the index value of all data in attribute set A.

[0009] Furthermore, judging whether to perform a decryption operation on the ciphertext based on the transformation key SwitchK and the private key SK and the relationship between the attributes in the attribute data set A of the data user and the access policy includes: First determine whether the attributes in the attribute data set A satisfy the access policy; When the attributes in the attribute data set A meet the access policy, the ciphertext C is transformed by the transformation key SwitchK to obtain a transformed ciphertext SC; then the transformed ciphertext SC and the private key SK are decrypted by the decryption algorithm to obtain the final decrypted plaintext data. ; When the attributes in the attribute data set A do not satisfy the access policy, an error symbol ⊥ is output.

[0010] Furthermore, the ciphertext C is transformed once by using the transformation key SwitchK to obtain a transformed ciphertext SC, including: After the attributes in the attribute data set A satisfy the access policy, define ,in ;set up To satisfy The linear shared weight of , where i∈I, I is the index set of the number of elements in the attribute data set A, is the number of all elements in the attribute data set A; Calculation formula: = ; in, represents linear shared weights, through To obtain ; It is a feature in the transformation key SwitchK; is a feature in the ciphertext C, K is a feature in the transformation key SwitchK, and is a feature in the ciphertext C, and is the linear shared weight right and Characteristics after adjustment; yes Random values ​​in ; The transformed ciphertext SC is obtained by the formula, and the ciphertext SC is expressed as .

[0011] Furthermore, the decryption algorithm is used to decrypt the transformed ciphertext SC and the private key SK to obtain the final decrypted plaintext data ,include: Accept partially decrypted ciphertext ,pass calculate ; in, is a feature in the ciphertext SC, is a feature in the ciphertext C; by and the features in ciphertext C Combination , obtain the plaintext data M.

[0012] The second aspect of the present invention is to provide a fast and secure data access control system based on a trusted execution environment, comprising: The initialization module is used to obtain the master key and the public key PK through the certificate center using the initialization algorithm, and then adjust the master key through the public key PK to obtain a new master key MSK; The ciphertext generation module is used to obtain the attribute data of the data user, group all the attribute data into a set and record it as the attribute set A. Through the key generation algorithm, the new master key MSK and the attribute data set A of the data user are used as inputs, and a transformation key SwitchK and a private key SK are output; the private key SK is sent to the data user; the data provider outputs a ciphertext C through the encryption algorithm according to the public key PK, the plaintext data M and the access policy, and sends the ciphertext C to the server and stores it in the database of the server; The ciphertext transformation and decryption module is used when the data user applies for access to the data. The database imports the ciphertext data into the TEE, and the server reads the transformation key SwitchK from the certificate center. Based on the transformation key SwitchK and the private key SK, the relationship between the attributes in the attribute data set A of the data user and the access policy is used to determine whether to perform the ciphertext decryption operation.

[0013] The third aspect of the present invention is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the fast and secure data access control method based on a trusted execution environment when executing the computer program.

[0014] A fourth aspect of the present invention is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for fast and secure data access control based on a trusted execution environment is implemented.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: a master key and a public key PK are obtained by using an initialization algorithm through a certificate center, and then the master key is adjusted through the public key PK to obtain a new master key MSK; a transformation key SwitchK and a private key SK are obtained through a key generation algorithm based on the new master key MSK and the attribute data set A of the data user; the private key SK is sent to the data user; the data provider outputs a ciphertext C through an encryption algorithm based on the public key PK, plaintext data M and access policy, and sends the ciphertext C to the server and stores it in the database of the server; the amount of calculation of the subsequent decryption process is reduced through the server; when the data user applies for access to the data, the database imports the ciphertext data into the TEE, and the server reads the transformation key SwitchK from the certificate center; based on the transformation key SwitchK and the private key SK, the relationship between the attributes in the attribute data set A of the data user and the access policy is used to determine whether to perform a decryption operation on the ciphertext, thereby improving the security of data access control through TEE. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0017] Figure 1 A flowchart of the steps of a fast and secure data access control method based on a trusted execution environment is provided for the present invention; Figure 2 A module flow chart of a fast and secure data access control system based on a trusted execution environment is provided for the present invention; Figure 3 The figure is a flowchart of fast and secure data access control based on a trusted execution environment. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. 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 creative work should fall within the scope of protection of the present invention.

[0019] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0020] In view of the problems existing in the background technology, a fast and secure data access control method and system based on a trusted execution environment is studied and designed, which has important practical significance.

[0021] like Figure 1 As shown, the first aspect of the present invention is to provide a fast and secure data access control method based on a trusted execution environment, comprising the following steps: Step S001: The certificate center uses an initialization algorithm to obtain a master key and a public key PK, and then adjusts the master key using the public key PK to obtain a new master key MSK.

[0022] It should be noted that when obtaining the master key and public key PK through the certificate center, they can be directly determined by each user's attribute data and random numbers. Therefore, each user's master key and public key PK should be uniquely corresponding. Therefore, the public key PK can be integrated into the master key to improve the confidentiality of the key.

[0023] Specifically, the algorithm is initialized with security parameters The certificate center generates a master key and a public key PK (Public Key) using the attribute data set A as input. In this embodiment, λ=128, indicating the security requirement of a 128-bit system. A is the attribute data set of the user. The user is the data user.

[0024] Choose a bilinear group G0 of prime order p with generator g; pick two random numbers , so that ,in, Represents the set of integers modulo p, and the bilinear group G0 is used for bilinear mappings of e; According to random number and , generator g, calling the initialization algorithm through the certificate center To obtain the public key PK corresponding to each user; where the public key PK is ; Where H is a hash function; Where, represents the security requirement of the system; where e represents a bilinear mapping; The public key PK is integrated into the master key to obtain a new master key MSK (Master Session Key). The new master key MSK is expressed as .

[0025] At this point, each user's new master key MSK and public key PK are obtained.

[0026] Step S002: According to the new master key MSK and the attribute data set A of the data user, a transformation key SwitchK and a private key SK are obtained through a key generation algorithm; the private key SK is sent to the data user; the data provider outputs a ciphertext C through an encryption algorithm according to the public key PK, plaintext data M and access policy, and sends the ciphertext C to the server and stores it in the server's database.

[0027] It should be noted that in order to improve the confidentiality of the ciphertext during the decryption process, two keys are generated, and the confidentiality of the ciphertext and the security of user data are enhanced by decrypting the ciphertext twice. In order to further increase the correlation and confidentiality between the keys, the switch key SwitchK (Switch Key) is integrated into the private key SK (Secret Key).

[0028] Specifically, the key generation algorithm uses a new master key MSK, a random value and attribute data sets As input, the certificate center calls the key generation algorithm to output a transformation key SwitchK and a private key SK; the key generation algorithm is expressed as ;in, , the transformation key SwitchK is expressed as: ); Where x is any data in the attribute set A; and yes Random values ​​in ; Finally, the transformation key SwitchK is integrated into the private key SK, and the private key SK is expressed as: .

[0029] Encryption Algorithm The construction process is: The encryption algorithm accepts a public key PK, a plaintext data M (Message, plaintext), and an LSSS access policy As input; LSSS (Linear Secret Sharing Scheme) access policy is a mathematical method used to describe access policy. LSSS expresses access control policy through linear equations.

[0030] pass The matrix in the access policy Each row of is mapped to an attribute; let is a matrix, choose a random vector ,in, , , s is secret; With each row of the matrix Multiply, calculate ;in, Representation Matrix The number of columns; The ciphertext is constructed as: ;in, , q is the total number of attributes in the attribute set A, Represents the index value of all data in attribute set A.

[0031] At this point, the ciphertext C (Ciphertext) is obtained.

[0032] In order to improve the computational efficiency during the decryption process and reduce the amount of computation required by the data user during decryption, the ciphertext data is sent to the server and stored in the server's database.

[0033] Step S003: When the data user applies for access to the data, the database imports the ciphertext data into the TEE, and the server reads the transformation key SwitchK from the certificate center; based on the transformation key SwitchK and the private key SK, the relationship between the attributes in the data user's attribute data set A and the access policy is used to determine whether to perform the ciphertext decryption operation.

[0034] It should be noted that in order to improve the security of the ciphertext, a secondary decryption method is used here to decrypt the ciphertext. In order to ensure that the ciphertext data is not leaked during the decryption process, the ciphertext data is placed in a trusted isolated environment to protect sensitive data and calculations, and to ensure that data and programs are executed in a secure space that cannot be easily interfered with by external malware, thereby providing data privacy, security, integrity and anti-tampering protection.

[0035] Specifically, when a data user applies for access to data, the database imports the encrypted data into the trusted execution environment TEE, and the server reads the transformation key SwitchK from the certificate center; when the attribute data set A of the data user satisfies the access policy Only when the ciphertext is decrypted, the ciphertext decryption operation can be performed; otherwise, the ciphertext decryption operation will not be performed.

[0036] The specific process of decrypting the ciphertext is as follows: (1) First, determine that the conversion algorithm takes the conversion key SwitchK and the ciphertext C as input. If , then TEE outputs a transformed ciphertext SC, otherwise it does not meet the access policy and outputs an error symbol ⊥; when the access policy is met, the ciphertext C is transformed again through the transformation key SwitchK to obtain a transformed ciphertext SC. Among them, the process of transforming the ciphertext by the transformation key is equivalent to the first decryption. Among them, Indicates that the attributes in attribute data set A satisfy the access policy .

[0037] Among them, the transformed ciphertext SC is converted by the conversion algorithm The transformation is obtained, specifically:

[0038] After the attributes in the attribute data set A satisfy the access policy, define ,in ;set up To satisfy The linear shared weight of , where i∈I, I is the index set of the number of elements in the attribute data set A, is the number of all elements in the attribute data set A; Calculation formula: = ; in, represents linear shared weights, through To obtain ; It is a feature in the transformation key SwitchK; is a feature in the ciphertext C, K is a feature in the transformation key SwitchK, and is a feature in the ciphertext C, and is the linear shared weight right and Characteristics after adjustment; yes Random values ​​in ; The transformed ciphertext SC is obtained by the formula, and the ciphertext SC is expressed as .

[0039] (2) First, determine that the decryption algorithm uses the private key SK and the transformed ciphertext SC as input. If the data user , then output a decrypted plaintext data , otherwise the access policy is not met, and an error symbol ⊥ is output; when the access policy is met, the decryption algorithm is used to decrypt the transformed ciphertext SC and the private key SK to obtain the final decrypted plaintext data; the decryption process using the private key SK is equivalent to the second decryption. Among them, the second decryption must be performed after the first decryption is successful. Among them, Indicates that the attributes in attribute data set A satisfy the access policy .

[0040] Among them, the specific process of the second decryption is: like The output is , the decryption fails and no further operations are performed; otherwise, the partially decrypted ciphertext is accepted. ,pass calculate ; in, is a feature in the ciphertext SC, is a feature in the ciphertext C; by and the features in ciphertext C Combination , obtain the plaintext data M.

[0041] Among them, the output Indicates that the attributes in attribute data set A do not satisfy the access policy .

[0042] The relationship between data providers, data users, certificate centers, ciphertext databases, and servers is as follows: Figure 3 shown.

[0043] Among them, the specific implementation process of a fast and secure data access control method based on a trusted execution environment is: 1. The certificate center initializes the TEE in the server and verifies the security of the TEE environment. Import the algorithm into TEE; 2. Certificate Center Call Generate a public key PK and a new master key MSK, and send the public key PK to the data provider; 3. The key generation algorithm uses the new master key MSK and random value and attribute data sets As input, the certificate center calls the key generation algorithm to output a transformation key SwitchK and a private key SK, and sends SK to the data user; 4. The data provider sends the public key PK, plaintext data M and access policy As input, call Output a ciphertext data C, send the ciphertext data C to the server, and store it in the database of the server; 5. Data users apply for access to data; 6. The database imports the data provider's ciphertext data C into TEE, reads SwitchK from the certificate center, and calls ,if , then TEE outputs a transformed ciphertext SC, otherwise the error symbol ⊥; 7. Send the output of step 6 to the data user, who calls , if the attribute data set of the data consumer , then the decrypted plaintext data is output , otherwise the error symbol ⊥.

[0044] Figure 2 As shown, the second aspect of the present invention is to provide a fast and secure data access control system based on a trusted execution environment, comprising the following modules: Initialization module 101, used to obtain a master key and a public key PK through a certificate center using an initialization algorithm, and then adjust the master key through the public key PK to obtain a new master key MSK; The ciphertext generation module 102 is used to obtain the attribute data of the data user, group all the attribute data into a set and record it as the attribute set A, and use the key generation algorithm to take the new master key MSK and the attribute data set A of the data user as input, output a transformation key SwitchK and a private key SK; send the private key SK to the data user; the data provider uses the encryption algorithm according to the public key PK, the plaintext data M and the access policy to output a ciphertext C, and send the ciphertext C to the server, and store it in the database of the server; The ciphertext transformation and decryption module 103 is used when the data user applies for access to the data. The database imports the ciphertext data into the TEE, and the server reads the transformation key SwitchK from the certificate center; based on the transformation key SwitchK and the private key SK, the relationship between the attributes in the attribute data set A of the data user and the access policy is used to determine whether to perform the ciphertext decryption operation.

[0045] The third aspect of the present invention is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a fast and secure data access control method based on a trusted execution environment is implemented.

[0046] A fourth aspect of the present invention is to provide a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, a fast and secure data access control method based on a trusted execution environment is implemented.

[0047] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program code.

[0048] The present invention is described with reference to flowcharts and / or block diagrams of methods, systems, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.

[0049] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0050] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0051] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A fast and secure data access control method based on a trusted execution environment, characterized in that: include: The certificate center uses the initialization algorithm to obtain the master key and public key PK, and then adjusts the master key through the public key PK to obtain the new master key MSK; Obtain the attribute data of the data user, group all the attribute data into a set and record it as attribute set A, use the key generation algorithm, take the new master key MSK and the attribute data set A of the data user as input, output a transformation key SwitchK and a private key SK; send the private key SK to the data user; The data provider uses the encryption algorithm based on the public key PK, plaintext data M and access policy to output a ciphertext C, and sends the ciphertext C to the server and stores it in the server's database; When the data user applies for access to the data, the database imports the ciphertext data into the TEE, and the server reads the transformation key SwitchK from the certificate center; According to the transformation key SwitchK and the private key SK, whether to perform the decryption operation of the ciphertext is determined by the relationship between the attributes in the attribute data set A of the data user and the access policy.

2. A fast and secure data access control method based on a trusted execution environment according to claim 1, characterized in that: The method of obtaining the master key and the public key PK by using the initialization algorithm through the certificate center, and then adjusting the master key by using the public key PK to obtain a new master key MSK includes: Choose a bilinear group G0 of prime order p with generator g; pick two random numbers , so that ,in, Represents the set of integers modulo p, and the bilinear group G0 is used for bilinear mappings of e; According to random number and , generator g, calling the initialization algorithm through the certificate center To obtain the public key PK corresponding to each user; where the public key PK is ; Where H is a hash function; Where, represents the security requirement of the system; where e represents a bilinear mapping; The public key PK is integrated into the master key to obtain a new master key MSK. The new master key MSK is expressed as .

3. A fast and secure data access control method based on a trusted execution environment according to claim 2, characterized in that: The key generation algorithm takes the new master key MSK and the attribute data set A of the data user as input, and outputs a transformation key SwitchK and a private key SK, including: The key generation algorithm uses the new master key MSK and a random value and attribute data sets As input, the certificate center calls the key generation algorithm to output a transformation key SwitchK and a private key SK; the key generation algorithm is expressed as ;in, , the transformation key SwitchK is expressed as: ); Where x is any data in the attribute set A; and yes Random values ​​in ; Finally, the transformation key SwitchK is integrated into the private key SK, and the private key SK is expressed as: .

4. A fast and secure data access control method based on a trusted execution environment according to claim 3, characterized in that: The data provider outputs a ciphertext C through an encryption algorithm according to the public key PK, the plaintext data M and the access policy, including: The encryption algorithm accepts a public key PK, a plaintext data M, and an LSSS access policy As input; pass The matrix in the access policy Each row of is mapped to an attribute; let is a matrix, choose a random vector ,in, , , s is secret; With each row of the matrix Multiply, calculate ;in, Representation Matrix The number of columns; The ciphertext is constructed as: ;in, , q is the total number of attributes in the attribute set A, Represents the index value of all data in attribute set A.

5. A fast and secure data access control method based on a trusted execution environment according to claim 4, characterized in that: The method of determining whether to perform a ciphertext decryption operation based on the transformation key SwitchK and the private key SK and the relationship between the attributes in the attribute data set A of the data user and the access policy includes: First determine whether the attributes in the attribute data set A satisfy the access policy; When the attributes in the attribute data set A meet the access policy, the ciphertext C is transformed by the transformation key SwitchK to obtain a transformed ciphertext SC; then the transformed ciphertext SC and the private key SK are decrypted by the decryption algorithm to obtain the final decrypted plaintext data. ; When the attributes in the attribute data set A do not satisfy the access policy, an error symbol ⊥ is output.

6. A fast and secure data access control method based on a trusted execution environment according to claim 5, characterized in that: The ciphertext C is transformed once by using the transformation key SwitchK to obtain a transformed ciphertext SC, including: After the attributes in the attribute data set A satisfy the access policy, define ,in ;set up To satisfy The linear shared weight of , where i∈I, I is the index set of the number of elements in the attribute data set A, is the number of all elements in the attribute data set A; Calculation formula: = ; in, represents linear shared weights, through To obtain ; It is a feature in the transformation key SwitchK; is a feature in the ciphertext C, K is a feature in the transformation key SwitchK, and is a feature in the ciphertext C, and is the linear shared weight right and Characteristics after adjustment; yes Random values ​​in ; The transformed ciphertext SC is obtained by the formula, and the ciphertext SC is expressed as .

7. A fast and secure data access control method based on a trusted execution environment according to claim 6, characterized in that: The decryption algorithm is then used to decrypt the transformed ciphertext SC and the private key SK to obtain the final decrypted plaintext data. ,include: Accept partially decrypted ciphertext ,pass calculate ; in, is a feature in the ciphertext SC, is a feature in the ciphertext C; by and the features in ciphertext C Combination , obtain the plaintext data M.

8. A fast and secure data access control system based on a trusted execution environment, characterized in that: include: The initialization module is used to obtain the master key and the public key PK through the certificate center using the initialization algorithm, and then adjust the master key through the public key PK to obtain a new master key MSK; The ciphertext generation module is used to obtain the attribute data of the data user, group all the attribute data into a set and record it as attribute set A, and use the key generation algorithm to take the new master key MSK and the attribute data set A of the data user as input, output a transformation key SwitchK and a private key SK; and send the private key SK to the data user; The data provider uses the encryption algorithm based on the public key PK, plaintext data M and access policy to output a ciphertext C, and sends the ciphertext C to the server and stores it in the server's database; The ciphertext conversion and decryption module is used when the data user applies for access to the data. The database imports the ciphertext data into the TEE, and the server reads the conversion key SwitchK from the certificate center. According to the transformation key SwitchK and the private key SK, whether to perform the decryption operation of the ciphertext is determined by the relationship between the attributes in the attribute data set A of the data user and the access policy.

9. An electronic device, characterized in that: It comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a fast and secure data access control method based on a trusted execution environment as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for fast and secure data access control based on a trusted execution environment as described in any one of claims 1 to 7 is implemented.