CN114936380A - Block chain private data sharing method and system based on chameleon hash - Google Patents

Block chain private data sharing method and system based on chameleon hash Download PDF

Info

Publication number
CN114936380A
CN114936380A CN202210506984.5A CN202210506984A CN114936380A CN 114936380 A CN114936380 A CN 114936380A CN 202210506984 A CN202210506984 A CN 202210506984A CN 114936380 A CN114936380 A CN 114936380A
Authority
CN
China
Prior art keywords
user
key
private data
chameleon hash
hash
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
CN202210506984.5A
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.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud Information Technology Co Ltd
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 Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN202210506984.5A priority Critical patent/CN114936380A/en
Publication of CN114936380A publication Critical patent/CN114936380A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Medical Informatics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a chameleon hash-based block chain private data sharing method and system, belonging to the technical field of block chains, data encryption and key agreement, and aiming at solving the technical problem of privacy protection and sharing of transaction data on the block chains, and the technical scheme is as follows: building a block chain network: deploying a blockchain network based on the blockchain framework; registering a block chain identity by a user, generating a public key and a private key of the user, and recording the public key and the private key as P and S respectively; a user generates a chameleon Hash public key pk and a private key sk by using a chameleon Hash key generation algorithm, and a safety constant lambda freely selects a generation mode; the private key sk is the chameleon hash trapdoor; establishing external storage; user a stores private data D 1 Selecting a random number K to generate chameleon Hash which is used as an encryption key; user a stores private data D 1 To the block chain, the private data is encrypted by using h as a symmetric encryption key to obtain a result ED 1 A write chain; user b ShenPlease access the private data ED 1 And obtaining the privacy data D.

Description

Block chain private data sharing method and system based on chameleon hash
Technical Field
The invention relates to the technical field of a block chain, data encryption and key agreement, in particular to a block chain private data sharing method and system based on chameleon hash.
Background
In public chains such as bitcoin and ether house, user transaction data is not encrypted, and privacy is protected only by account anonymity. In the permit chain that uses super account book Fabric as the representative, can establish a plurality of passageways, every passageway has an independent account book, and only member in the passageway can see the account book data of this passageway, realizes the data interval between the different passageways, can keep the privacy nature between the different passageway members according to this. But the privacy control granularity of the channel technology is larger, and all transaction data can be seen among channel members. Fabric started to support private data from version 1.2 later. The private data can be used for carrying out finer-grained privacy range control in the channel, the transaction data can be authorized to be visible to some channel members, and unauthorized channel members can only see the transaction hash value. Aiming at the problem of private data sharing, how to open access rights to individual users without exposing encryption keys is a technical problem to be solved urgently at present.
Disclosure of Invention
The technical task of the invention is to provide a chameleon hash-based block chain private data sharing method and system, so as to solve the problems of privacy protection and sharing of transaction data on a block chain.
The technical task of the invention is realized in the following way, and the method for sharing the private data of the block chain based on chameleon hash comprises the following steps:
building a block chain network: deploying a blockchain network based on the blockchain framework;
registering the block chain identity of the user, generating a public key and a private key of the user, and recording the public key and the private key as P and S respectively;
a user generates a chameleon Hash public key pk and a private key sk by using a chameleon Hash key generation algorithm, and a safety constant lambda freely selects a generation mode; the private key sk is a chameleon Hash trapdoor, and Hash collision can be easily found by using the Hash trapdoor, namely different data have the same Hash;
establishing external storage;
user a stores private data D 1 Selecting a random number K (random number generation rules can be freely selected), and generating chameleon Hash h which is used as an encryption key;
user a stores private data D 1 To the block chain, the private data is encrypted by using h as a symmetric encryption key to obtain a result ED 1 A write chain;
user b applies for accessing private data ED 1 And obtaining the privacy data D.
Preferably, the user b applies for accessing the private data ED 1 The obtained private data D is specifically as follows:
user b applies for accessing private data ED 1 Sending the current timestamp (or other random number) as obfuscated information m';
after the user a agrees to apply, the confusion information m ' is used, a private key sk (trapdoor), an encryption key K, the confusion information m ', a hash value h and a random number p of the user a are input according to a hash collision algorithm, and a corresponding new random number r ' is output, so that:
Ch_Ver(pk,K,(h,p),r)=Ch_Ver(pk,m′,(h,p),r′)=1;
namely:
ch_Hash(pk,K,r)=ch_Hash(pk,m′,r′);
the user a stores the user information of the corresponding user b, the confusion information m ', the newly added random number r ' corresponding to the confusion information m ' and the corresponding access privacy data id in an external database so as to carry out access control;
the user a sends the new random number r ' to the user b, the user b obtains the chameleon hash public key pk of the user a, and obtains the chameleon hash h by using the confusion information m ' and the random number r ' sent by the user a, namely the private data encryption key, which is specifically as follows:
ch_Hash(pk,m′,r′)=(h,p);
user b obtains private data ED to be accessed 1 Decrypting by using h to obtain data D 1
Preferably, the external storage is used for storing the chameleon hash public key pk and the private key sk of the user and corresponding data information; when the private data are stored, a corresponding data id is created for each private data, and random numbers K and r corresponding to the private data are stored, so that the subsequent chameleon Hash operation is facilitated.
Preferably, the random number K is used as the message content m of the chameleon hash operation, another random number r is selected (the random number generation rule can be freely selected), the chameleon hash public key pk of the user a is used, and the chameleon hash h and the corresponding random number p are generated by adopting the chameleon hash algorithm, and the formula is as follows:
Ch_Hash(pk,K,r)=(h,p);
the chameleon hash is used for generating the encryption key, so that the same encryption key is generated under the condition that K is not leaked later, and the safety risk of transmitting the encryption key in a network is avoided.
Preferably, the symmetric encryption key is obtained by a symmetric encryption algorithm, and the encryption and decryption of the symmetric encryption algorithm rely on the same symmetric key, that is: and encrypting the plaintext by using the symmetric key to obtain a ciphertext, and decrypting the ciphertext by using the same symmetric key to obtain the plaintext.
Preferably, the user b generates chameleon hash h, namely a symmetric encryption key, by using the obfuscation information and the random number; the interactive information generated by the user a and the user b is used for exchanging the confusion information and the corresponding random numbers, and the confusion information and the corresponding random numbers cannot be transmitted in the network at the same time, so that the operation safety is ensured, and the privacy leakage is prevented;
other users than user b apply for accessing private data ED 1 And then, obtaining chameleon hash by using the chameleon hash public key of the user a through obtaining the confusion information and the corresponding random number so as to decrypt the private data.
A chameleon hash-based blockchain private data sharing system comprises,
a deployment module for deploying a blockchain network based on the blockchain framework;
the registration module is used for registering the identity of the block chain by the user, generating a user public key and a user private key which are respectively marked as P and S;
the generation module is used for generating a chameleon Hash public key pk and a private key sk by a user by using a chameleon Hash key generation algorithm, and the safety constant lambda freely selects a generation mode; the private key sk is a chameleon Hash trapdoor, and Hash collision can be easily found by using the Hash trapdoor, namely different data have the same Hash;
the establishing module is used for establishing external storage;
a selection module for the user a to store the private data D 1 Selecting a random number K (random number generation rules can be freely selected), and generating chameleon Hash h which is used as an encryption key;
an encryption module for user a to store private data D 1 To the block chain, the privacy data is encrypted by using h as a symmetric encryption key to obtain a result ED 1 A write chain;
an access module for the user b to apply for accessing the private data ED 1 And obtaining the privacy data D.
Preferably, the working process of the system is as follows:
(1) the user a selects a random number, obtains a hash value by using chameleon hash operation, and encrypts a private data write chain by using the hash value as a symmetric encryption key h;
(2) the user b applies for accessing the private data, acquires the current timestamp and sends a request to the user a;
(3) after the user a agrees to apply, acquiring a public key splicing timestamp (or other random numbers) of the user b as confusion information, obtaining hash collision of h by using a chameleon hash private key, and sending the corresponding random numbers to the user b;
(4) after obtaining the returned random number, the user b uses the chameleon hash public key of the user a to calculate chameleon hash h, and the encrypted private data is obtained and decrypted; the method comprises the following specific steps:
firstly, a private data holding user a uses a chameleon Hash private key sk according to confusion information m 'sent by a user b to obtain a corresponding Hash collision random number r';
secondly, the user b uses the confusion information m 'and the collision random number r', uses the chameleon Hash public key pk of the user a to calculate a chameleon Hash value h, and decrypts data.
An electronic device, comprising: a memory and at least one processor;
wherein the memory stores computer-executable instructions;
the at least one processor executing the memory-stored computer-executable instructions cause the at least one processor to perform a chameleon hash-based blockchain private data sharing method as described above.
A computer-readable storage medium having stored thereon computer-executable instructions, which when executed by a processor to implement the chameleon hash-based blockchain private data sharing method as described above.
The chameleon hash-based block chain private data sharing method and system have the following advantages:
according to the method, the characteristics that Hash collision can be obtained by using a chameleon Hash function are mainly utilized, a user a encrypts and stores private data to a block chain, and when other users apply for access, the user a can use a chameleon Hash algorithm private key to find out key collision, so that the access user can obtain a key and decrypt the encrypted data, and the purpose of data sharing is achieved;
secondly, data are encrypted and stored in the block chain, and data sharing can be realized without transmitting an encryption key; the method comprises the steps of calculating to obtain corresponding random numbers according to confusion information sent by an application user by utilizing trapdoor operation of a chameleon hash algorithm on the premise of not transmitting an encryption key, and sending the random numbers to the application user; the application user uses the chameleon public key of the user according to the obfuscation information and the random number to obtain an encryption key and decrypt data, and private data sharing is achieved;
thirdly, the user encrypts the private data write chain without considering the problem that other users apply for access in the later period; when a user applies for access, written chain data does not need to be changed, and only the encryption key is operated, so that the user applying for the access can obtain access authority; a plurality of users apply for accessing the private data, and other data do not need to be generated additionally, so that data expansion is prevented;
fourthly, each private data uses different random numbers to generate a key encryption write chain, and when a user applies for obtaining the access right of certain data, other data cannot be leaked; the data encryption uses random number encryption without involving a public key and a private key of a user, so that the security of the user key is ensured; data transmission among users is confusion information and random numbers, so that secret keys cannot be leaked;
when the user applies for accessing the private data, the stored private data does not need to be changed, new data does not need to be added, and the private data can be shared;
each piece of private data corresponds to different encryption keys, and a user applies for accessing a certain piece of private data to obtain the encryption keys without influencing other private data;
seventhly, the interaction process of the access user and the data holding user is applied, only the confusion information or the random number is sent, the confusion information and the random number cannot be transmitted together in the network, and the secret key cannot be leaked;
the invention does not directly send data encryption key, adopts chameleon hash to use private key to obtain the characteristic of hash collision, and obtains the encryption key by calculation of an application access user to prevent the key from leaking;
the invention solves the problems of privacy protection and sharing of transaction data on the blockchain; the private data can be encrypted and shared, the privacy range control of user-level fine granularity can be carried out, the transaction data can be authorized to be visible to some members, and unauthorized members can only see the encrypted transaction hash value.
Drawings
The invention is further described below with reference to the accompanying drawings.
Fig. 1 is a flow chart of a working process of a chameleon hash-based block chain private data sharing system;
FIG. 2 shows a user b applying for access to private data ED 1 Obtaining a flow chart of the privacy data D;
fig. 3 is a block flow diagram of a symmetric encryption algorithm.
Detailed Description
The method and system for sharing private data of blockchain based on chameleon hash according to the present invention are described in detail below with reference to the drawings and specific embodiments of the specification.
Example 1:
the embodiment provides a chameleon hash-based block chain private data sharing method, which specifically comprises the following steps:
s1, building a block chain network: deploying a blockchain network based on the blockchain framework; the blockchain framework may be any blockchain framework capable of implementing the corresponding function of the embodiment, for example, bitcoin, etherhouse, Fabric, Corda, and the like.
S2, registering a block chain identity by a user, generating a user public key and a user private key, and recording the user public key and the user private key as P and S respectively;
s3, the chameleon hash public key pk and the private key sk are generated by the user through a chameleon hash key generation algorithm, and the generation mode of the safety constant lambda is freely selected; the private key sk is a chameleon Hash trapdoor, and Hash collision can be easily found by using the Hash trapdoor, namely different data have the same Hash;
s4, establishing external storage;
s5, storing private data D by user a 1 Selecting a random number K (random number generation rules can be freely selected), and generating chameleon Hash h which is used as an encryption key;
s6, storing private data D by user a 1 To the block chain, the private data is encrypted by using h as a symmetric encryption key to obtain a result ED 1 A write chain;
s7, user b applies for accessing private data ED 1 And obtaining the privacy data D.
As shown in fig. 2, the user b in step S7 of this embodiment applies for accessing the private data ED 1 The obtained private data D is specifically as follows:
s701, applying for accessing the private data ED by the user b 1 Sending the current timestamp (or other random number) as the obfuscated information m';
s702, after the user a agrees to apply, the confusion information m ' is used, a private key sk (trapdoor) of the user a, an encryption key K, the confusion information m ', a hash value h and a random number p are input according to a Hash collision algorithm, and a corresponding new random number r ' is output, so that:
Ch_Ver(pk,K,(h,p),r)=Ch_Ver(pk,m′,(h,p),r′)=1;
namely:
ch_Hash(pk,K,r)=ch_Hash(pk,m′,r′);
s703, storing the user information of the corresponding user b, the newly added random number r 'corresponding to the confusion information m' and the corresponding access privacy data id in an external database by the user a so as to perform access control;
s704, the user a sends the new random number r ' to the user b, the user b obtains the chameleon hash public key pk of the user a, and obtains the chameleon hash h, that is, the private data encryption key, by using the confusion information m ' and the random number r ' sent by the user a, which is specifically as follows:
ch_Hash(pk,m′,r′)=(h,p);
s705, user b obtains private data ED to be accessed 1 Decrypting by using h to obtain data D 1
The external storage in step S4 is used to store the chameleon hash public key pk and private key sk of the user and corresponding data information; when the private data are stored, a corresponding data id is created for each private data, and random numbers K and r corresponding to the private data are stored, so that the subsequent chameleon Hash operation is facilitated.
In this embodiment, the random number K is used as the message content m of chameleon hash operation, another random number r is selected (a random number generation rule can be freely selected), the chameleon hash public key pk of the user a is used, and a chameleon hash algorithm is used to generate a chameleon hash h and a corresponding random number p, where the formula is as follows:
Ch_Hash(pk,K,r)=(h,p);
the chameleon hash is used for generating the encryption key, so that the same encryption key is generated under the condition that K is not leaked later, and the safety risk of transmitting the encryption key in a network is avoided.
As shown in fig. 3, the symmetric encryption key in step S6 of the present embodiment is obtained by a symmetric encryption algorithm, and the encryption and decryption of the symmetric encryption algorithm rely on the same symmetric key, that is: and encrypting the plaintext by using the symmetric key to obtain a ciphertext, and decrypting the ciphertext by using the same symmetric key to obtain the plaintext.
And different privacy data correspond to chameleon hashes generated by different random numbers K. To prevent the privacy disclosure problem, that is, the user b does not decrypt the data D2 to obtain the access right of the data D1, for example:
Figure BDA0003637775950000081
in the embodiment, the user b generates chameleon hash h, namely a symmetric encryption key, by using the obfuscation information and the random number; the interactive information generated by the user a and the user b is used for exchanging the confusion information and the corresponding random numbers, and the confusion information and the corresponding random numbers cannot be transmitted in the network at the same time, so that the operation safety is ensured, and the privacy leakage is prevented;
other users than user b apply for access to private data ED 1 And then, obtaining chameleon hash by using the chameleon hash public key of the user a through obtaining the confusion information and the corresponding random number so as to decrypt the private data.
Example 2:
the embodiment provides a chameleon hash-based blockchain private data sharing system, which comprises,
a deployment module for deploying a blockchain network based on the blockchain framework;
the registration module is used for registering the identity of the block chain by the user, generating a user public key and a user private key which are respectively marked as P and S;
the generation module is used for generating a chameleon Hash public key pk and a private key sk by a user by using a chameleon Hash key generation algorithm, and the safety constant lambda freely selects a generation mode; the private key sk is a chameleon Hash trapdoor, and Hash collision can be easily found by using the Hash trapdoor, namely different data have the same Hash;
the establishing module is used for establishing external storage;
a selection module for the user a to store the private data D 1 SelectingSelecting a random number K (random number generation rules can be freely selected), and generating chameleon Hash h which is used as an encryption key;
an encryption module for user a to store private data D 1 To the block chain, the private data is encrypted by using h as a symmetric encryption key to obtain a result ED 1 A write chain;
an access module for the user b to apply for accessing the private data ED 1 And obtaining the privacy data D.
As shown in fig. 1, the system works as follows:
(1) the user a selects a random number, obtains a hash value by using chameleon hash operation, and encrypts a private data write chain by using the hash value as a symmetric encryption key h;
(2) the user b applies for accessing the private data, acquires the current timestamp and sends a request to the user a;
(3) after the user a agrees to apply, acquiring a public key splicing timestamp (or other random numbers) of the user b as confusion information, obtaining hash collision of h by using a chameleon hash private key, and sending the corresponding random numbers to the user b;
(4) after obtaining the returned random number, the user b uses the chameleon hash public key of the user a to calculate chameleon hash h, and the encrypted private data is obtained and decrypted; the method comprises the following specific steps:
firstly, a private data holding user a uses a chameleon Hash private key sk according to confusion information m 'sent by a user b to obtain a corresponding Hash collision random number r';
secondly, the user b uses the confusion information m 'and the collision random number r', uses the chameleon Hash public key pk of the user a to calculate a chameleon Hash value h, and decrypts data.
Example 3:
the present embodiment also provides an electronic device, including: a memory and a processor;
wherein the memory stores computer-executable instructions;
the processor executes the computer-executable instructions stored by the memory to cause the processor to perform the chameleon hash-based blockchain private data sharing method of any embodiment.
The processor may be a Central Processing Unit (CPU), but may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. The processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may be used to store computer programs and/or modules, and the processor may implement various functions of the electronic device by executing or executing the computer programs and/or modules stored in the memory and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the terminal, and the like. The memory may also include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a memory only card (SMC), a Secure Digital (SD) card, a flash memory card, at least one disk storage period, a flash memory device, or other volatile solid state memory device.
Example 4:
the embodiment also provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions are loaded by a processor and cause the processor to execute the chameleon hash-based block chain private data sharing method in any embodiment of the invention. Specifically, a system or an apparatus equipped with a storage medium on which software program codes that realize the functions of any of the embodiments described above are stored may be provided, and a computer (or a CPU or MPU) of the system or the apparatus is caused to read out and execute the program codes stored in the storage medium.
In this case, the program code itself read from the storage medium can realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
Examples of the storage medium for supplying the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD + RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer via a communications network.
Further, it should be clear that the functions of any one of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform a part or all of the actual operations based on instructions of the program code.
Further, it is to be understood that the program code read out from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion unit connected to the computer, and then causes a CPU or the like mounted on the expansion board or the expansion unit to perform part or all of the actual operations based on instructions of the program code, thereby realizing the functions of any of the above-described embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and these modifications or substitutions do not depart from the spirit of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A block chain private data sharing method based on chameleon Hash is characterized by comprising the following steps:
building a block chain network: deploying a blockchain network based on the blockchain framework;
registering a block chain identity by a user, generating a public key and a private key of the user, and recording the public key and the private key as P and S respectively;
a user generates a chameleon Hash public key pk and a private key sk by using a chameleon Hash key generation algorithm, and a safety constant lambda freely selects a generation mode; wherein the private key sk is the chameleon hash trapdoor;
establishing external storage;
user a stores private data D 1 Selecting a random number K to generate chameleon Hash which is used as an encryption key;
user a stores private data D 1 To the block chain, the private data is encrypted by using h as a symmetric encryption key to obtain a result ED 1 A write chain;
user b applies for accessing private data ED 1 And obtaining the privacy data D.
2. The chameleon hash-based blockchain private data sharing method according to claim 1, wherein the user b applies for accessing the private data ED 1 The obtained private data D is specifically as follows:
user b applies for accessing private data ED 1 Sending the current timestamp as confusion information m';
after the user a agrees to apply, the confusion information m ' is used, a private key sk (trapdoor), an encryption key K, the confusion information m ', a hash value h and a random number p of the user a are input according to a hash collision algorithm, and a corresponding new random number r ' is output, so that:
Ch_Ver(pk,K,(h,p),r)=Ch_Ver(pk,m′,(h,p),r′)=1;
namely:
ch_Hash(pk,K,r)=ch_Hash(pk,m′,r′);
the user a stores the user information of the corresponding user b, the confusion information m ', the newly added random number r ' corresponding to the confusion information m ' and the corresponding access privacy data id in an external database;
the user a sends the new random number r ' to the user b, the user b obtains the chameleon hash public key pk of the user a, and obtains the chameleon hash h by using the confusion information m ' and the random number r ' sent by the user a, namely the private data encryption key, which is specifically as follows:
ch_Hash(pk,m′,r′)=(h,p);
user b obtains private data ED to be accessed 1 Decrypting by using h to obtain data D 1
3. The chameleon hash-based blockchain private data sharing method according to claim 1 or 2, wherein an external storage is used for storing a user chameleon hash public key pk and a private key sk and corresponding data information; when the private data are stored, a corresponding data id is created for each private data, and random numbers K and r corresponding to the private data are stored.
4. The chameleon hash-based block chain private data sharing method according to claim 3, wherein a random number K is used as the message content m of chameleon hash operation, another random number r is selected, a chameleon hash public key pk of the user a is used, a chameleon hash algorithm is used to generate a chameleon hash h and a corresponding random number p, and the formula is as follows:
Ch_Hash(pk,K,r)=(h,p)。
5. the chameleon hash-based blockchain private data sharing method according to claim 1, wherein the symmetric encryption key is obtained through a symmetric encryption algorithm, and encryption and decryption of the symmetric encryption algorithm depend on the same symmetric key, that is: and encrypting the plaintext by using the symmetric key to obtain a ciphertext, and decrypting the ciphertext by using the same symmetric key to obtain the plaintext.
6. The chameleon hash-based blockchain private data sharing method according to claim 2, wherein a chameleon hash h, i.e. a symmetric encryption key, is generated by a user b by using obfuscation information and a random number; the interactive information of the user a and the user b is used for exchanging the confusion information and the corresponding random number, and the confusion information and the corresponding random number cannot be transmitted in the network at the same time;
other users than user b apply for accessing private data ED 1 And then, obtaining chameleon hash by using the chameleon hash public key of the user a through obtaining the confusion information and the corresponding random number so as to decrypt the private data.
7. A block chain private data sharing system based on chameleon Hash is characterized in that the system comprises,
a deployment module for deploying a blockchain network based on the blockchain framework;
the registration module is used for registering the identity of the block chain by the user, generating a user public key and a user private key which are respectively marked as P and S;
the generation module is used for generating a chameleon Hash public key pk and a private key sk by a user by using a chameleon Hash key generation algorithm, and the safety constant lambda freely selects a generation mode; wherein the private key sk is the chameleon hash trapdoor;
the establishing module is used for establishing external storage;
a selection module for the user a to store the private data D 1 Selecting a random number K to generate a chameleon Hash h which is used as an encryption key;
an encryption module for storing private data D by user a 1 To the block chain, the private data is encrypted by using h as a symmetric encryption key to obtain a result ED 1 A write chain;
an access module for the user b to apply for accessing the private data ED 1 And obtaining the privacy data D.
8. The chameleon hash-based blockchain private data sharing system according to claim 7, wherein the system specifically operates as follows:
(1) the user a selects a random number, obtains a hash value by chameleon hash operation, and encrypts the private data write chain by using the hash value as a symmetric encryption key h;
(2) the user b applies for accessing the private data, acquires the current timestamp and sends a request to the user a;
(3) after the user a agrees to apply, acquiring a public key splicing timestamp of the user b as confusion information, obtaining hash collision of h by using a chameleon hash private key, and sending a corresponding random number to the user b;
(4) after obtaining the returned random number, the user b uses the chameleon hash public key of the user a to calculate chameleon hash h, and the encrypted private data is obtained and decrypted; the method comprises the following specific steps:
firstly, a private data holding user a uses a chameleon Hash private key sk according to confusion information m 'sent by a user b to obtain a corresponding Hash collision random number r';
secondly, the user b uses the confusion information m 'and the collision random number r', uses the chameleon Hash public key pk of the user a to calculate a chameleon Hash value h, and decrypts data.
9. An electronic device, comprising: a memory and at least one processor;
wherein the memory stores computer execution instructions;
the at least one processor executing the memory-stored computer-executable instructions cause the at least one processor to perform the chameleon hash-based blockchain private data sharing method of any one of claims 1 to 6.
10. A computer-readable storage medium having stored thereon computer-executable instructions, which when executed by a processor, implement the chameleon hash-based blockchain private data sharing method according to any one of claims 1 to 6.
CN202210506984.5A 2022-05-11 2022-05-11 Block chain private data sharing method and system based on chameleon hash Pending CN114936380A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210506984.5A CN114936380A (en) 2022-05-11 2022-05-11 Block chain private data sharing method and system based on chameleon hash

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210506984.5A CN114936380A (en) 2022-05-11 2022-05-11 Block chain private data sharing method and system based on chameleon hash

Publications (1)

Publication Number Publication Date
CN114936380A true CN114936380A (en) 2022-08-23

Family

ID=82864752

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210506984.5A Pending CN114936380A (en) 2022-05-11 2022-05-11 Block chain private data sharing method and system based on chameleon hash

Country Status (1)

Country Link
CN (1) CN114936380A (en)

Similar Documents

Publication Publication Date Title
RU2718689C2 (en) Confidential communication control
WO2020034755A1 (en) Multiparty secure computing method, device, and electronic device
US9609024B2 (en) Method and system for policy based authentication
JP4668619B2 (en) Device key
KR100749867B1 (en) System and method for securely installing a cryptographic system on a secure device
US11936776B2 (en) Secure key exchange electronic transactions
RU2371756C2 (en) Safety connection to keyboard or related device
US11184164B2 (en) Secure crypto system attributes
US20030081774A1 (en) Method and apparatus for dynamic generation of symmetric encryption keys and exchange of dynamic symmetric key infrastructure
EP2267628A2 (en) Token passing technique for media playback devices
US10880100B2 (en) Apparatus and method for certificate enrollment
WO2020155812A1 (en) Data storage method and device, and apparatus
US20220284133A1 (en) Executing entity-specific cryptographic code in a cryptographic coprocessor
EP3785409B1 (en) Data message sharing
KR102364649B1 (en) APPARATUS AND METHOD FOR AUTHENTICATING IoT DEVICE BASED ON PUF
KR20230032684A (en) QKD-based blockchain node creation technique
CN114936380A (en) Block chain private data sharing method and system based on chameleon hash
CN113824713A (en) Key generation method, system and storage medium
JP2002247021A (en) Method and device for displaying access limited contents
JP6830635B1 (en) Data management method
KR102625088B1 (en) Apparatus and method for sharing data
US20220086171A1 (en) Communication system, communication method, and computer program product
US20240080189A1 (en) System and method for decrypting encrypted secret data items without master password
JP2006332735A (en) Encryption conversion apparatus, and encryption conversion method and program
KR20220081068A (en) Application security device and method using encryption/decryption key

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