The invention discloses a Hyperledger Fabric block chain private data storage and access
system and a method thereof. The
system comprises a
client module, an SDK module, an intelligent contract module and a
database module, the
client module calls a private data storage
chain code function through the SDK module, the intelligent contract module judges whether an effective
chain code set containsthe private data storage
chain code function or not according to role information in a
certificate of the
client module, and if the effective chain code set contains the private data storage chain code function, the private attribute of the encrypted data and the non-private attribute are stored in a
database together; the client module calls the private
data query chain code function through theSDK module; and the intelligent contract module judges whether the effective chain code set contains a private
data query chain code function or not according to role information in a
certificate of the client module, if so, decrypts a query result of the
database module and returns real data to the client module, and otherwise, directly returns
ciphertext data to the client module. According to the method and the
system, the personal privacy security in Hyperledger Fabric data storage can be effectively improved, and the method and the system have the advantages of
confidentiality and security.