Trusted data encapsulation, decryption and transmission method and system based on attribute password

Through a trusted data encapsulation method based on attribute passwords, a trusted data format that meets the settings is generated, access control policies and ciphertext data are bound, which solves the performance and complexity problems of traditional solutions when sharing data in groups, and achieves efficient and secure data sharing and decryption.

CN120528599AActive Publication Date: 2025-08-22BEIJING ZHONGHONG LIDA TECH DEV CO LTD +1

Patent Information

Application Number
CN202511013748.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2025-08-22
Estimated Expiration
2045-07-23

AI Technical Summary

Technical Problem

The existing traditional public key digital envelope solution has high performance and complexity when sharing data in groups. The key-based attribute encryption calculation and communication overhead is large, and it cannot be applied to data sharing in real life. The policy-based attribute encryption calculation and communication overhead is also large, which limits its application scope.

Method used

The trusted data encapsulation method based on attribute ciphers is adopted. By generating trusted data formats that meet the settings, the access control policy, ciphertext policy and ciphertext data are bound, and the data encryption key is generated using the elliptic curve, and the attribute cipher algorithm is encrypted and decrypted, combining the integrity verification code to ensure data security and decryption efficiency.

Benefits of technology

It realizes efficient and secure data sharing, reduces the amount of computing and complexity, supports dynamic policy adjustment, is suitable for multi-user scenarios, prevents data tampering, and improves data parsing and decryption efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120528599A_ABST
    Figure CN120528599A_ABST
Patent Text Reader

Abstract

The invention relates to a trusted data encapsulation, decryption and transmission method and system based on an attribute password, and belongs to the technical field of information security. The trusted data encapsulation method comprises the following steps: randomly selecting an element R on an elliptic curve according to attribute password security parameters; generating a data encryption key based on the R, and encrypting the to-be-encrypted data to obtain ciphertext data; carrying out attribute encryption on the R based on an access control strategy and a system public key to generate a ciphertext strategy; and generating trusted data. The trusted data decryption method comprises the following steps: analyzing trusted data to obtain an access control strategy, a ciphertext strategy and ciphertext data; decrypting the ciphertext policy based on the access control policy and the attribute private key of the data user to obtain an element R '; a data encryption key is obtained based on the element R ', and ciphertext data is decrypted to obtain a data plaintext. Trusted data transmission comprises packaging and decryption, and the packaging system is used for generating and distributing trusted data. Efficient and safe sharing of data in the field of digital processing is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, and in particular to a trusted data encapsulation, decryption, and transmission method and system based on attribute cryptography. Background Art

[0002] In recent years, with the rapid development of cloud computing, big data, and mobile office, the demand for data sharing and collaboration has surged, and data security and privacy protection have become key challenges. Traditionally, secure data sharing involves encrypting the data to be shared and then sharing the ciphertext with the recipient. However, distributing the data encryption key is challenging. To address this key distribution challenge, public key systems have been introduced, using the recipient's public key to encrypt the data encryption key. This ensures that only the designated recipient can decrypt the data, ensuring security. However, if data needs to be shared with multiple people simultaneously (such as in group emails), solutions based on traditional public key digital envelopes have significant drawbacks. The data encryption key must be asymmetrically encrypted using the public key of each data user, forming a digital envelope specific to each data user. This poses significant performance and complexity challenges, especially when the number of group email users is large.

[0003] Attribute-Based Encryption (ABE), based on attribute cryptography, is an emerging technology in cryptography. Combining access control policies with keys, it can solve the problem of single-encryption, multi-decryption, effectively addressing group sharing. Therefore, data sharing based on attribute cryptography is a superior technical solution for group data sharing. There are two technical implementations of attribute cryptography: Ciphertext-Policy Attribute-Based Encryption (CP-ABE), where the data owner defines access policies and only users who meet them can decrypt the data; and Key Policy Attribute-Based Encryption (KP-ABE), where the decryptor requires a key that matches the set of attributes specified by the encryptor. Data is associated with attributes.

[0004] In the practical application of attribute-based cryptography, key-based attribute encryption has significant limitations. The inability of encryptors to directly define access policies, complex key management, and high computational and communication overhead limit its scope of application. Policy-based attribute encryption, on the other hand, is a widely used technical solution, primarily for secure data storage within blockchains. It enables any user who meets access control policies to decrypt blockchain data. However, due to the high computational, communication, and storage overhead of policy-based attribute encryption, it is currently only applicable to blockchains with low performance requirements and is not suitable for real-world data sharing. Summary of the Invention

[0005] In view of the above analysis, the present invention aims to disclose a trusted data encapsulation, decryption, and transmission method and system based on attribute cryptography, which encapsulates the data to be shared according to the set trusted data format to form a trusted data sharing file or data stream, ensuring that only the receiving user who meets the access control policy specified by the data encryptor can decrypt it, effectively preventing data leakage during transmission, and realizing efficient and secure data sharing in the field of digital office.

[0006] The present invention provides a trusted data encapsulation method based on attribute cryptography, which specifically includes the following steps: Randomly select an element R on the elliptic curve according to the preset attribute cryptographic security parameters; Generate a data encryption key based on R and encrypt the data to be encrypted to obtain ciphertext data; Based on the access control policy and the system public key, attribute encryption algorithm is used to encrypt R to generate ciphertext strategy; Generate trusted data based on access control policies, ciphertext policies, and ciphertext data.

[0007] Furthermore, the trusted data includes a file type identifier, an access control policy length, a ciphertext policy length, an integrity check code, access control policy tree data, a ciphertext policy, and ciphertext data; Generating trusted data based on the access control policy, the ciphertext policy, and the ciphertext data includes: determining a group key based on the data encryption key; Using the group key as a key, the access control policy, the ciphertext policy, and the ciphertext data as data, a calculation is performed to obtain an integrity check code; Obtain access control policy tree data based on the access control policy; An access control policy length is determined based on the access control policy tree data.

[0008] Furthermore, generating a data encryption key based on R and encrypting the data to be encrypted to obtain ciphertext data includes: Convert the value of element R into byte stream data R with a length of 128 bytes B ; Calculate byte stream data R B The 32-byte summary data, of which the first 16 bytes are the group key Key and the last 16 bytes are the initialization vector IV; The encrypted data is encrypted in groups based on the group key Key and the initialization vector IV to obtain the ciphertext data.

[0009] Furthermore, based on the policy control tree representation of the access control policy to access control policy tree data, the access control policy length is the length of the data after the access control policy tree data is serialized using JSON.

[0010] Furthermore, a Hashtable structure is used to store the ciphertext strategy, and the length of the ciphertext strategy is the length of the string after json serialization of the Hashtable data corresponding to the ciphertext strategy.

[0011] The present invention also provides a trusted data decryption method based on attribute cryptography, which specifically includes the following steps: Parse trusted data to obtain access control policies, ciphertext policies, and ciphertext data; Based on the access control policy and the attribute private key of the data user, the attribute cryptography algorithm is used to decrypt the ciphertext policy to obtain the element R'; The data encryption key is calculated based on the element R' and the ciphertext data is decrypted to obtain the data plaintext.

[0012] Furthermore, the step of calculating the data encryption key based on the element R' and decrypting the ciphertext data to obtain the data plaintext includes: Convert the value of element R' into 128-byte byte stream data R B '; Calculate byte stream data R B The digital summary value of 'is 32 bytes of summary data, of which the first 16 bytes are the group key Key' and the last 16 bytes are the initialization vector IV'; Use the group key Key' to calculate HMAC' on the parsed access control policy, ciphertext policy and ciphertext data, and compare it with the HMAC value to determine whether the data has been tampered with; For untampered data, the ciphertext data is decrypted in groups based on the group key Key' and the initialization vector IV' to obtain the plaintext data.

[0013] Furthermore, the key management center generates the attribute private key of the data user, including: The key management center randomly generates a system key pair, including a system public key and a system private key, based on preset attribute cryptographic security parameters; Based on the user attributes of the data user and the system private key, the corresponding attribute private key is calculated through the two-sex pair mapping algorithm; The key management center sends the attribute private key to the data user through a secure distribution channel or protocol.

[0014] The present invention also provides a trusted data transmission method based on attribute cryptography, which is characterized by including trusted data encapsulation and trusted data decryption; wherein, Generate trusted data using the trusted data encapsulation method; The generated trusted data is decrypted using the trusted data decryption method.

[0015] The present invention also provides a trusted data encapsulation system based on attribute cryptography, comprising: Key management center, used to generate system key pairs, generate and distribute user attribute private keys; The trusted data generation module is used to generate trusted data, including: randomly selecting an element R on the elliptic curve according to preset attribute cryptographic security parameters; generating a data encryption key based on R and encrypting the data to be encrypted to obtain ciphertext data; using the attribute cryptographic algorithm to attribute encrypt R based on the access control policy and the system public key to generate a ciphertext policy; generating trusted data based on the access control policy, the ciphertext policy, and the ciphertext data; The trusted data distribution module is used to distribute the trusted data to data users.

[0016] The present invention can achieve at least one of the following beneficial effects: By generating trusted data that conforms to a predefined trusted data format based on attribute cryptography, the binding relationship between ciphertext policies and ciphertext data is achieved, enabling efficient and secure data sharing in the digital office sector. Compared to the traditional model of separating ciphertext policies from ciphertext data, this model simplifies management complexity. Instead of relying on a centralized ciphertext policy and ciphertext data management system to achieve binding through association mapping, it reduces application complexity and expands application scenarios, particularly meeting the needs of offline applications. Compared to policy-based attribute encryption technology, the separation of data content from policy reduces duplicate encryption overhead and computational complexity, supports dynamic policy adjustment, and improves overall efficiency. Even with a large number of users, the complexity of receiving trusted data is not increased, and efficient encryption, sending, receiving, and decryption of data can still be achieved.

[0017] By encapsulating data items such as access control policy, ciphertext policy, ciphertext data and type identifier, access control policy length, ciphertext policy length and integrity check code involved in attribute password encryption according to format specifications, the data parsing efficiency and accuracy can be improved.

[0018] By setting fixed-length data items in the header of the format in a trusted data format, the type identifier, access control policy length, ciphertext policy length and integrity check code can be quickly assigned through memory copying, and the access control policy, ciphertext policy and ciphertext data offset can be calculated through the length, thereby improving the positioning efficiency of data items and improving the decryption performance.

[0019] An integrity check code is added to the trusted data format based on attribute encryption, and the binding relationship between access control policy, ciphertext policy and ciphertext data is realized through cryptographic technology, preventing attackers from illegally tampering with the included data items and ensuring the binding relationship and integrity of attribute encryption and policy.

[0020] By setting a 16-byte type identifier in the trusted data format, the type identifier can be used to prevent data from being encrypted repeatedly during encryption, and the type identifier can be used to quickly determine the legitimacy of the data to be decrypted during decryption, thereby improving decryption efficiency.

[0021] In the present invention, the above-mentioned technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of the present invention will be described in the following description, and some advantages will become apparent from the description or be learned through practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings are only used for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. Throughout the drawings, the same reference symbols denote the same components. Figure 1 This is a flow chart of the trusted data encapsulation method of the present invention; Figure 2 This is a diagram of the credible data format of the present invention; Figure 3 This is a flow chart of the trusted data decryption method of the present invention; Figure 4 Flowchart of generating attribute private key of data user for the key management center of the present invention. DETAILED DESCRIPTION

[0023] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, and are not used to limit the scope of the present invention.

[0024] Example 1: Trusted Data Encapsulation Method Based on Attribute Cryptography One embodiment of the present invention discloses a trusted data encapsulation method based on attribute cryptography, such as Figure 1As shown, the process specifically includes steps S101 to S104, wherein steps S102 and S103 are not limited in sequence and can be performed simultaneously.

[0025] S101. Randomly select an element R on the elliptic curve according to a preset attribute cryptographic security parameter.

[0026] Specifically, the elliptic curve refers to the elliptic curve in elliptic curve cryptography (ECC). In the attribute-based encryption process, the preset attribute cryptographic security parameters refer to a set of pre-set security-related parameters. Examples include the parameters of the elliptic curve, the generator G of the elliptic curve group, the security level, the seed of the random number generator, etc. The element R is a random point in the elliptic curve group. .

[0027] S102: Generate a data encryption key based on the element R and encrypt the data to be encrypted to obtain ciphertext data. Specifically, it includes: Convert the value of element R into byte stream data R with a length of 128 bytes B ; Calculate byte stream data R B The 32-byte summary data is used as the data encryption key; the first 16 bytes are the group key Key, and the last 16 bytes are the initialization vector IV; specifically, the byte stream data R is calculated using the summary cipher algorithm B The digest data; optionally, the digest password algorithm can be SM3 or SHA256; The encrypted data is encrypted using the block key (Key) and the initialization vector (IV) to produce the ciphertext data. A block cipher algorithm divides data into fixed-size blocks and encrypts each block using the block key. The initialization vector, which is the same as the block size, is a key parameter in block cipher algorithms used to increase randomness and prevent ciphertext pattern leakage.

[0028] S103: Based on the access control policy Policy and the system public key MPK, an attribute cryptography algorithm is used to encrypt R to generate a ciphertext policy Cipher Policy.

[0029] Specifically, an access control policy is a set of rules or logical expressions defined and specified by the data owner (the encryption provider) based on actual business needs and security policies. It specifies which data users can decrypt a ciphertext. It is typically stored with the ciphertext, and during decryption, the system verifies whether the user meets the policy requirements.

[0030] The system public key is the system public key generated according to the attribute cryptographic security parameters when the attribute cryptographic system is initialized; The attribute encryption algorithm refers to the Attribute Based Encryption (ABE) algorithm. This embodiment adopts the Policy-Based Attribute Encryption (CP-ABE) algorithm. Based on the access control policy Policy and the system public key MPK, the attribute encryption algorithm is used to encrypt R attributes to generate a ciphertext policy.

[0031] S104: Generate trusted data based on the access control policy, ciphertext policy, and ciphertext data. Specifically, it includes: Using the group key Key as the key, the access control policy, the ciphertext policy, and the ciphertext data as data, a 32-byte HMAC value is calculated, and the obtained HMAC value is used as the integrity check code; wherein the HMAC algorithm can be SM3 or SHA256; Access control policy tree data is obtained based on the policy control tree representation of the access control policy; Determine the access control policy length based on the access control policy tree data. Specifically, the length of the data after the access control policy tree data is serialized using JSON is the access control policy length. Generate trusted data based on file type identification, access control policy length, ciphertext policy length, integrity check code, access control policy tree data, ciphertext policy and ciphertext data.

[0032] Furthermore, in step S104, trusted data is generated according to the set trusted data format. The trusted data format is a nonlinear structured organizational structure specification for trusted data generated using attribute encryption, which is used to identify the file type of encrypted data (i.e., data format type) and quickly locate the various data items required to decrypt the trusted data. Figure 2 As shown, starting from the low address as the starting address of the trusted data storage, the storage format regulations of each data item in the trusted data are respectively displayed, specifically including P1 to P7.

[0033] P1: 0x0000-0x000F, used to store the file type identifier (data format type identifier), is 16 bytes long and can use a random number as the identifier. Within the same attribute-based trusted data application system, each file type identifier has a unique definition to prevent the same file type from being encrypted repeatedly. This also ensures that the legitimacy of the data can be quickly determined based on the file type identifier during decryption, improving decryption performance.

[0034] P2: 0x0010-0x0013, used to store the access control policy length (represented by policyLen) specified during encryption. Specifically, the access control policy is represented based on the policy control tree, and the access control policy length is the length of the policy control tree after serialization using JSON. Furthermore, the policy length is stored in big-endian format.

[0035] P3: 0x0014-0x0017, used to store the ciphertext policy length (represented by cpLen). Specifically, the ciphertext policy is usually stored in a Hashtable structure. The ciphertext policy length is the string length of the JSON serialized Hashtable data of the ciphertext policy, stored in big-endian mode.

[0036] P4: 0x0018-0x0037, used to store the complete check code, with a length of 32 bytes.

[0037] P5: 0x0038-policyLen+0x0037, used to store the serialized string of access control policy tree data. It is plain text data stored in the form of a byte stream, and its length is the access control policy length policyLen.

[0038] P6: 0x0038 + policyLen - (policyLen + cpLen) + 0x0037, used to store the ciphertext policy. Specifically, the length of the ciphertext policy is related to the number of attributes included in the policy specified during encryption. Each attribute corresponds to the ciphertext value of an element on the elliptic curve. The Hashtable data structure is used for calculation and is also stored after being serialized using JSON.

[0039] P7: 0x0038+(policyLen+cpLen)-…, used to store ciphertext data.

[0040] This embodiment discloses a trusted data encapsulation method based on attribute cryptography, which realizes the binding relationship between ciphertext policy and ciphertext data by generating trusted data that conforms to the set trusted data format based on attribute cryptography technology, and realizes efficient and secure data sharing in the field of digital office. Compared with the traditional ciphertext policy and ciphertext data separation mode, the simplified management complexity is no longer dependent on the centralized ciphertext policy and ciphertext data management system to achieve binding through association mapping, which reduces the difficulty of application and expands the application scenarios, especially meeting the needs of offline applications. Compared with policy-based attribute encryption technology, it separates data content from policy, reduces repeated encryption overhead, reduces the amount of calculation, supports dynamic policy adjustment, and improves overall efficiency.

[0041] This embodiment adds an integrity check code to the trusted data format based on attribute encryption, and implements the binding relationship between access control policy, ciphertext policy and ciphertext data through cryptographic technology, preventing attackers from illegally tampering with the included data items, and ensuring the binding relationship and integrity of attribute encryption and policy.

[0042] The present embodiment discloses a trusted data encapsulation method based on attribute cryptography, which can encapsulate data items such as access control policy, ciphertext policy, ciphertext data and type identifier, access control policy length, ciphertext policy length and integrity check code involved in attribute cryptography encryption according to format specifications, thereby improving data parsing efficiency and accuracy.

[0043] By setting a 16-byte type identifier in the trusted data format, the type identifier can be used to prevent data from being encrypted repeatedly during encryption, and the type identifier can be used to quickly determine the legitimacy of the data to be decrypted during decryption, thereby improving decryption efficiency.

[0044] In a trusted data format, fixed-length data items are set in the header of the format. The type identifier, access control policy length, ciphertext policy length and integrity check code can be quickly assigned through memory copying. The access control policy, ciphertext policy and ciphertext data offset can be calculated through the length, thereby improving the positioning efficiency of data items and thus improving the decryption performance.

[0045] Example 2: Trusted Data Decryption Method Based on Attribute Cryptography Another embodiment of the present invention discloses a trusted data decryption method based on attribute cryptography, which is used to decrypt the trusted data generated by the above embodiment. Figure 3 As shown, it specifically includes steps S201 to S203.

[0046] S201. Parse trusted data to obtain access control policies, ciphertext policies, and ciphertext data.

[0047] Specifically, the data user parses the received trusted data according to the trusted data format set in step S104, and obtains the file type identifier, access control policy length, ciphertext policy length, integrity check code, access control policy tree data, ciphertext policy and ciphertext data.

[0048] Furthermore, the data user determines whether the attribute ciphertext to be decrypted complies with the set trusted data format based on the file type identifier obtained by parsing. If so, the process proceeds to S202 ; otherwise, a type error is returned and the process exits.

[0049] S202 : Based on the access control policy and the attribute private key of the data user, an attribute cryptographic algorithm is used to perform attribute decryption on the ciphertext policy to obtain the element R' of the elliptic curve selected during encryption.

[0050] S203: Calculate the data encryption key based on the element R' and decrypt the ciphertext data to obtain the plaintext data. Specifically including: Convert the value of element R' into 128-byte byte stream data R B '; Calculate byte stream data R B The digital summary value of ' is used to obtain 32 bytes of summary data, which is the data encryption key; the first 16 bytes are the group key Key', and the last 16 bytes are the initialization vector IV'; optionally, the summary cipher algorithm can be SM3 or SHA256; Use the group key Key' to calculate HMAC' on the access control policy, ciphertext policy and ciphertext data obtained by parsing, and compare it with the integrity check code HMAC value obtained by parsing to determine whether the data has been tampered with; For untampered data, the ciphertext data is decrypted in groups based on the group key Key' and the initialization vector IV' to obtain the plaintext data.

[0051] This embodiment discloses a trusted data decryption method based on attribute cryptography. By enabling data users to receive and decrypt trusted data that conforms to a predefined trusted data format, multiple data users can efficiently and securely share data in the digital office environment. Even when sending to a large number of users, the complexity of receiving trusted data is minimized, and data can still be efficiently received and decrypted.

[0052] By parsing trusted data according to the trusted data format, data items such as access control policy, ciphertext policy, ciphertext data and type identifier, access control policy length, ciphertext policy length, and integrity check code involved in attribute cryptographic encryption can be parsed according to format specifications and fixed-length offsets, improving data parsing efficiency and accuracy. The 16-byte type identifier can be used to quickly determine the legitimacy of the data to be decrypted, improving decryption efficiency.

[0053] By calculating the integrity check code based on the parsed data, it is determined whether the data item has been tampered with, effectively ensuring data security and integrity.

[0054] It should be noted that a key management center is required when attribute cryptography is applied. The key management center generates the system public key in step S103 and the attribute private key of the data user in step S202. Figure 4 As shown, it includes S301 to S303.

[0055] S301: The Key Management Center randomly generates a system key pair based on preset attribute cryptographic security parameters, consisting of a system public key and a system private key. The system private key is a secret parameter stored in the attribute cryptographic key management center and serves as the core parameter for calculating and generating user attribute private keys. It is protected using the root key protection scheme of the PKI CA. The system public key is publicly available parameter data, accessible to the owner of data that requires attribute cryptography encryption.

[0056] S302: The key management center generates a corresponding attribute private key based on the user attributes of the data user and the system private key through a two-pair mapping algorithm.

[0057] User attributes of a data user may exemplarily include company, department, position, rank, etc., and are generally sent by the user system to the key management center.

[0058] It should be noted that the user attribute private key is calculated based on the system private key and the user's attributes using a two-way mapping algorithm. If the user's attributes change, the user's attribute private key must be updated. The attribute password introduces random variables during the attribute private key generation process, so the attribute private key generated for the same attribute will be different each time.

[0059] S303: The key management center sends the attribute private key to the data user through a secure distribution channel or protocol.

[0060] Exemplarily, the secure distribution channel is an encrypted channel, such as SSL.

[0061] The attribute private key received by the data user is usually encrypted and stored in the data user client. The attribute private key can be encrypted and stored using the data user's user password.

[0062] Example 3: Trusted Data Transmission Method Based on Attribute Cryptography A specific embodiment of the present invention discloses a trusted data transmission method based on attribute cryptography, including trusted data encapsulation and trusted data decryption; wherein, Generate trusted data using any of the trusted data encapsulation methods described in Example 1; The generated trusted data is decrypted using any of the trusted data decryption methods described in Example 2.

[0063] This embodiment discloses a trusted data transmission method based on attribute cryptography. Through trusted data encapsulation and decryption, it achieves secure and efficient transmission of trusted data. Compared to existing technologies, the other beneficial effects provided by this embodiment are essentially the same as those provided by the trusted data encapsulation and decryption methods based on attribute cryptography, and are not detailed here.

[0064] Example 4 Trusted Data Encapsulation System Based on Attribute Cryptography Another specific embodiment of the present invention discloses a trusted data encapsulation system based on attribute cryptography, comprising: The key management center is used to generate system key pairs and generate and distribute user attribute private keys; the system key pair includes the system public key and the system private key; the generated user attribute private keys are distributed to data users through a secure distribution channel or protocol.

[0065] The trusted data generation module is used to generate trusted data, including: randomly selecting an element R on the elliptic curve according to preset attribute cryptographic security parameters; generating a data encryption key based on R and encrypting the data to be encrypted to obtain ciphertext data; using the attribute cryptographic algorithm to attribute encrypt R based on the access control policy and the system public key to generate a ciphertext policy; generating trusted data based on the access control policy, the ciphertext policy, and the ciphertext data; The trusted data distribution module is used to distribute the trusted data to data users.

[0066] After receiving the trusted data, the data user decrypts the trusted data using a trusted data decryption method based on attribute cryptography.

[0067] This embodiment discloses a trusted data encapsulation system based on attribute cryptography. This system combines attribute encryption with trusted data encapsulation technology to implement fine-grained access control for users. Compared to traditional encryption and data sharing algorithms, it is more flexible and suitable for complex environments with multiple users and multiple permissions. Data remains encrypted during transmission and storage. Even if the data is intercepted, unauthorized users cannot decrypt it. Attribute encryption ensures that only users with the correct attributes can access the data, effectively preventing internal leaks and external attacks.

[0068] By updating access policies (such as adding or removing user attributes) without re-encrypting data, the user's attribute private key is updated whenever a user attribute changes. The attribute private key generation process of the attribute cipher introduces random variables, so even for the same attribute, the generated attribute private key is different each time. This improves the system's flexibility, security, and maintainability.

[0069] Trusted data encapsulation separates data content from access policies. Policy changes eliminate the need to re-encrypt the data, improving system responsiveness and maintenance efficiency. The encapsulation structure supports integrity verification and policy parsing, facilitating system integration and automated processing.

[0070] It should be noted that the above embodiments are based on the same inventive concept, and parts not described repeatedly can be used as reference for each other.

[0071] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with this technical field within the technical scope disclosed by the present invention should be covered by the scope of protection of the present invention.

Claims

1. A trusted data encapsulation method based on attribute cryptography, characterized in that: The steps include: Randomly select an element R on the elliptic curve according to the preset attribute cryptographic security parameters; Generate a data encryption key based on R and encrypt the data to be encrypted to obtain ciphertext data; Based on the access control policy and the system public key, attribute encryption algorithm is used to encrypt R to generate ciphertext strategy; Generate trusted data based on access control policies, ciphertext policies, and ciphertext data.

2. The trusted data encapsulation method based on attribute cryptography according to claim 1, characterized in that: The trusted data includes file type identification, access control policy length, ciphertext policy length, integrity check code, access control policy tree data, ciphertext policy and ciphertext data; Generating trusted data based on the access control policy, the ciphertext policy, and the ciphertext data includes: determining a group key based on the data encryption key; Using the group key as a key, the access control policy, the ciphertext policy, and the ciphertext data as data, a calculation is performed to obtain an integrity check code; Obtain access control policy tree data based on the access control policy; An access control policy length is determined based on the access control policy tree data.

3. The trusted data encapsulation method based on attribute cryptography according to claim 1 or 2, characterized in that: Generating a data encryption key based on R and encrypting the data to be encrypted to obtain ciphertext data includes: Convert the value of element R into byte stream data R with a length of 128 bytes B ; Calculate byte stream data R B The 32-byte summary data, of which the first 16 bytes are the group key Key and the last 16 bytes are the initialization vector IV; The encrypted data is encrypted in groups based on the group key Key and the initialization vector IV to obtain the ciphertext data.

4. The trusted data encapsulation method based on attribute cryptography according to claim 2, characterized in that: The access control policy is represented as access control policy tree data based on the policy control tree, and the access control policy length is the length of the data after the access control policy tree data is serialized using JSON.

5. The trusted data encapsulation method based on attribute cryptography according to claim 2, characterized in that: The ciphertext strategy is stored in a Hashtable structure, and the length of the ciphertext strategy is the length of the string after the Hashtable data corresponding to the ciphertext strategy is serialized in json.

6. A trusted data decryption method based on attribute cryptography, characterized in that: The steps include: Parse trusted data to obtain access control policies, ciphertext policies, and ciphertext data; Based on the access control policy and the attribute private key of the data user, the attribute cryptography algorithm is used to decrypt the ciphertext policy to obtain the element R'; The data encryption key is calculated based on the element R' and the ciphertext data is decrypted to obtain the data plaintext.

7. The trusted data decryption method based on attribute cryptography according to claim 6, characterized in that: The step of calculating the data encryption key based on the element R' and decrypting the ciphertext data to obtain the data plaintext includes: Convert the value of element R' into 128-byte byte stream data R B '; Calculate byte stream data R B The digital summary value of 'is 32 bytes of summary data, of which the first 16 bytes are the group key Key' and the last 16 bytes are the initialization vector IV'; Use the group key Key' to calculate HMAC' on the parsed access control policy, ciphertext policy and ciphertext data, and compare it with the HMAC value to determine whether the data has been tampered with; For untampered data, the ciphertext data is decrypted in groups based on the group key Key' and the initialization vector IV' to obtain the plaintext data.

8. The trusted data decryption method based on attribute cryptography according to claim 7, characterized in that: The key management center generates the attribute private key of the data user, including: The key management center randomly generates a system key pair, including a system public key and a system private key, based on preset attribute cryptographic security parameters; Based on the user attributes of the data user and the system private key, the corresponding attribute private key is calculated through the two-sex pair mapping algorithm; The key management center sends the attribute private key to the data user through a secure distribution channel or protocol.

9. A trusted data transmission method based on attribute cryptography, characterized in that: Including trusted data encapsulation and trusted data decryption; among them, Generate trusted data using the trusted data encapsulation method according to any one of claims 1 to 5; The trusted data generated by decrypting the trusted data is decrypted using the trusted data decryption method according to any one of claims 6 to 8.

10. A trusted data encapsulation system based on attribute cryptography, characterized in that: include: Key management center, used to generate system key pairs, generate and distribute user attribute private keys; The trusted data generation module is used to generate trusted data, including: randomly selecting an element R on the elliptic curve according to preset attribute cryptographic security parameters; generating a data encryption key based on R and encrypting the data to be encrypted to obtain ciphertext data; using the attribute cryptographic algorithm to attribute encrypt R based on the access control policy and the system public key to generate a ciphertext policy; generating trusted data based on the access control policy, the ciphertext policy, and the ciphertext data; The trusted data distribution module is used to distribute the trusted data to data users.

Citation Information

Patent Citations

  • Encryption system based on attribute sets and relational predicates and access control method

    CN105635135A

  • Lightweight access method and system based on block chain

    CN113434875A

  • Attribute-based access control encryption and decryption method and system

    CN116545712A

  • CP-ABE-based weight attribute encryption system

    CN118282768A

  • Access control method based on ciphertext policy attribute-based encryption on block chain

    CN119094219A

Cited By

  • Data access control method and system based on zero trust

    CN121396571A