[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN116668072A - Data security sharing method and system based on multi-authority attribute base encryption - Google Patents

Data security sharing method and system based on multi-authority attribute base encryption Download PDF

Info

Publication number
CN116668072A
CN116668072A CN202310434329.8A CN202310434329A CN116668072A CN 116668072 A CN116668072 A CN 116668072A CN 202310434329 A CN202310434329 A CN 202310434329A CN 116668072 A CN116668072 A CN 116668072A
Authority
CN
China
Prior art keywords
data
key
attribute
ciphertext
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310434329.8A
Other languages
Chinese (zh)
Inventor
王可欣
庞春晖
王超男
卢清华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Yitong College
Original Assignee
Chongqing Yitong College
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Yitong College filed Critical Chongqing Yitong College
Priority to CN202310434329.8A priority Critical patent/CN116668072A/en
Publication of CN116668072A publication Critical patent/CN116668072A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0435Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves
    • H04L9/3073Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves involving pairings, e.g. identity based encryption [IBE], bilinear mappings or bilinear pairings, e.g. Weil or Tate pairing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Algebra (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Power Engineering (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a data security sharing method and system based on multi-authority attribute base encryption, which comprises the following steps: taking the security parameter lambda as input to generate a public parameter PP and calculate a first public key PK 1 First private key SK 1 : encrypting the original data m by using a symmetric encryption algorithm to obtain m'; then encrypting M' through an access structure (M, ρ, Z) to obtain a password text C; storing the cipher text C in IPFS and storing the resulting secretWen Haxi value QmHash and symmetric decryption Key 1 Stored into the blockchain: checking the identity validity of the data user, and then according to the attribute set A of the data user u Running a key generation algorithm to generate a second private key SK for a data user 2 : the data user obtains a ciphertext hash value QmHash and a symmetric decryption Key Key 1 Downloading ciphertext C in IPFS; the system checks whether the attribute of the data user meets the access structure of the data, if so, decrypts the ciphertext to obtain m', and then passes through the decryption Key Key 1 Decrypting m' again to obtain the original data m.

Description

Data security sharing method and system based on multi-authority attribute base encryption
Technical Field
The invention relates to the technical field of blockchains, in particular to a data security sharing method based on multi-authority attribute-based encryption.
Background
Attribute-based encryption is a new public key encryption technique, the principle being to relate the identity of a user to a range of attributes. The user's private key or password text is defined according to the set of attributes or the access structure, and the user can decrypt the encrypted information only when the set of attributes of the user and the defined access structure match. The encryption mode can ensure confidentiality of data stored in the cloud server and realize non-interactive access control. In order to solve the problem of data privacy in the sharing process, domestic and foreign scholars combine the attribute-based encryption technology with the blockchain technology to realize safe sharing of data.
1. When private data is stored in a cloud server, once the cloud server is attacked or acquired by an unauthorized user during sharing, the data may be compromised, and thus it is necessary to ensure that the data stored in the cloud server is not acquired by the unauthorized user or that the unauthorized user cannot decrypt the encrypted data.
2. With the increase of the amount of stored data, the storage bottleneck of the blockchain limits the development of applications, and how to reduce the storage overhead of the blockchain while ensuring the secure sharing of data is also a technical problem to be solved.
CN112637278A, a data sharing method, system and computer readable storage medium based on blockchain and attribute-based encryption, the method comprising: registration, authentication, encryption, decryption and document data verification; the invention carries out identity authentication on each participant of cross-border trade, carries out ownership verification, authenticity verification and privacy protection on trade documents, ensures the safety of the cross-border trade documents, uses IPFS/Cloud to store attribute-based encryption parameters, runs an attribute encryption process, reduces the storage capacity and the height of blockchain nodes, and improves the running efficiency of algorithms.
This patent suffers from the following disadvantages: the security problem in the authentication process is not described in the patent how to prevent identity forging and leakage of authentication information in the authentication process, and the invention performs identity verification through the intelligent contract, so that a third party organization is removed, and the risks of forging the identity and leakage of the authentication information by the third party organization are avoided; the method and the system have the advantages that the password text is stored by using the IPFS, and the block chain only stores the hash value and the symmetric encryption key of the password text in the IPFS, so that the storage pressure of the block chain is greatly relieved, and the problem of large-scale data sharing can be better solved.
Disclosure of Invention
The present invention is directed to solving the above problems of the prior art. A data security sharing method and system based on multi-authority attribute base encryption are provided. The technical scheme of the invention is as follows:
a data security sharing method based on multi-authority attribute-based encryption comprises the following steps:
s1, taking a security parameter lambda as input, generating a public parameter PP, and calculating a first public key PK 1 First private key SK 1
S2, encrypting the original data m by utilizing a symmetric encryption algorithm to obtain m The method comprises the steps of carrying out a first treatment on the surface of the Then encrypting M by accessing the structure (M, ρ, Z) Obtaining a password text C; storing the password text C into the IPFS, and obtaining a ciphertext hash value QmHash and a symmetric decryption Key Key 1 Stored into the blockchain:
s3, checking the identity legitimacy of the data user by the intelligent contract, and then according to the attribute set A of the data user u Running keyGenerating algorithm for generating second private key SK for data user 2
S4, the data user acquires a ciphertext hash value QmHash and a symmetric decryption Key Key 1 Downloading ciphertext C in IPFS; the system checks whether the attribute of the data user meets the access structure of the data, and if so, decrypts the ciphertext to obtain m Then by decrypting the Key Key 1 For m The original data m is decrypted again.
Further, in the step S1, a public parameter PP is generated by taking the security parameter lambda as input, and a first public key PK is calculated 1 First private key SK 1 The method specifically comprises the following steps:
inputting a security parameter lambda, selecting a multiplication loop group G, G with two prime numbers p T
Defining bilinear map e: G T
Generating the common parameters pp= (e, p, G, h, G) T ) Wherein G and h are generator of G;
assuming that there are n attribute names in total, then n= (a) 1 ,a 2 ,a 3 ,…,a n );
Wherein a is i Representing attribute names, each attribute name a i Has n i The value of the individual attribute(s),representing attribute name a i N of (2) i A plurality of attribute values;
then
Attribute authorization contract random selectionr i Representing randomly selected parameters, ++>Representing attribute name t i N of (2) i Attribute values, Z p The first public key PK is calculated by representing the finite field with the number p 1 And a first private key SK 1
Wherein the method comprises the steps of
Further, in the step S2, the original data m is encrypted by using a symmetric encryption algorithm to obtain m Tool for cleaning and cleaning
The body comprises:
symmetric encryption Key Key generation by AES symmetric encryption algorithm 1
Using symmetric encryption keys Key 1 Encrypting the original data m to obtain m ,m =En(Key 1 ,m)。
Further, said method then encrypts M by means of an access structure (M, ρ, Z) Obtaining a password text C, which specifically comprises the following steps:
the data owner sets an access structure (M, ρ, Z) for the data; where M is a matrix of l n, ρ is a mapping function that maps each row M i Mapping to an attribute name a i Z represents the attribute values designed and hidden in the access policy;
data owner randomly selects s e Z p Sum vector v= (s, v) 2 ,v 3 ,…,v n ),s、v n Are all finite fields Z p For each row of matrix M, a is calculated i =M i ·ν;
Randomly select q 1 ,q 2 ,…,q l ∈Z p Calculated outC 1 =g s ,/>
C 0 、C 1 Respectively representing cipher text elements, C 2,i Representing the ith cipher text element, Z ρ(i) Indicating that the receiving parameter Z is set in the access policy ρ(i) And ρ (i), generating a string value, h representing the hash function, generating a hash value, q i Representing finite field Z p The ith random parameter in (a) to generate a cipher text C= { C 0 ,C 1 ,C 2,i ,C 3,i },i∈(1,2,…,l)。
Further, the cipher text C is stored in the IPFS, and the obtained cipher text hash value QmHash and the symmetric decryption Key Key 1 The storage in the blockchain specifically comprises:
the attribute authorization contract checks the identity legitimacy of the sender and confirms whether the sender has storage permission or not;
after passing, generating a hash value QmHash comprising ciphertext and a symmetric decryption Key Key 1 The ciphertext information updating transaction of (1) is sent to the blockchain network for the blockchain node to execute through an attribute authorization contract, and the ciphertext hash value QmHash and the symmetric decryption Key Key are obtained 1 Recorded on the blockchain for each user terminal participating in data sharing.
Further, the intelligent contract in step S3 checks the identity validity of the data user, and then based on the attribute set A of the data user u Running a key generation algorithm to generate a second private key SK for a data user 2 The method specifically comprises the following steps:
the data user initiates a private key generation request to the attribute authorization contract;
the attribute authorization contract checks the identity legitimacy of the data user;
by executing the key generation algorithm and generating a second private key for the data user
Generating a second private key SK 2 The user private key updating transaction of the block chain node is sent to the block chain network for the block chain node to execute through the attribute authorization contract, and the second private key SK is obtained 2 Record onto a blockchain forEach user end participating in data sharing;
the second private key SK is then transmitted via a secure transmission channel 2 To the data user.
Further, the performing a key generation algorithm after passing specifically includes:
determining the length of the AES key, and defaulting to 128 bits if the length is not specified;
acquiring random data from an operating system as a seed of a secret key;
inputting the seeds into a pseudo-random number generator, and generating a random number sequence by using an AES algorithm;
cutting the random number sequence into blocks with a certain length, and if the key length is insufficient, splicing the blocks until the required key length is met;
further, the step S4 is that the data user obtains the ciphertext hash value QmHash and the symmetric decryption Key 1 Downloading ciphertext C in IPFS; the system checks whether the attribute of the data user meets the access structure of the data, and if so, the ciphertext can be decrypted to obtain m Then by decrypting the Key Key 1 For m Decrypting again to obtain the original data m, which specifically comprises:
the data user initiates a data use request to the attribute authorization contract; the attribute authorization contract checks the identity legitimacy of the data user; after the data is passed, the ciphertext hash value QmHash and the symmetric decryption Key Key of the corresponding data are obtained 1 Sending the data to a data user;
after receiving the data, the data user downloads a ciphertext C in the IPFS according to the ciphertext hash value QmHash;
system checking data user's attributes A u Whether the access structure (M, p, Z) of the data is satisfied;
calculation ofDecrypting the ciphertext C by using the calculated E1, E2, E3 to obtain +.>Wherein->E 1,i 、E 2,i 、E 3,i Respectively representing intermediate values obtained through bilinear mapping;
using decryption keys Key 1 Again to m Decrypting;
finally, the original data m=de (Key) 1 ,m ) The method comprises the steps of carrying out a first treatment on the surface of the De represents a decryption function;
a data security sharing system based on multi-rights attribute-based encryption, comprising:
an initialization module: for generating a public parameter PP with a security parameter lambda as input and calculating a first public key PK 1 First private key SK 1
The password text generation module: encrypting the original data m by using a symmetric encryption algorithm to obtain m The method comprises the steps of carrying out a first treatment on the surface of the Then encrypting M by accessing the structure (M, ρ, Z) Obtaining a password text C; storing the password text C into the IPFS, and obtaining a ciphertext hash value QmHash and a symmetric decryption Key Key 1 Stored into the blockchain:
a private key generation module: the intelligent contract checks the identity legitimacy of the data user and then based on the attribute set A of the data user u Running a key generation algorithm to generate a second private key SK for a data user 2
Decryption module: the data user obtains a ciphertext hash value QmHash and a symmetric decryption Key Key 1 Downloading ciphertext C in IPFS; the system checks whether the attribute of the data user meets the access structure of the data, and if so, decrypts the ciphertext to obtain m Then by decrypting the Key Key 1 For m The original data m is decrypted again.
The invention has the advantages and beneficial effects as follows:
1. the invention generates the private key for the user through the intelligent contract technology, cancels the central mechanism, avoids the risk of falsifying the user identity by a third-party attribute authorization center and illegally acquiring the private data, enhances the safety and reduces the communication cost and the calculation cost.
2. The IPFS is utilized to store the password text, and the blockchain only stores the hash value and the symmetric encryption key of the password text in the IPFS, so that the storage pressure of the blockchain is relieved, and fine-granularity data sharing control is realized.
3. And under the control of secure sharing, after an unauthorized user acquires the hash value of the password text in the IPFS and downloads the password text, the password text cannot be decrypted, so that the private data is prevented from being revealed to any unauthorized third party, and the private data is effectively protected.
Drawings
Fig. 1 is a system model diagram of a data security sharing method based on multi-rights attribute-based encryption according to a preferred embodiment of the present invention.
Fig. 2 is a flowchart of a data security sharing method based on multi-authority attribute-based encryption according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and specifically described below with reference to the drawings in the embodiments of the present invention. The described embodiments are only a few embodiments of the present invention.
The technical scheme for solving the technical problems is as follows:
as shown in fig. 1-2, a data security sharing method based on multi-authority attribute-based encryption includes the following steps:
s1, taking a security parameter lambda as input, generating a public parameter PP, and calculating a first public key PK 1 First private key SK 1
Inputting a security parameter lambda, selecting a multiplication loop group G, G with two prime numbers p T
Defining bilinear map e: G T
Generating the common parameters pp= (e, p, G, h, G) T ) Wherein G and h are generator of G;
assuming that there are n attribute names in total, then n= (a) 1 ,a 2 ,a 3 ,…,a n );
Wherein a is i Representing attribute names, each attribute name a i Has n i The value of the individual attribute(s),representing attribute name a i N of (2) i A plurality of attribute values;
thenAttribute entitlement contracts randomly select->Calculating a first public key PK 1 And a first private key SK 1
Wherein the method comprises the steps ofS2, encrypting the original data m by using a symmetric encryption algorithm to obtain m The method comprises the steps of carrying out a first treatment on the surface of the Then encrypting M by accessing the structure (M, ρ, Z) Obtaining a password text C; storing the password text C into the IPFS, and obtaining a ciphertext hash value QmHash and a symmetric decryption Key Key 1 Stored into the blockchain:
symmetric encryption Key Key generation by AES symmetric encryption algorithm 1
Using symmetric encryption keys Key 1 Encrypting the original data m to obtain m ,m =En(Key 1 ,m);
The data owner sets an access structure (M, ρ, Z) for the data;
where M is a matrix of l n, ρ is a mapping function that maps each row M i Mapping to an attribute name a i Z represents the attribute values designed and hidden in the access policy;
data owner randomly selects s e Z p Sum vector v= (s, v 2 ,v 3 ,…,v n ) For each row of matrix M, lambda is calculated i =M i ·v;
Random selectionTaking q 1 ,q 2 ,…,q l ∈Z p Calculated outC 1 =g s ,/>
Generating a cipher text c= { C 0 ,C 1 ,C 2,i ,C 3,i },i∈(1,2,…,l);
Uploading the password text C to the IPFS, and obtaining a ciphertext hash value QmHash and a symmetric decryption Key Key 1 Sending to an attribute authorization contract;
the attribute authorization contract checks the identity legitimacy of the sender and confirms whether the sender has storage permission or not;
after passing, generating a hash value QmHash comprising ciphertext and a symmetric decryption Key Key 1 The ciphertext information updating transaction of (1) is sent to the blockchain network for the blockchain node to execute through an attribute authorization contract, and the ciphertext hash value QmHash and the symmetric decryption Key Key are obtained 1 Recording on a block chain for each user end participating in data sharing; s3, checking the identity legitimacy of the data user by the intelligent contract, and then according to the attribute set A of the data user u Running a key generation algorithm to generate a second private key SK for a data user 2
The data user initiates a private key generation request to the attribute authorization contract;
the attribute authorization contract checks the identity legitimacy of the data user;
by executing the key generation algorithm and generating a second private key for the data user
Generating a second private key SK 2 The user private key update transaction of (c) is sent to the blockchain network,for the blockchain node to execute through the attribute authorization contract, the second private key SK 2 Recording on a block chain for each user end participating in data sharing;
the second private key SK is then transmitted via a secure transmission channel 2 Sending the data to a data user;
s4, the data user acquires a ciphertext hash value QmHash and a symmetric decryption Key Key 1 Downloading ciphertext C in IPFS; the system checks whether the attribute of the data user meets the access structure of the data, and if so, the ciphertext can be decrypted to obtain m Then by decrypting the Key Key 1 For m Decrypting again to obtain the original data m:
the data user initiates a data use request to the attribute authorization contract;
the attribute authorization contract checks the identity legitimacy of the data user;
after the data is passed, the ciphertext hash value QmHash and the symmetric decryption Key Key of the corresponding data are obtained 1 Sending the data to a data user;
after receiving the data, the data user downloads a ciphertext C in the IPFS according to the ciphertext hash value QmHash;
system checking data user's attributes A u Whether the access structure (M, p, Z) of the data is satisfied;
calculation ofDecrypting the ciphertext C by using the calculated E1, E2, E3 to obtain +.>Wherein->
Using decryption keys Key 1 Decrypting m' again;
finally, the original data m=de (Key) 1 ,m′);
It should be noted that a blockchain is a chained data structure that is formed by sequentially concatenating data blocks in time order, and cryptographically ensures that the data blocks are not tamperable and counterfeitable. Each block in the blockchain is linked to the immediately preceding block in the blockchain by including a cryptographic hash of the preceding block. Each chunk also includes a timestamp, a cryptographic hash of the chunk, and one or more transactions. The transaction that has been validated by a node of the blockchain network is hashed and forms a Merkle tree. In the Merkle tree, data at leaf nodes is hashed and for each branch of the Merkle tree, all hash values of that branch are concatenated at the root of that branch. The above process is performed for the Merkle tree up to the root node of the entire Merkle tree. The root node of the Merkle tree stores hash values representing all the data in the Merkle tree. When a hash value claims to be a transaction stored in the Merkle tree, a quick verification may be performed by determining whether the hash value is consistent with the Merkle tree structure.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The above examples should be understood as illustrative only and not limiting the scope of the invention. Various changes and modifications to the present invention may be made by one skilled in the art after reading the teachings herein, and such equivalent changes and modifications are intended to fall within the scope of the invention as defined in the appended claims.

Claims (9)

1. The data security sharing method based on the multi-authority attribute-based encryption is characterized by comprising the following steps of:
s1, taking a security parameter lambda as input, generating a public parameter PP, and calculating a first public key PK 1 First private key SK 1
S2, encrypting the original data m by utilizing a symmetric encryption algorithm to obtain m The method comprises the steps of carrying out a first treatment on the surface of the Then encrypting M by accessing the structure (M, ρ, Z) Obtaining a password text C; storing the password text C into the IPFS, and obtaining a ciphertext hash value QmHash and a symmetric decryption Key Key 1 Stored into the blockchain:
s3, checking the identity legitimacy of the data user by the intelligent contract, and then according to the attribute set A of the data user u Running a key generation algorithm to generate a second private key SK for a data user 2
S4, the data user acquires a ciphertext hash value QmHash and a symmetric decryption Key Key 1 Downloading ciphertext C in IPFS; the system checks whether the attribute of the data user meets the access structure of the data, and if so, decrypts the ciphertext to obtain m Then by decrypting the Key Key 1 For m The original data m is decrypted again.
2. The method for securely sharing data based on multi-rights attribute-based encryption as claimed in claim 1, wherein said step S1 takes a security parameter λ as input, generates a public parameter PP, and calculates a first public key PK 1 First private key SK 1 The method specifically comprises the following steps:
inputting a security parameter lambda, selecting a multiplication loop group G, G with two prime numbers p T
Defining bilinear map e: G T
Generating the common parameters pp= (e, p, G, h, G) T ) Wherein G and h are generator of G;
assuming that there are n attribute names in total, then n= (a) 1 ,a 2 ,a 3 ,…,a n );
Wherein a is i Representing attribute names, each attribute name a i Has n i The value of the individual attribute(s),representing attribute name a i N of (2) i A plurality of attribute values;
then
Attribute authorization contract random selectionr i Representing randomly selected parameters, ++>Representing attribute name t i N of (2) i Attribute values, Z p The first public key PK is calculated by representing the finite field with the number p 1 And a first private key SK 1
Wherein the method comprises the steps of
3. The secure data sharing method based on multi-authority attribute-based encryption according to claim 2, wherein the step S2 encrypts the original data m by using a symmetric encryption algorithm to obtain m The method specifically comprises the following steps:
symmetric encryption Key Key generation by AES symmetric encryption algorithm 1
Using symmetric encryption keys Key 1 The original data m is encrypted to obtain m ', m' =en (Key 1 ,m)。
4. A method for secure sharing of data based on multi-rights attribute-based encryption according to claim 3, characterized in that said encrypting M' then by means of an access structure (M, ρ, Z) results in a ciphertext C, comprising in particular:
the data owner sets an access structure (M, ρ, Z) for the data; where M is a matrix of l n, ρ is a mapping function that maps each row M i Mapping to an attribute name a i Z represents the attribute values designed and hidden in the access policy;
data owner randomly selects s e Z p Sum vector v= (s, v 2 ,v 3 ,…,v n ),s、v n Are all finite fields Z p For each row of matrix M, a is calculated i =M i V; randomly select q 1 ,q 2 ,…,q l ∈Z p Calculated outC 1 =g s ,/> C 0 、C 1 Respectively representing cipher text elements, C 2,i Representing the ith cipher text element, Z ρ(i) Representing the ith attribute value, which is designed in the access policy,>representing the reception parameter Z ρ(i) And ρ (i), generating a string value, h representing the hash function, generating a hash value, q i Representing finite field Z p The ith random parameter in (a) to generate a cipher text C= { C 0 ,C 1 ,C 2,i ,C 3,i },i∈(1,2,…,l)。
5. The data security sharing method based on multi-authority attribute-based encryption according to claim 4, wherein the cipher text C is stored in IPFS, and the obtained cipher text hash value QmHash and pair are stored in IPFSCalled decryption Key Key 1 The storage in the blockchain specifically comprises:
the attribute authorization contract checks the identity legitimacy of the sender and confirms whether the sender has storage permission or not; after passing, generating a hash value QmHash comprising ciphertext and a symmetric decryption Key Key 1 The ciphertext information updating transaction of (1) is sent to the blockchain network for the blockchain node to execute through an attribute authorization contract, and the ciphertext hash value QmHash and the symmetric decryption Key Key are obtained 1 Recorded on the blockchain for each user terminal participating in data sharing.
6. The method for securely sharing data based on multi-rights attribute-based encryption as claimed in claim 5, wherein said step S3 intelligent contract checks the identity validity of the data user and then based on the attribute set a of the data user u Running a key generation algorithm to generate a second private key SK for a data user 2 The method specifically comprises the following steps:
the data user initiates a private key generation request to the attribute authorization contract;
the attribute authorization contract checks the identity legitimacy of the data user;
by executing the key generation algorithm and generating a second private key for the data user
Generating a second private key SK 2 The user private key updating transaction of the block chain node is sent to the block chain network for the block chain node to execute through the attribute authorization contract, and the second private key SK is obtained 2 Recording on a block chain for each user end participating in data sharing;
the second private key SK is then transmitted via a secure transmission channel 2 To the data user.
7. The data security sharing method based on multi-authority attribute-based encryption according to claim 6, wherein the performing a key generation algorithm after passing specifically comprises:
determining the length of the AES key, and defaulting to 128 bits if the length is not specified;
acquiring random data from an operating system as a seed of a secret key;
inputting the seeds into a pseudo-random number generator, and generating a random number sequence by using an AES algorithm;
the random number sequence is cut into blocks of a certain length, and if the key length is insufficient, the blocks are spliced together until the required key length is met.
8. The method for securely sharing data based on multi-rights attribute-based encryption as claimed in claim 6, wherein the step S4 data user obtains a ciphertext hash value QmHash and a symmetric decryption Key 1 Downloading ciphertext C in IPFS; the system checks whether the attribute of the data user meets the access structure of the data, and if so, the ciphertext can be decrypted to obtain m Then by decrypting the Key Key 1 For m Decrypting again to obtain the original data m, which specifically comprises:
the data user initiates a data use request to the attribute authorization contract; the attribute authorization contract checks the identity legitimacy of the data user; after the data is passed, the ciphertext hash value QmHash and the symmetric decryption Key Key of the corresponding data are obtained 1 Sending the data to a data user;
after receiving the data, the data user downloads a ciphertext C in the IPFS according to the ciphertext hash value QmHash;
system checking data user's attributes A u Whether the access structure (M, p, Z) of the data is satisfied;
calculation ofDecrypting the ciphertext C by using the calculated E1, E2, E3 to obtain +.>Wherein->E 1,i 、E 2,i 、E 3,i Respectively representing intermediate values obtained through bilinear mapping; using decryption keys Key 1 Again to m Decrypting;
finally, the original data m=de (Key) 1 ,m ) The method comprises the steps of carrying out a first treatment on the surface of the De represents a decryption function.
9. A data security sharing system based on multi-rights attribute-based encryption, comprising:
an initialization module: for generating a public parameter PP with a security parameter lambda as input and calculating a first public key PK 1 First private key SK 1
The password text generation module: encrypting the original data m by using a symmetric encryption algorithm to obtain m The method comprises the steps of carrying out a first treatment on the surface of the Then encrypting M by accessing the structure (M, ρ, Z) Obtaining a password text C; storing the password text C into the IPFS, and obtaining a ciphertext hash value QmHash and a symmetric decryption Key Key 1 Stored into the blockchain:
a private key generation module: the intelligent contract checks the identity legitimacy of the data user and then based on the attribute set A of the data user u Running a key generation algorithm to generate a second private key SK for a data user 2
Decryption module: the data user obtains a ciphertext hash value QmHash and a symmetric decryption Key Key 1 Downloading ciphertext C in IPFS; the system checks whether the attribute of the data user meets the access structure of the data, and if so, decrypts the ciphertext to obtain m Then by decrypting the Key Key 1 For m The original data m is decrypted again.
CN202310434329.8A 2023-04-21 2023-04-21 Data security sharing method and system based on multi-authority attribute base encryption Pending CN116668072A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310434329.8A CN116668072A (en) 2023-04-21 2023-04-21 Data security sharing method and system based on multi-authority attribute base encryption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310434329.8A CN116668072A (en) 2023-04-21 2023-04-21 Data security sharing method and system based on multi-authority attribute base encryption

Publications (1)

Publication Number Publication Date
CN116668072A true CN116668072A (en) 2023-08-29

Family

ID=87726917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310434329.8A Pending CN116668072A (en) 2023-04-21 2023-04-21 Data security sharing method and system based on multi-authority attribute base encryption

Country Status (1)

Country Link
CN (1) CN116668072A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116992494A (en) * 2023-09-27 2023-11-03 四川启明芯智能科技有限公司 Security protection method, equipment and medium for scenic spot data circulation
CN117195309A (en) * 2023-11-08 2023-12-08 中孚安全技术有限公司 Method, system, equipment and medium for safely sharing data based on block chain
CN117874812A (en) * 2024-01-05 2024-04-12 上海零数众合信息科技有限公司 Method and system for realizing private data multiparty safe transaction based on blockchain
CN118413315A (en) * 2024-07-04 2024-07-30 确信信息股份有限公司 Attribute-based encryption method and system without constraint condition

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116992494A (en) * 2023-09-27 2023-11-03 四川启明芯智能科技有限公司 Security protection method, equipment and medium for scenic spot data circulation
CN116992494B (en) * 2023-09-27 2023-12-08 四川启明芯智能科技有限公司 Security protection method, equipment and medium for scenic spot data circulation
CN117195309A (en) * 2023-11-08 2023-12-08 中孚安全技术有限公司 Method, system, equipment and medium for safely sharing data based on block chain
CN117874812A (en) * 2024-01-05 2024-04-12 上海零数众合信息科技有限公司 Method and system for realizing private data multiparty safe transaction based on blockchain
CN118413315A (en) * 2024-07-04 2024-07-30 确信信息股份有限公司 Attribute-based encryption method and system without constraint condition

Similar Documents

Publication Publication Date Title
CN112019591B (en) Cloud data sharing method based on block chain
US20240283637A1 (en) Secure multiparty loss resistant storage and transfer of cryptographic keys for blockchain based systems in conjunction with a wallet management system
KR101999188B1 (en) Secure personal devices using elliptic curve cryptography for secret sharing
CN106534092B (en) The privacy data encryption method of key is depended on based on message
JP6515246B2 (en) Determination of common secrets for the secure exchange of information and hierarchical and deterministic encryption keys
KR102025409B1 (en) Data access management system based on blockchain and method thereof
US6834112B1 (en) Secure distribution of private keys to multiple clients
US20140006806A1 (en) Effective data protection for mobile devices
CN108768951B (en) Data encryption and retrieval method for protecting file privacy in cloud environment
CN113918981B (en) Attribute-based encryption method and system
CN116668072A (en) Data security sharing method and system based on multi-authority attribute base encryption
US20040165728A1 (en) Limiting service provision to group members
GB2401012A (en) Identifier-based encryption
CN113225302B (en) Data sharing system and method based on proxy re-encryption
TW201630378A (en) Key splitting
CN115336224A (en) Adaptive attack-resistant distributed symmetric encryption
CN109347923A (en) Anti- quantum calculation cloud storage method and system based on unsymmetrical key pond
CN116232639A (en) Data transmission method, device, computer equipment and storage medium
Suveetha et al. Ensuring confidentiality of cloud data using homomorphic encryption
US11917056B1 (en) System and method of securing a server using elliptic curve cryptography
CN118213031A (en) Medical data sharing privacy protection system, method, equipment and medium
CN115396099A (en) Trusted trusting method and system, and obtaining method and system for asymmetric key
US10439810B2 (en) Device and method for administering a digital escrow server
JP7541761B2 (en) Method and system for conducting cryptocurrency asset transactions
Neela et al. A Hybrid Cryptography Technique with Blockchain for Data Integrity and Confidentiality in Cloud Computing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination