The invention discloses a data transaction
privacy protection method based on a block chain, belongs to the technical field of
data sharing, and aims to solve the technical problem of how to ensure data privacy and ensure
traceability and transparency of data transaction in
Internet of Things data transaction. Comprising the steps that a data buyer performs data validity
verification based on a zero-knowledge proof submitted to a block chain by a data seller, after
verification is passed, the data seller generates a re-
encryption key based on a private key of the data seller and a public key of the data buyer and uploads the re-
encryption key to a proxy node, the proxy node re-encrypts a related
ciphertext based on the re-
encryption key, and the data seller sends the re-encrypted
ciphertext to the data seller; the obtained re-encrypted
ciphertext is uploaded to the IPFS, a
content identifier returned by the IPFS is written into the block chain, and the block chain writes the
content identifier corresponding to the re-encrypted ciphertext into the
smart contract; and after the data buyer pays, the re-encrypted ciphertext is obtained from the IPFS based on the
content identifier returned by the block chain, and the re-encrypted ciphertext is decrypted based on the private key.