Access control method based on attribute relation evaluation and data encryption

Through the access control method based on attribute relationship evaluation and SM9 encryption algorithm, the problem of insufficient complexity and security of the data access control environment in the prior art is solved, and efficient, flexible and secure data access control is achieved.

CN119918073AActive Publication Date: 2025-05-02NORTHWESTERN POLYTECHNICAL UNIV +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411969965.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-02
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

In the response to complex and changeable data access control environments, the prior art is difficult to effectively control data access rights, resulting in an increase in the risk of data breaches and illegal access, and traditional methods are inefficient and lack flexibility.

Method used

The access control method based on attribute relationship evaluation and data encryption is adopted. By comparing the attribute relationship of object data in the data access control scenario, the attribute set used for access control is selected, the access policy matrix is ​​determined, and the plain text data is encrypted using the SM9 encryption algorithm to construct a secret sharing matrix for access control.

Benefits of technology

Improves the efficiency and security of access control, ensuring that only users who meet certain conditions can access data, saving computing resources and storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119918073A_ABST
    Figure CN119918073A_ABST
Patent Text Reader

Abstract

The invention discloses an access control method based on attribute relation evaluation and data encryption, which comprises the following steps: for object data with different attributes in a data access control scene, screening out an attribute set for access control by comparing the relation between the attributes; determining an access strategy matrix according to the attribute set; encrypting the plaintext data by using an SM9 encryption algorithm to obtain a secret value; constructing a secret sharing matrix based on the secret values; the access strategy matrix is calculated through the secret sharing matrix, an encrypted attribute value is obtained, and the encrypted attribute value serves as an access control condition and is used for limiting that a user with the attribute matched with the access control condition has the qualification to obtain plaintext data through calculation, so that the access purpose is achieved. According to the method, attribute relation evaluation and encryption protection based on the SM9 algorithm are combined, it is ensured that only users meeting specific conditions can access data, the access control efficiency can be greatly improved, safety is improved, and computing resources and storage space are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of data access control, and in particular relates to an access control method based on attribute relationship evaluation and data encryption. Background Art

[0002] With the rapid development of information technology and the advent of the big data era, data security and privacy protection have become the focus of attention. Data is widely used in various fields, such as medical care, finance, e-commerce, and government services, and these fields are increasingly dependent on data. However, with the exponential growth of data volume, security issues such as data leakage, tampering, theft, and illegal access are also emerging. Especially in the context of emerging technologies such as cloud computing and the Internet of Things, the openness and sharing of data are constantly improving. Data is no longer limited to traditional corporate internal networks, but is distributed on the Internet. Although the openness and sharing of data have improved the efficiency of information utilization, they have also brought new security challenges and increased the risk of data leakage and illegal access. Therefore, how to effectively control data access rights and ensure the security of data in an open environment has become an important issue that needs to be solved urgently.

[0003] In the cloud computing environment, data storage and processing have been transferred from traditional local systems to the cloud. Although cloud computing provides enterprises and users with flexible resource use and management capabilities and reduces IT costs, the openness and multi-tenant characteristics of the cloud environment also increase the risk of data leakage and illegal access. Data is stored on the servers of third-party cloud service providers, and users have less control over their data. If there is no effective security mechanism, the data may be accessed by malicious attackers or unauthorized users. In addition, data transmission in cloud computing also faces the risk of being intercepted or tampered with.

[0004] The widespread use of Internet of Things (IoT) technology has further exacerbated data security issues. IoT devices are usually distributed in various environments, including homes, factories, cities, etc. These devices generate and transmit a large amount of real-time data. Due to the large number of devices and their wide distribution, this data can easily become a target of cyber attacks. The computing power and security mechanisms of IoT devices themselves are limited, and they are often unable to effectively resist complex cyber attacks, resulting in a higher risk of data leakage. Therefore, how to protect data security in an open and distributed IoT environment has become an urgent problem to be solved.

[0005] The demand for data sharing and access is growing, and the risk of data leakage and illegal access is also increasing. In this context, how to effectively control data access rights and ensure the security of data in an open environment has become an important issue that needs to be solved. Although traditional access control mechanisms have been widely used in the past few decades, they are no longer able to cope with the current complex and changing environment. For example, traditional methods usually require complex certificate management and are inefficient when dealing with dynamically changing access policies. Most of the existing access control solutions have the following problems:

[0006] 1. Attribute selection problem: Traditional attribute selection methods rely on manual or simple statistical methods, which are difficult to cope with complex access requirements and are inefficient in big data environments. At the same time, when selecting attributes, it is easy to ignore the correlation between attributes, which affects attribute selection.

[0007] 2. Insufficient access control flexibility: The existing access control model is difficult to adapt to the rapidly changing environment and needs, lacking flexibility and dynamism. At the same time, the access control system is prone to leaking secret values ​​after being attacked. Summary of the invention

[0008] In order to solve the above problems existing in the prior art, the present invention provides an access control method based on attribute relationship evaluation and data encryption. The technical problem to be solved by the present invention is achieved through the following technical solutions:

[0009] An access control method based on attribute relationship evaluation and data encryption, comprising:

[0010] For object data with different attributes in data access control scenarios, the attribute set used for access control is screened out by comparing the relationship between the attributes;

[0011] Determining an access policy matrix based on the attribute set;

[0012] Encrypt the plaintext data using the SM9 encryption algorithm to obtain a secret value;

[0013] constructing a secret sharing matrix based on the secret value;

[0014] The access policy matrix is ​​calculated using the secret sharing matrix to obtain encrypted attribute values. The encrypted attribute values ​​are used as access control conditions to limit users whose attributes match the access control conditions to be eligible to calculate plaintext data to achieve access purposes.

[0015] In one embodiment of the present invention, the object data with different attributes in the data access control scenario is screened out an attribute set for access control by comparing the relationship between the attributes, including:

[0016] Acquire multiple data groups in a data access control scenario, each data group consisting of two object data with different attributes;

[0017] For each data group, determine the pairwise attribute relationships between data objects in the data group to obtain an attribute relationship matrix;

[0018] Determine a weight matrix corresponding to the attribute relationship matrix according to pre-set weights for different attribute relationships;

[0019] Calculate the length of each row vector in the weight matrix, sort all the row vectors from large to small according to their length, select multiple row vectors that are sorted first, and use the attributes corresponding to the selected row vectors as candidate attributes;

[0020] Calculate the length of each column vector in the weight matrix, sort all column vectors from large to small according to their length, select multiple column vectors that are sorted first, and use attributes corresponding to the selected column vectors as candidate attributes;

[0021] All candidate attributes constitute the attribute set used for access control.

[0022] In one embodiment of the present invention, different attribute relationships include: equivalence relationships, hierarchical relationships, and unknown relationships;

[0023] The relationship between the pre-set weights of different attribute relationships, including:

[0024] The weight of equivalence relation > the weight of hierarchical relation > the weight of unknown relation.

[0025] In one embodiment of the present invention, calculating the length of each row vector in the weight matrix, or calculating the length of each column vector in the weight matrix, includes:

[0026] The squares of the values ​​in the corresponding vectors are summed, and the square root of the sum is calculated.

[0027] In one embodiment of the present invention, determining an access policy matrix according to the attribute set includes:

[0028] Determine an access policy expression according to the relationship between the attributes in the attribute set and the actual access control requirements; wherein the access policy expression is a logical expression of different access policies, and each access policy is determined according to the logical relationship between the corresponding attributes;

[0029] Determine an access policy matrix according to a preset matrix construction rule, logical relationships between attributes in the access policy expression and between access policies;

[0030] The preset matrix construction rules include: the attributes in the attribute set are all represented by a single-entry matrix;

[0031] If the logical relationship between the access policies is an OR relationship, the access policy matrix corresponding to the access policy expression is expressed as:

[0032]

[0033] If the logical relationship between the access policies is an AND relationship, the access policy matrix corresponding to the access policy expression is expressed as:

[0034]

[0035] Among them, C a and R a represents the first column and the remaining columns of the matrix corresponding to an access policy in the access policy expression, C b and R b Represents the first column and the remaining columns of the matrix corresponding to another access strategy in the access strategy expression.

[0036] In one embodiment of the present invention, constructing a secret sharing matrix based on the secret value includes:

[0037] The secret value and a set of random numbers form a one-dimensional column vector as a secret sharing matrix.

[0038] In one embodiment of the present invention, the access policy matrix is ​​calculated using the secret sharing matrix to obtain the encrypted attribute value, including:

[0039] The access policy matrix and the secret sharing matrix are multiplied to obtain an encrypted attribute value.

[0040] In one embodiment of the present invention, the process of calculating and obtaining plaintext data for a user whose attributes match the access control condition includes:

[0041] Users whose attributes match the access control conditions use their attribute values ​​to obtain the corresponding access matrix M A ;

[0042] Using the access matrix M A , access coefficient λ A And the relationship between the target vector ε, solve the access coefficient λ A ;

[0043] According to the encrypted attribute value, the access coefficient λ is solved A , and the calculation formula of the secret value, solve the secret value;

[0044] The secret value is decrypted using the SM9 decryption algorithm to obtain the plaintext data.

[0045] In one embodiment of the present invention, the access matrix M A , access coefficient λ A And the relationship between the target vector ε is expressed as:

[0046]

[0047] Where T represents matrix transpose; ε=(1,0,…,0) T .

[0048] In one embodiment of the present invention, the calculation formula of the secret value is expressed as:

[0049]

[0050] in, represents the request matrix; ρ represents the secret sharing matrix; M A ·ρ represents the product of the access matrix and the secret sharing matrix; S represents the secret value.

[0051] In the scheme provided by the embodiment of the present invention, firstly, the object data with different attributes in the data access control scenario is compared with the relationship between the attributes to screen out the attribute set for access control; secondly, the access policy matrix is ​​determined according to the attribute set; next, the plaintext data is encrypted using the SM9 encryption algorithm to obtain a secret value; then a secret sharing matrix is ​​constructed based on the secret value; finally, the access policy matrix is ​​calculated using the secret sharing matrix to obtain the encrypted attribute value, and the encrypted attribute value is used as an access control condition to limit the user whose attribute matches the access control condition to be qualified to calculate the plaintext data to achieve the purpose of access. The scheme of the present invention combines attribute relationship evaluation and encryption protection based on the SM9 algorithm. Through scientific evaluation and screening of attributes, a linear secret sharing matrix is ​​constructed for access control, and data encryption is performed in combination with the SM9 algorithm to ensure that only users who meet specific conditions can access the data, greatly improving the efficiency of access control, improving security, and saving computing resources and storage space. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 A flowchart of an access control method based on attribute relationship evaluation and data encryption provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.

[0054] As emerging access control and encryption technologies, attribute-based access control and identity-based encryption have gradually attracted widespread attention from academia and industry. Attribute-based access control makes access decisions based on the attribute information of users and resources. It has higher flexibility and fine-grained control capabilities and can adapt to complex and changing access scenarios. Identity-based encryption technology, especially the SM9 algorithm, greatly simplifies the complexity of key management and distribution by directly using identities (such as user names, email addresses, etc.) as public keys, avoiding the complex certificate management required by traditional public key infrastructure (PKI). The SM9 algorithm not only improves the flexibility and scalability of encryption systems, but also enhances data security, especially in distributed and open environments.

[0055] Therefore, the embodiment of the present invention proposes a novel access control scheme, which combines attribute relationship evaluation with encryption protection based on the SM9 algorithm, aiming to achieve efficient, flexible and secure access control.

[0056] Specifically, the embodiment of the present invention provides an access control method based on attribute relationship evaluation and data encryption, such as Figure 1 As shown, the method may include the following steps:

[0057] S1, for object data with different attributes in the data access control scenario, the attribute set used for access control is screened out by comparing the relationship between the attributes;

[0058] Sorting attributes is a more core concept than calculating length. In the process of protecting big data, the importance of security-oriented attributes in each big data can be evaluated to sort the data attributes for security. This step of the embodiment of the present invention provides an attribute relationship evaluation method for screening out high-priority attributes in data access control scenarios.

[0059] Specifically, the main process of the attribute relationship evaluation method of the embodiment of the present invention is: first, all attributes of the data are extracted, and then the attributes are generalized. Next, the correlation between the attributes is compared and the relationship is evaluated. Finally, the selected attributes that require security measures are protected based on the correlation evaluation.

[0060] To facilitate understanding of the process, first assume that the modeling environment is as follows:

[0061] (1) The target is multiple big data with different attributes;

[0062] (2) Each big data is considered as a single object, and big data with multiple attributes can be called object data.

[0063] (3) The association between a specific value and an attribute is unknown.

[0064] (4) All attributes are interrelated.

[0065] Therefore, suppose:

[0066] OBD i Represents the i-th big data, which can be any object type;

[0067] Attr_x represents the "x" attribute of the big data;

[0068] OBD i (Attr) represents big data OBD i The attribute set of

[0069] OBD i [Attr_x] indicates the length of the attribute "x" of the i-th big data;

[0070] In an optional implementation manner, S1 may include the following steps:

[0071] S11, obtaining multiple data groups in a data access control scenario, each data group consisting of two object data with different attributes;

[0072] The data access control scenario is determined based on the actual situation. For example, for a company, different data can be accessed. Each object data in the scenario can have different attributes, such as belonging to Department A, Office B, or financial data, etc.

[0073] For all object data in the data access control scenario, two objects may form a data group, so that attribute sets can be filtered separately in the form of data groups later.

[0074] S12, for each data group, determining the attribute relationship between each pair of data objects in the data group to obtain an attribute relationship matrix;

[0075] The following S12 to S16 are described by taking a data group as an example. For example, Table 1 shows a data group, which includes large data (object data) OBD1 and OBD2, each having multiple attributes.

[0076] Table 1 Data set examples

[0077]

[0078]

[0079] The embodiment of the present invention assumes that all attributes have some relationship with each other. This means that some attribute relationships have unknown values. The relationship between attributes can be decomposed into three cases.

[0080] Specifically, different attribute relations include: equivalence relations, hierarchical relations, and unknown relations;

[0081] ① Equivalence relation: Two attributes are the same if the attributes 'x' and 'y' are the same. That is:

[0082] Attr_x ≡ Attr_y;

[0083] ②Hierarchical relationship: Two attributes have a hierarchical relationship. That is:

[0084]

[0085] ③Unknown relationship: It is neither an equivalence relationship nor a hierarchical relationship. That is:

[0086]

[0087] Among them, it can be understood that ∧ represents the logic of AND; ∨ represents the logic of OR; ≡ is the identity sign, Is the constant inequality sign.

[0088] According to Table 1, OBD1 (Attr) = {Attr_a, Attr_b, Attr_c, Attr_d}, there are four attributes; OBD2 (Attr) = {Attr_a', Attr_b, Attr_e}, there are three attributes.

[0089] According to Table 1, the relationship between each attribute in OBD1 and each attribute in OBD2 can be determined, thereby obtaining an attribute relationship matrix, which can be seen in Table 2.

[0090] Table 2 Example of attribute relationship matrix

[0091]

[0092] S13, determining a weight matrix corresponding to the attribute relationship matrix according to pre-set weights for different attribute relationships;

[0093] The embodiment of the present invention pre-sets different weights for attribute relationships for evaluation. The weights are expressed as scores for quantitative comparison, with "equivalent" relationships receiving the highest score, "unknown" relationships receiving the lowest score, and hierarchical relationships receiving intermediate scores.

[0094] That is, the relationship between the pre-set weights of different attribute relationships, including:

[0095] The weight of equivalence relation > the weight of hierarchical relation > the weight of unknown relation.

[0096] In an optional implementation, the weight of the equivalence relationship may be 5, the weight of the hierarchical relationship may be 3, and the weight of the unknown relationship may be 1.

[0097] According to the above example, the attribute relationship matrix shown in Table 2 can be converted into a weight matrix as shown below:

[0098]

[0099] Of course, the weights of other values ​​can also be set according to actual application requirements.

[0100] S14, calculating the length of each row vector in the weight matrix, sorting all the row vectors from large to small according to their lengths, selecting multiple row vectors that are sorted first, and using attributes corresponding to the selected row vectors as candidate attributes;

[0101] Assume that the length of each row vector and column vector is proportional to the importance of the association. In this case, the attribute relationship can be evaluated according to the score. Calculating the length of each row vector in the weight matrix, or calculating the length of each column vector in the weight matrix, includes:

[0102] The squares of the values ​​in the corresponding vectors are summed, and the square root of the sum is calculated.

[0103] Specifically, for the big data OBD2, the length of each attribute (row vector) is as follows:

[0104]

[0105] Therefore, all row vectors are sorted from large to small according to their length, that is, the corresponding attribute lengths are sorted from large to small as follows:

[0106] Attr_b>Attr_a'>Attr_e

[0107] In this example, Attr_b can be selected as an alternative attribute, indicating that for the security association of big data OBD2 with big data OBD1, attribute Attr_b needs to be protected at the highest level.

[0108] Of course, it is not necessary to select only one attribute that is ranked first as the candidate attribute.

[0109] S15, calculating the length of each column vector in the weight matrix, sorting all column vectors from large to small according to their lengths, selecting multiple column vectors that are sorted first, and using attributes corresponding to the selected column vectors as candidate attributes;

[0110] Specifically, for the big data OBD1, the length of each attribute (column vector) is as follows:

[0111]

[0112] Therefore, all column vectors are sorted from large to small according to their lengths, that is, the corresponding attribute lengths are sorted from large to small as follows:

[0113] Attr_b>Attr_a>Attr_c=Attr_d

[0114] In this example, Attr_b can be selected as an alternative attribute, indicating that for the security association of big data OBD1 with big data OBD2, attribute Attr_b requires the highest level of security protection.

[0115] S16, forming an attribute set for access control by means of all candidate attributes.

[0116] It can be understood that the candidate attributes of all data groups constitute the attribute set used for access control.

[0117] S2, determining an access policy matrix according to the attribute set;

[0118] In an optional implementation manner, S2 may include the following steps:

[0119] S21, determining an access policy expression according to the relationship between the attributes in the attribute set and the actual access control requirements;

[0120] Wherein, the access policy expression is a logical expression of different access policies, and each access policy is determined according to the logical relationship between corresponding attributes;

[0121] For ease of understanding, an example is given below. Assume that the access policy expression is: p = (a1∧a2)∨(a1∧a3∧a4), where a1, a2, a3, and a4 are attributes in the attribute set, and can also represent the corresponding access policy. In this case, p is used a represents (a1∧a2), p b represents (a1∧a3∧a4), each representing an access policy. The access policy expression can be expressed as p=p a ∨p b .

[0122] S22, determining an access policy matrix according to a preset matrix construction rule, logical relationships between attributes in the access policy expression and between access policies;

[0123] The preset matrix construction rules include: the attributes in the attribute set are all represented by a single-entry matrix;

[0124] If the logical relationship between the access policies is an OR relationship, the access policy matrix corresponding to the access policy expression is expressed as:

[0125]

[0126] If the logical relationship between the access policies is an AND relationship, the access policy matrix corresponding to the access policy expression is expressed as:

[0127]

[0128] Among them, C a and R a represents the first column and the remaining columns of the matrix corresponding to an access policy in the access policy expression, C b and R b The first column and the remaining columns of the matrix corresponding to another access policy in the access policy expression are represented. Each row of the matrix formed by the access policy corresponds to an attribute value, that is, the row vector and the attribute value form a one-to-one mapping relationship.

[0129] Specifically, the above example is still used for explanation.

[0130] The attributes a1, a2, a3, and a4 are all represented by a single-entry matrix, that is, M U =[1].

[0131] Matrix M a Represents access policy p a , C a Represents access policy p a The corresponding matrix M a The first column, R a Represents access policy p a The corresponding matrix M a The remaining columns except the first column in the matrix M b Represents access policy p b , C b Represents access policy p b The corresponding matrix M b The first column, R b Represents access policy p b The corresponding matrix M b The remaining columns except the first column.

[0132] For access policy p a , p a =(a1∧a2)=[1]∧[1], by available:

[0133]

[0134] Similarly, for p b =(a1∧a3∧a4), we can get:

[0135]

[0136] For access policy p=pa ∨p b ,according to The access policy matrix can be obtained as:

[0137]

[0138] Among them, each row of the access strategy matrix is ​​represented in sequence as a1, a2, a1, a3, a4.

[0139] S3, encrypt the plaintext data using the SM9 encryption algorithm to obtain a secret value;

[0140] In actual applications, most ciphertexts have an attribute strategy when they are shared or access controlled. The secret value can only be obtained when the attribute strategy (conditions) are met. For example, for a secret value file, only Manager C of Office B under Department A can access it. The access condition can be decomposed into an attribute set: [Department A, Office B, Manager C]. The secret value file can only be obtained if the conditions in the attribute set are met at the same time. If p1 represents Department A, p2 represents Office B, p3 represents Manager C, and p represents the access condition (access strategy), then p can be expressed as:

[0141] p=p1∧p2∧p3;

[0142] There are many encryption protection methods for the protection of secret value files. Among them, attribute-based encryption is an encryption technology that binds user identity to a series of attributes. The present invention mainly uses the SM9 encryption algorithm to encrypt and protect the plaintext value to obtain a secret value file.

[0143] The SM9 encryption algorithm is an identity-based public key cryptographic algorithm. It is different from the common RSA public key cryptographic algorithm. The public key of the identity-based cryptographic algorithm is a user's identity identifier, such as email address, ID number, etc. The user's private key is generated through the user's identity identifier and the system master key.

[0144] The SM9 encryption algorithm is constructed based on a finite field elliptic curve group and includes four stages: initialization stage, key generation stage, encryption stage, and decryption stage.

[0145] 1) Setup(λ): Initialization phase of the algorithm. Given the security parameter λ; bilinear group BP = (G1, G2, G T ,e,N), where N is a large prime number related to the security parameter, G1,G2 are N-order additive groups, G T is an N-order multiplicative group, e: G1×G2→G T Satisfies bilinearity and non-degeneracy; H1: represents a hash function from a binary string of arbitrary length to a multiplicative group modulo N, where H1 represents the hash function and {0,1} * is the domain of function H1, represents the set of all possible binary strings, → represents the mapping, is the value range of the function H1, which represents the multiplication group modulo N. Specifically, it represents the set of all integers coprime to N. The private key generation function identifier hid represented by a byte. The algorithm randomly selects P1∈G1, P2∈G2 and a random number a∈Z N , calculate P pub = aP1 and set g = e(P pub ,P2).

[0146] Public parameters (master public key) mpk = {BP, P1, P2, P pub ,g,H1,hid}, master private key msk=a.

[0147] 2) KeyGen(mpk,msk,ID): The key generation phase of the algorithm. Given an ID, the algorithm first calculates t1 = H1(ID||hid,N) + a(mod N). If t1 = 0, the key generation center KGC reselects the master key a∈Z N , calculate and publish the corresponding master public key P pub and g, recalculate the existing user's decryption key sk. Otherwise, KGC calculates and

[0148] 3) Encrypt(mpk,X,ID): The encryption phase of the algorithm. Given an identifier ID, the algorithm first selects a random number s∈Z N , and calculate Q ID =H1(ID||hid,N)P1+P pub Then, calculate the ciphertext S = (C1 = Xg s ,C2=sQ ID ). Among them, the plaintext data X is the message value. Through the Encrypt algorithm, the message value X can be encrypted based on identity to obtain the encrypted value (secret value, also called ciphertext) S.

[0149] 4)Decrypt(mpk,S,sk ID ): Decryption phase of the algorithm. If you need to decrypt the secret value S, you can use the Decrypt algorithm to decrypt S. Once you receive a secret value S and a decryption key sk ID , the algorithm first calculates w=e(C2,sk ID ), and then output the plaintext data

[0150] In this step of the embodiment of the present invention, the plaintext data is encrypted and protected by the SM9 algorithm to obtain the secret value S, which can be accessed through the access policy matrix. Only when the access conditions are met can the secret value S be accessed. The secret value S is then decrypted to obtain the final plaintext data X.

[0151] S4, constructing a secret sharing matrix based on the secret value;

[0152] This step includes:

[0153] The secret value and a set of random numbers form a one-dimensional column vector as a secret sharing matrix.

[0154] Specifically, the secret sharing matrix can be expressed as:

[0155] ρ=(S,ρ2,…,ρ e );

[0156] Where S represents the secret value; ρ2,…,ρ e Represents a set of random numbers.

[0157] S5, using the secret sharing matrix to calculate the access policy matrix to obtain encrypted attribute values, the encrypted attribute values ​​are used as access control conditions to limit users whose attributes match the access control conditions to be eligible to calculate the plaintext data to achieve the purpose of access.

[0158] The access policy matrix is ​​calculated using the secret sharing matrix to obtain encrypted attribute values, including:

[0159] The access policy matrix and the secret sharing matrix are multiplied to obtain the encrypted attribute value. The encrypted attribute value can be expressed as:

[0160] M·ρ=(s1,…,s d ) T ;

[0161] Among them, s1,…,s d Represents each value in the encrypted attribute value, and T represents matrix transpose.

[0162] Still using the above example, assume that after the plaintext data is encrypted using the SM9 encryption algorithm, the secret value S=2 is obtained, and assume that the secret sharing matrix is ​​ρ=(2,3,1,4) T , at this time the encrypted attribute value M·ρ is expressed as:

[0163]

[0164] That is, the encrypted attribute value is (5,3,7,4,1)T .

[0165] In the embodiment of the present invention, the encrypted attribute value is used as an access control condition to limit users whose attributes match the access control condition to be eligible to calculate and obtain plaintext data to achieve the purpose of access.

[0166] Specifically, the process of calculating and obtaining plaintext data for a user whose attributes match the access control condition includes:

[0167] (1) Users whose attributes match the access control conditions use their attribute values ​​to obtain the corresponding access matrix M A ;

[0168] The user whose attribute matches the access control condition has an attribute value that is the value of M·ρ corresponding to the known partial attribute, denoted as M A ·ρ. Among them, M A is the access matrix.

[0169] (2) Using the access matrix M A , access coefficient λ A And the relationship between the target vector ε, solve the access coefficient λ A ;

[0170] In the embodiment of the present invention, there is a target vector ε=(1,0,…,0) T , which can make This formula is for the access matrix M A , access coefficient λ A And the relationship between the target vector ε, through this equation, the corresponding access coefficient λ can be solved A .

[0171] For the above example, assume that the user requesting access already has the secret values ​​corresponding to attributes a1 and a2, that is, the user requesting access satisfies the access policy condition (a1∧a2) and knows the value M of M·ρ corresponding to attributes a1 and a2. A ·ρ. At this time, the user can first solve λ A Specifically, take the row vectors corresponding to the attribute values ​​of matrices a1 and a2 and transpose them to form a new matrix:

[0172]

[0173] Then use The calculation results are:

[0174]

[0175] We can solve for λ A =(1,-1).

[0176] (3) Based on the encrypted attribute value, the access coefficient λ is obtained. A , and the calculation formula of the secret value, solve the secret value;

[0177] The calculation formula of the secret value is expressed as:

[0178]

[0179] The above formula is based on M·ρ=(s1,…,s d ) T Get. A T represents the request matrix; ρ represents the secret sharing matrix; M A ·ρ represents the product of the access matrix and the secret sharing matrix; S represents the secret value.

[0180] For the above example, since M·ρ=(5,3) T ,λ A =(1, -1), and substituting it into the calculation formula of the secret value, the secret value can be obtained as follows:

[0181] S=(M·ρ)·λ A =2;

[0182] (4) Decrypt the secret value using the SM9 decryption algorithm to obtain the plaintext data.

[0183] The user requesting access can decrypt the secret value S through the SM9 algorithm and obtain the final plaintext data, then the access is successful. For the encryption and decryption process of the SM9 algorithm, please refer to the relevant technical understanding, which will not be explained in detail here.

[0184] In the scheme provided by the embodiment of the present invention, firstly, the object data with different attributes in the data access control scenario is compared with the relationship between the attributes to screen out the attribute set for access control; secondly, the access policy matrix is ​​determined according to the attribute set; next, the plaintext data is encrypted using the SM9 encryption algorithm to obtain a secret value; then a secret sharing matrix is ​​constructed based on the secret value; finally, the access policy matrix is ​​calculated using the secret sharing matrix to obtain the encrypted attribute value, and the encrypted attribute value is used as an access control condition to limit the user whose attribute matches the access control condition to be qualified to calculate the plaintext data to achieve the purpose of access. The scheme of the present invention combines attribute relationship evaluation and encryption protection based on the SM9 algorithm. Through scientific evaluation and screening of attributes, a linear secret sharing matrix is ​​constructed for access control, and data encryption is performed in combination with the SM9 algorithm to ensure that only users who meet specific conditions can access the data, greatly improving the efficiency of access control, improving security, and saving computing resources and storage space.

[0185] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. An access control method based on attribute relationship evaluation and data encryption, characterized in that: include: For object data with different attributes in data access control scenarios, the attribute set used for access control is screened out by comparing the relationship between the attributes; Determining an access policy matrix based on the attribute set; Encrypt the plaintext data using the SM9 encryption algorithm to obtain a secret value; constructing a secret sharing matrix based on the secret value; The access policy matrix is ​​calculated using the secret sharing matrix to obtain encrypted attribute values. The encrypted attribute values ​​are used as access control conditions to limit users whose attributes match the access control conditions to be eligible to calculate plaintext data to achieve access purposes.

2. The access control method based on attribute relationship evaluation and data encryption according to claim 1 is characterized in that: The object data with different attributes in the data access control scenario is screened out an attribute set for access control by comparing the relationship between the attributes, including: Acquire multiple data groups in a data access control scenario, each data group consisting of two object data with different attributes; For each data group, determine the pairwise attribute relationships between data objects in the data group to obtain an attribute relationship matrix; Determine a weight matrix corresponding to the attribute relationship matrix according to pre-set weights for different attribute relationships; Calculate the length of each row vector in the weight matrix, sort all the row vectors from large to small according to their length, select multiple row vectors that are sorted first, and use the attributes corresponding to the selected row vectors as candidate attributes; Calculate the length of each column vector in the weight matrix, sort all column vectors from large to small according to their length, select multiple column vectors that are sorted first, and use attributes corresponding to the selected column vectors as candidate attributes; All candidate attributes constitute the attribute set used for access control.

3. The access control method based on attribute relationship evaluation and data encryption according to claim 2 is characterized in that: Different attribute relations, including: equivalence relations, hierarchical relations and unknown relations; The relationship between the pre-set weights of different attribute relationships, including: The weight of equivalence relation > the weight of hierarchical relation > the weight of unknown relation.

4. The access control method based on attribute relationship evaluation and data encryption according to claim 2 is characterized in that: Calculating the length of each row vector in the weight matrix, or calculating the length of each column vector in the weight matrix, comprising: The squares of the values ​​in the corresponding vectors are summed, and the square root of the sum is calculated.

5. The access control method based on attribute relationship evaluation and data encryption according to claim 1 is characterized in that: Determining an access policy matrix according to the attribute set includes: Determine an access policy expression according to the relationship between the attributes in the attribute set and the actual access control requirements; wherein the access policy expression is a logical expression of different access policies, and each access policy is determined according to the logical relationship between the corresponding attributes; Determine an access policy matrix according to a preset matrix construction rule, logical relationships between attributes in the access policy expression and between access policies; The preset matrix construction rules include: the attributes in the attribute set are all represented by a single-entry matrix; If the logical relationship between the access policies is an OR relationship, the access policy matrix corresponding to the access policy expression is expressed as: If the logical relationship between the access policies is an AND relationship, the access policy matrix corresponding to the access policy expression is expressed as: Among them, C a and R a represents the first column and the remaining columns of the matrix corresponding to an access policy in the access policy expression, C b and R b Represents the first column and the remaining columns of the matrix corresponding to another access strategy in the access strategy expression.

6. The access control method based on attribute relationship evaluation and data encryption according to claim 1 is characterized in that: Constructing a secret sharing matrix based on the secret value, comprising: The secret value and a set of random numbers form a one-dimensional column vector as a secret sharing matrix.

7. The access control method based on attribute relationship evaluation and data encryption according to claim 6 is characterized in that: The access policy matrix is ​​calculated using the secret sharing matrix to obtain encrypted attribute values, including: The access policy matrix and the secret sharing matrix are multiplied to obtain an encrypted attribute value.

8. The access control method based on attribute relationship evaluation and data encryption according to claim 7 is characterized in that: The process of calculating the plaintext data of a user whose attributes match the access control condition includes: Users whose attributes match the access control conditions use their attribute values ​​to obtain the corresponding access matrix M A ; Using the access matrix M A , access coefficient λ A And the relationship between the target vector ε, solve the access coefficient λ A ; According to the encrypted attribute value, the access coefficient λ is solved A , and the calculation formula of the secret value, solve the secret value; The secret value is decrypted using the SM9 decryption algorithm to obtain the plaintext data.

9. The access control method based on attribute relationship evaluation and data encryption according to claim 8, characterized in that: The access matrix M A , access coefficient λ A And the relationship between the target vector ε is expressed as: Where T represents matrix transpose; ε=(1,0,…,0) T .

10. The access control method based on attribute relationship evaluation and data encryption according to claim 9, characterized in that: The calculation formula of the secret value is expressed as: in, represents the request matrix; ρ represents the secret sharing matrix; M A ·ρ represents the product of the access matrix and the secret sharing matrix; S represents the secret value.

Citation Information

Patent Citations

  • Attribute encryption access control system based on multiple authorizations in a cloud environment and a design method

    CN109768858A

  • Rapid strategy retrieval method based on attribute Bloom filter

    CN114268482A

  • CP-ABE-based weight attribute encryption system

    CN118282768A

  • Decentralized multi-authority attribute-based encryption from bilinear diffie-hellman assumptions

    WO2022150386A1