简体   繁体   中英

Block data encryption with Users public key and decryption on request by other user and consent of owner of data in Hyperledger fabric

Is it possible to encrypt the data of user A with public key Pb_A let's say and add to the ledger and when user B requests the data for user A, after A gives consent then data gets decrypted and displayed to user B? Any help would be appreciated. Any reference material will also do.

Normally when encrypting with a receivers public key, you don't actually encrypt the data with the public key, but instead encrypt a random symmetric key that is then used to encrypt the data.

When using this approach you can encrypt the same data for several receivers without the need for providing several versions of the encrypted data.

If you use the same approach in your case, User A can give User B access, simply by providing the random symmetric key used for encrypting the data to user B

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM