TW201926111A - Method and apparatus for encrypting and decrypting product information - Google Patents

Method and apparatus for encrypting and decrypting product information Download PDF

Info

Publication number
TW201926111A
TW201926111A TW107132970A TW107132970A TW201926111A TW 201926111 A TW201926111 A TW 201926111A TW 107132970 A TW107132970 A TW 107132970A TW 107132970 A TW107132970 A TW 107132970A TW 201926111 A TW201926111 A TW 201926111A
Authority
TW
Taiwan
Prior art keywords
key
nth
circulation
production
information
Prior art date
Application number
TW107132970A
Other languages
Chinese (zh)
Other versions
TWI712916B (en
Inventor
王虎森
Original Assignee
香港商阿里巴巴集團服務有限公司
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 香港商阿里巴巴集團服務有限公司 filed Critical 香港商阿里巴巴集團服務有限公司
Publication of TW201926111A publication Critical patent/TW201926111A/en
Application granted granted Critical
Publication of TWI712916B publication Critical patent/TWI712916B/en

Links

Classifications

    • 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/088Usage controlling of secret information, e.g. techniques for restricting cryptographic keys to pre-authorized uses, different access levels, validity of crypto-period, different key- or password length, or different strong and weak cryptographic algorithms
    • 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/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0822Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using key encryption key
    • 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
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • G06Q30/0185Product, service or business identity fraud
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0623Item investigation
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • 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/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0825Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
    • 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
    • H04L9/0863Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time 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/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
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • 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/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
    • 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
    • H04L9/3239Cryptographic 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 involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q2220/00Business processing using cryptography
    • G06Q2220/10Usage protection of distributed data files

Abstract

Disclosed are a method and apparatus for encrypting and decrypting product information based on a block chain. Product information can be encrypted by a production side based on a unique secret code. When there is a circulation side, a circulation key may be unidirectionally generated according to the unique secret code, and the circulation side may continue to generate a circulation information encryption key, according to the circulation key, to encrypt the circulation information, and a next circulation key is generated according to the circulation information encryption key. That is, product information is encrypted by means of unidirectionally generating a key in a chained ring; and production information is encrypted and stored by using the characteristic that a unique secret code of a product cannot be learnt, other than by a production side and a purchaser, and the characteristic that a block chain cannot be tampered with and cannot be counterfeited, such that the production information has high confidentiality.

Description

產品信息的加密、解密方法及裝置Product information encryption and decryption method and device

本說明書涉及電腦技術領域,尤其涉及一種產品信息的加密方法及裝置、以及一種產品信息的解密方法及裝置。This specification relates to the field of computer technology, in particular to a method and device for encrypting product information, and a method and device for decrypting product information.

目前,隨著各行各業的發展,包括線上線下各種產品的交易、流通已經非常普遍,這裡所說的產品可以是實體產品,比如工業製品、工藝品等;也可以是電腦產品,比如軟體、網路儲存空間等。   對於一個產品,通常存在一個生產方和一個購買方,即生產產品的一方和購買產品的一方,且多數情況下還存在流通方,即流通產品的一方或多方。比如,對於一批飲料產品,可以有一個生產方(飲料的生產廠商),以及一個購買方(消費者),或者在生產方和購買方之間存在至少一個流通方(代理商、零售商等),在整個流通的過程中,除購買方的每一方均會為產品產生一個產品信息(生產方可以產生生產信息,而流通方可以產生流通信息),這些信息串聯到一起,就可以是由生產方到購買方的全過程,即的產品信息就是對產品進行溯源的依據。   而通常情況下,需要對各產品信息進行保密,即每一方的產品信息只能由生產方和購買方獲取到,而需要對流通方或竊取者保密。所以需要提供一種為各方產生的產品信息進行保密的方案,並確保購買方能夠對產品進行溯源。At present, with the development of all walks of life, including the transaction and circulation of various online and offline products, the products mentioned here can be physical products, such as industrial products, handicrafts, etc .; or computer products, such as software, Network storage space, etc. For a product, there is usually a producer and a buyer, that is, the party that produces the product and the party that buys the product, and in many cases there is also a party that circulates, that is, one or more parties that circulate the product. For example, for a batch of beverage products, there can be a producer (the manufacturer of the beverage) and a buyer (consumer), or there is at least one distributor (agent, retailer, etc.) between the producer and the buyer ) In the entire circulation process, each party except the buyer will generate a product information for the product (the producer can produce production information, and the circulation party can produce circulation information), these information are connected together, it can be caused by The whole process from the producer to the buyer, that is, the product information is the basis for tracing the product. In general, it is necessary to keep the information of each product confidential, that is, the product information of each party can only be obtained by the producer and the buyer, and it needs to be kept secret from the circulation party or the stolen person. Therefore, it is necessary to provide a scheme for keeping confidential the product information generated by all parties, and ensure that the purchaser can trace the source of the product.

本說明書實施例提供一種基於區塊鏈的產品信息加密、解密方法,用於在產品流通過程中,對產品信息進行保密,且確保購買方能夠獲得產品信息。   本說明書實施例提供一種基於區塊鏈的產品信息加密、解密裝置,用於在產品流通過程中,對產品信息進行保密,且確保購買方能夠獲得產品信息。   為解決上述技術問題,本說明書實施例是這樣實現的:   本說明書實施例採用下述技術方案:   一種基於區塊鏈的產品信息加密方法,所述方法應用於生產方,包括:   根據產品的唯一暗碼,單向產生生產加密密鑰;   根據所述生產加密密鑰,對所述產品的生產信息進行加密,產生生產信息加密資料;   根據所述生產加密密鑰,產生生產信息查詢標識;   將生產信息集合寫入區塊鏈,所述生產信息集合包含生產信息查詢標識、以及生產信息加密資料。   一種基於區塊鏈的產品信息加密方法,所述方法應用於流通方,包括:   根據第n公鑰,單向產生第n流通密鑰查詢標識;   根據第n流通密鑰查詢標識,從區塊鏈中讀取第n接收密鑰加密資料;   根據第n私鑰,對所述第n流通密鑰加密資料進行解密,得到第n流通密鑰;   根據所述第n流通密鑰,單向產生第n加密密鑰;   根據第n加密密鑰,對第n流通信息進行加密,產生第n流通信息加密資料;   根據所述第n加密密鑰,產生第n流通信息查詢標識;   將第n信息集合寫入區塊鏈,所述第n信息集合包含第n流通信息查詢標識以及第n流通信息加密資料;   其中,n為大於0的自然數。   一種基於區塊鏈的產品信息解密方法,所述方法應用於購買方,包括:   根據產品的唯一暗碼,單向產生生產加密密鑰;   根據所述生產加密密鑰,產生生產信息查詢標識;   根據所述生產信息查詢標識,從區塊鏈中讀取所述產品的生產信息加密資料;   根據所述生產加密密鑰,對所述生產信息加密資料進行解密,獲得生產信息。   一種基於區塊鏈的產品信息加密裝置,應用於生產方,包括:密鑰產生單元、資料產生單元、標識產生單元、資料寫入單元,其中,   所述密鑰產生單元,根據產品的唯一暗碼,單向產生生產加密密鑰;   所述資料產生單元,根據所述生產加密密鑰,對所述產品的生產信息進行加密,產生生產信息加密資料;   所述標識產生單元,根據所述生產加密密鑰,產生生產信息查詢標識;   所述資料傳輸單元,將生產信息集合寫入區塊鏈,所述生產信息集合包含生產信息查詢標識、以及生產信息加密資料。   一種基於區塊鏈的產品信息加密裝置,應用於流通方,包括:標識產生單元、資料讀取單元、資料解析單元、密鑰產生單元、資料加密單元、資料傳輸單元,其中,   所述標識產生單元,根據第n公鑰,單向產生第n流通密鑰查詢標識;   所述資料讀取單元,根據第n流通密鑰查詢標識,從區塊鏈中讀取第n接收密鑰加密資料;   所述資料解析單元,根據第n私鑰,對所述第n流通密鑰加密資料進行解密,得到第n流通密鑰;   所述密鑰產生單元,根據所述第n流通密鑰,單向產生第n加密密鑰;   所述資料加密單元,根據第n加密密鑰,對第n流通信息進行加密,產生第n流通信息加密資料;   根據所述第n加密密鑰,產生第n流通信息查詢標識;   所述資料傳輸單元,將第n信息集合寫入區塊鏈,所述第n信息集合包含第n流通信息查詢標識以及第n流通信息加密資料;   其中,n為大於0的自然數。   一種基於區塊鏈的產品信息解密裝置,所述方法應用於購買方,包括:密鑰產生單元、標識產生單元、資料讀取單元、以及資料解析單元,其中,   所述密鑰產生單元,根據產品的唯一暗碼,單向產生生產加密密鑰;   所述標識產生單元,根據所述生產加密密鑰,產生生產信息查詢標識;   所述資料讀取單元,根據所述生產信息查詢標識,從區塊鏈中讀取所述產品的生產信息加密資料;   所述資料解析單元,根據所述生產加密密鑰,對所述生產信息加密資料進行解密,獲得生產信息。   一種電子設備,包括:   處理器;以及   被安排成儲存電腦可執行指令的記憶體,所述可執行指令在被執行時使所述處理器執行以下操作:   根據產品的唯一暗碼,單向產生生產加密密鑰;   根據所述生產加密密鑰,對所述產品的生產信息進行加密,產生生產信息加密資料;   根據所述生產加密密鑰,產生生產信息查詢標識;   將生產信息集合寫入區塊鏈,所述生產信息集合包含生產信息查詢標識、以及生產信息加密資料。   一種電子設備,包括:   處理器;以及   被安排成儲存電腦可執行指令的記憶體,所述可執行指令在被執行時使所述處理器執行以下操作:   根據第n公鑰,單向產生第n流通密鑰查詢標識;   根據第n流通密鑰查詢標識,從區塊鏈中讀取第n接收密鑰加密資料;   根據第n私鑰,對所述第n流通密鑰加密資料進行解密,得到第n流通密鑰;   根據所述第n流通密鑰,單向產生第n加密密鑰;   根據第n加密密鑰,對第n流通信息進行加密,產生第n流通信息加密資料;   根據所述第n加密密鑰,產生第n流通信息查詢標識;   將第n信息集合寫入區塊鏈,所述第n信息集合包含第n流通信息查詢標識以及第n流通信息加密資料;   其中,n為大於0的自然數。   一種電子設備,包括:   處理器;以及   被安排成儲存電腦可執行指令的記憶體,所述可執行指令在被執行時使所述處理器執行以下操作:   根據產品的唯一暗碼,單向產生生產加密密鑰;   根據所述生產加密密鑰,產生生產信息查詢標識;   根據所述生產信息查詢標識,從區塊鏈中讀取所述產品的生產信息加密資料;   根據所述生產加密密鑰,對所述生產信息加密資料進行解密,獲得生產信息。   一種電腦可讀儲存媒體,所述電腦可讀儲存媒體儲存一個或多個程式,所述一個或多個程式當被包括多個應用程式的電子設備執行時,使得所述電子設備執行以下操作:   根據產品的唯一暗碼,單向產生生產加密密鑰;   根據所述生產加密密鑰,對所述產品的生產信息進行加密,產生生產信息加密資料;   根據所述生產加密密鑰,產生生產信息查詢標識;   將生產信息集合寫入區塊鏈,所述生產信息集合包含生產信息查詢標識、以及生產信息加密資料。   一種電腦可讀儲存媒體,所述電腦可讀儲存媒體儲存一個或多個程式,所述一個或多個程式當被包括多個應用程式的電子設備執行時,使得所述電子設備執行以下操作:   根據第n公鑰,單向產生第n流通密鑰查詢標識;   根據第n流通密鑰查詢標識,從區塊鏈中讀取第n接收密鑰加密資料;   根據第n私鑰,對所述第n流通密鑰加密資料進行解密,得到第n流通密鑰;   根據所述第n流通密鑰,單向產生第n加密密鑰;   根據第n加密密鑰,對第n流通信息進行加密,產生第n流通信息加密資料;   根據所述第n加密密鑰,產生第n流通信息查詢標識;   將第n信息集合寫入區塊鏈,所述第n信息集合包含第n流通信息查詢標識以及第n流通信息加密資料;   其中,n為大於0的自然數。   一種電腦可讀儲存媒體,所述電腦可讀儲存媒體儲存一個或多個程式,所述一個或多個程式當被包括多個應用程式的電子設備執行時,使得所述電子設備執行以下操作:   根據產品的唯一暗碼,單向產生生產加密密鑰;   根據所述生產加密密鑰,產生生產信息查詢標識;   根據所述生產信息查詢標識,從區塊鏈中讀取所述產品的生產信息加密資料;   根據所述生產加密密鑰,對所述生產信息加密資料進行解密,獲得生產信息。   由以上實施例提供的技術方案可見,本說明書提供的實施例生產方可以利用產品的唯一暗碼,單向產生生產加密密鑰,再根據生產加密密鑰,對產品的生產信息進行加密,產生生產信息加密資料,根據生產加密密鑰,產生生產信息查詢標識,將包含生產信息查詢標識、以及生產信息加密資料的生產信息集合寫入區塊鏈。購買方可以利用產品的唯一暗碼,單向產生生產加密密鑰,再根據生產加密密鑰產生生產信息查詢標識,對從區塊鏈讀取到的生產信息加密資料進行解密,獲得生產信息。而在產品流通過程中出現流通方的情況,可以根據生產加密密鑰,單向產生用於流通至第1次序流通方的第1流通密鑰,再單向產生生產信息查詢標識,根據第1公鑰,對第1流通密鑰進行加密,產生第1流通密鑰加密資料,根據第1公鑰,單向產生第1流通密鑰查詢標識,將包含所述第1接收密鑰查詢標識、生產信息查詢標識、第1接收密鑰加密資料以及生產信息加密資料生產信息集合寫入區塊鏈。利用產品唯一暗碼在購買方破壞產品完整性後才能獲知的特性,以及區塊鏈不可篡改不可偽造的特性,對生產信息進行加密解密,使得生產信息有很高的保密性,且將生產信息寫入區塊鏈,使得下個流通方能夠透過鏈式連續加密的方式,將產品信息寫入區塊鏈。The embodiments of the present specification provide a method for encrypting and decrypting product information based on a blockchain, which is used to keep product information confidential during the process of product circulation and ensure that the purchaser can obtain product information. The embodiments of this specification provide a blockchain-based product information encryption and decryption device, which is used to keep product information confidential during product circulation and ensure that the purchaser can obtain product information. In order to solve the above technical problems, the embodiments of this specification are implemented as follows: The embodiments of this specification adopt the following technical solutions: A blockchain-based product information encryption method, which is applied to the producer, including: According to the uniqueness of the product Password, one-way production encryption key; According to the production encryption key, encrypt the production information of the product to generate production information encryption data; According to the production encryption key, produce production information query logo; will produce An information set is written into the blockchain, and the production information set includes production information query identifiers and production information encryption materials. A blockchain-based product information encryption method, which is applied to the circulation party, includes: One-way generation of the nth circulation key query mark based on the nth public key; Query identification based on the nth circulation key, from the block Read the nth received key encrypted data in the chain; Decrypt the nth circulation key encrypted data according to the nth private key to obtain the nth circulation key; According to the nth circulation key, generate unidirectionally The nth encryption key; According to the nth encryption key, encrypt the nth circulation information to generate the nth circulation information encrypted data; According to the nth encryption key, generate the nth circulation information query mark; The nth information The set is written into the blockchain, and the n-th information set includes the n-th circulation information query identifier and the n-th circulation information encrypted data;, where n is a natural number greater than 0. A method for decrypting product information based on blockchain. The method is applied to the purchaser and includes: One-way production encryption key is generated based on the product's unique password; Based on the production encryption key, production information query identifier is generated; according to The production information query identifier reads the production information encrypted material of the product from the blockchain; decrypts the production information encrypted material according to the production encryption key to obtain production information. A blockchain-based product information encryption device, applied to the producer, includes: a key generation unit, a data generation unit, an identification generation unit, and a data writing unit, where the key generation unit is based on the unique password of the product , One-way production encryption key; the data generation unit, according to the production encryption key, the production information of the product is encrypted to produce production information encryption data; the logo generation unit, based on the production encryption The key generates the production information query identifier; The data transmission unit writes the production information collection into the blockchain, and the production information collection includes the production information query identifier and the production information encryption material. A blockchain-based product information encryption device applied to a circulation party, including: an identification generation unit, a data reading unit, a data analysis unit, a key generation unit, a data encryption unit, and a data transmission unit, wherein the mark is generated Unit, according to the nth public key, unidirectionally generate the nth circulation key query mark; The data reading unit, according to the nth circulation key query mark, read the nth received key encrypted data from the blockchain; The data analysis unit decrypts the nth circulation key encrypted data based on the nth private key to obtain the nth circulation key; The key generation unit, based on the nth circulation key, unidirectionally Generate the nth encryption key; The data encryption unit encrypts the nth circulation information based on the nth encryption key to generate the nth circulation information encrypted data; Generates the nth circulation information based on the nth encryption key Query identifier; The data transmission unit writes the nth information set to the blockchain, the nth information set contains the nth circulation information query mark and the nth circulation information encrypted data;, where n is a natural number greater than 0 . A blockchain-based product information decryption device. The method is applied to a purchaser and includes: a key generation unit, an identification generation unit, a data reading unit, and a data analysis unit, wherein the key generation unit is based on The unique password of the product, which generates the production encryption key in one direction; The identification generation unit generates the production information query identification according to the production encryption key; The material reading unit queries the identification based on the production information Read the encrypted information of the production information of the product in the blockchain; The data analysis unit decrypts the encrypted information of the production information according to the production encryption key to obtain production information. An electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, the executable instructions, when executed, cause the processor to perform the following operations: one-way production based on the unique password of the product Encryption key; According to the production encryption key, encrypt the production information of the product to generate production information encryption data; According to the production encryption key, generate production information query identifier; Write production information set to the block Chain, the production information set includes production information query identifiers and production information encryption materials. An electronic device comprising: a processor; and a memory arranged to store computer-executable instructions which, when executed, cause the processor to perform the following operations: according to the n-th public key n Circulation key query mark; According to the nth circulation key query mark, read the nth received key encrypted data from the blockchain; Decrypt the nth circulation key encrypted data based on the nth private key, Obtain the nth circulation key; According to the nth circulation key, unidirectionally generate the nth encryption key; According to the nth encryption key, encrypt the nth circulation information to generate the nth circulation information encrypted data; According to the Describe the nth encryption key to generate the nth circulation information query mark; write the nth information set into the blockchain, the nth information set contains the nth circulation information query mark and the nth circulation information encryption data; where, n It is a natural number greater than 0. An electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, the executable instructions, when executed, cause the processor to perform the following operations: one-way production based on the unique password of the product Encryption key; According to the production encryption key, generate production information query identifier; According to the production information query identifier, read the production information encryption data of the product from the blockchain; According to the production encryption key, Decrypt the production information encrypted data to obtain production information. A computer-readable storage medium storing one or more programs, which when executed by an electronic device including multiple application programs, causes the electronic device to perform the following operations: According to the unique password of the product, the production encryption key is generated unidirectionally; according to the production encryption key, encrypting the production information of the product to generate production information encryption data; according to the production encryption key to generate production information query Logo; Write the production information set into the blockchain, the production information set contains the production information query logo, and production information encryption data. A computer-readable storage medium storing one or more programs, which when executed by an electronic device including multiple application programs, causes the electronic device to perform the following operations: According to the nth public key, generate the nth circulation key query identifier unidirectionally; According to the nth circulation key query identifier, read the nth received key encryption data from the blockchain; According to the nth private key, Decrypt the encrypted data of the nth circulation key to obtain the nth circulation key; according to the nth circulation key, unidirectionally generate the nth encryption key; encrypt the nth circulation information according to the nth encryption key, Generate the nth circulation information encrypted data; According to the nth encryption key, generate the nth circulation information query mark; Write the nth information set into the blockchain, the nth information set contains the nth circulation information query mark and The nth circulation information encrypted data; Among them, n is a natural number greater than 0. A computer-readable storage medium storing one or more programs, which when executed by an electronic device including multiple application programs, causes the electronic device to perform the following operations: Generate the production encryption key unidirectionally according to the unique password of the product; Generate the production information query identifier according to the production encryption key; Acquire the production information encryption of the product from the blockchain according to the production information query identifier Materials; Decrypt the production information encrypted materials according to the production encryption key to obtain production information. As can be seen from the technical solutions provided by the above embodiments, the embodiments provided in this specification can use the unique password of the product to generate a production encryption key in one direction, and then encrypt the production information of the product according to the production encryption key to produce production Information encryption data, according to the production encryption key, produce the production information query mark, and write the production information collection containing the production information query mark and the production information encryption material into the blockchain. The purchaser can use the unique password of the product to generate the production encryption key unidirectionally, and then generate the production information query mark according to the production encryption key, decrypt the production information encrypted data read from the blockchain, and obtain the production information. In the process of product circulation, if the circulation party occurs, the first circulation key for circulation to the first order circulation party can be generated unidirectionally according to the production encryption key, and the production information query logo can be generated unidirectionally. According to the first The public key encrypts the first circulation key to generate the first circulation key encrypted data. According to the first public key, the first circulation key query identifier is generated unidirectionally, which will include the first received key query identifier, The production information query mark, the first received key encrypted material, and the production information encrypted material production information set are written into the blockchain. The unique password of the product can only be known after the buyer destroys the integrity of the product, and the blockchain cannot be tampered with or forged. The production information is encrypted and decrypted, so that the production information is highly confidential and the production information is written. Into the blockchain, so that the next circulation party can write product information into the blockchain through continuous chain encryption.

為使本說明書的目的、技術方案和優點更加清楚,下面將結合具體實施例及相應的附圖對本說明書的技術方案進行清楚、完整地描述。顯然,所描述的實施例僅是本說明書一部分實施例,而不是全部的實施例。基於本說明書中的實施例,本領域普通技術人員在沒有做出創造性勞動前提下所獲得的其他實施例,都屬本說明書保護的範圍。   以下結合附圖,詳細說明本說明書中各實施例提供的技術方案。 實施例1   如前所述,在產品的整個流通過程中,除購買方的任一方均會為產品產生一個產品信息,比如生產方(產品廠商)可以在生產過程中,為產品產生一個生產信息(可以包含該產品、廠商等特徵信息),而流通方可以在接收到產品後,產生一個流通信息(可以包含流通方的時間、價格、地址等特徵信息),這些信息串聯到一起,可以是對產品進行溯源的依據,溯源可以是指跟踪特定產品從生產、經過流通等中間環節,到購買方的整個流通過程。而對於非購買方和生產方而言(流通方和竊取者),都需要對產品信息進行保密,並確保購買方可以查看產品信息,所以需要提供一種為各方產生的產品信息進行保密的方案,並確保購買方能夠對產品進行溯源。   本說明書提供一種基於區塊鏈的產品信息加密、解密方法,用於在產品流通過程中,對產品信息進行保密,且確保購買方能夠獲得產品信息。該方法可以適用於流通過程中,存在生產方和購買方的情況,也可以適用於流通過程中,存在購買方、一個或多個流通方,以及購買方的情況。   而本實施例1以流通過程中,可以是存在生產方和購買方的情況為例,介紹產品信息的加密方法。具體地,先介紹一種基於區塊鏈的產品信息加密方法,應用於存在生產方和購買方中的生產方。該方法的流程如圖1所示,包括下述步驟:   步驟12:根據產品的唯一暗碼,單向產生生產加密密鑰;   產品的唯一暗碼,可以是指暗藏在產品內部的識別碼,只有購買方在破壞產品完整性,開始使用產品後,才能夠找到唯一暗碼,產品唯一暗碼的意義在於除了生產方和購買方以外,均無法獲取產品的唯一暗碼。比如,對於瓶裝飲料而言,只有開啓瓶蓋,即破壞了產品的完整後,才可以從瓶蓋內側找到產品的唯一暗碼。所以作為生產方,可以以唯一暗碼作為依據,對產品信息進行加密,以致只有購買方在破壞產品完整性開始使用後,才可以找到唯一暗碼。   具體地,可以透過單向函數的方式,對產品的唯一暗碼產生生產加密密鑰,其中,單向函數可以是指對於任何輸入計算輸出,但已知輸出却無法確定輸入,也可以透過單向散列函數的方式,對產品的唯一暗碼產生生產加密密鑰,單向散列函數,又稱單向Hash函數、雜凑函數,就是把任意長的輸入消息串變化成固定長的輸出串且由輸出串難以得到輸入串的一種函數。所以,在無法獲取到唯一暗碼的情況下,無法確定出生產加密密鑰。這裡唯一暗碼可以由pincode表示,而單向函數可以由hash表示,則根據產品唯一暗碼單向產生的生產加密密鑰可以由key生產加密 表示,則可以有key生產加密 =hash(pincode)的表達方式。   在實際應用中,為了進一步加强的key生產加密 的安全性,在一種實施方式中,本步驟可以包括:接收生產方在生產該產品時產生的生產隨機數;根據唯一暗碼與生產隨機數的組合,單向產生生產加密密鑰。具體地,生產方在生產產品時可以產生一個生產隨機數,該生產隨機數可以用於對pincode進行單向計算,產生隨機數可以用nonce生產 表示。唯一暗碼與生產隨機數的組合可以以(pincode||nonce生產 )表示,也就是可以有key生產加密 =hash(pincode||nonce生產 ),需要說明的是,這裡所指的pincode與nonce生產 的組合,可以是簡單的字元串先後串聯,即pincode字元串在前、nonce生產 字元串在後,也可以是預設的字元串穿插串聯的方式,比如pincode可以有6位字元串,而nonce生產 可以有4位字元串,預設的字元串穿插串聯的方式可以是pincode前3位+ nonce生產 前2位+pincode後3位+ nonce生產 後2位,等。   步驟14:根據生產加密密鑰,對該產品的生產信息進行加密,產生生產信息加密資料。   由於在前一步驟中,產生的生產加密密鑰key生產加密 需要pincode的支持,而除購買方以外均無法得到pincode,所以本步驟就可以根據key生產加密 對產品的生產信息進行加密,產生生產信息加密資料。具體地,生產信息可以是指生產方在生產產品時產生的產品信息,其中,產品信息可以透過m表示,則生產信息可以透過m生產 表示。在實際應用中,通常需要保護m生產 的隱私,也可以理解為保護生產方的隱私,所以根據除購買方以外無法獲知的pincode對生產信息進行加密,安全性很高。   對於加密,可以透過加密函數實現,加密函數enc可以是指對信息進行加密的函數,函數中有兩個輸入,密鑰和信息,加密後可以產生信息加密資料(在本實施例中,加密的信息即為產品信息m),可以透過enc(加密密鑰key,產品信息m)表示。而對於獲取到信息加密資料enc,但不知道key,無法解析出m;對於獲取到enc和m,也無法得知key,此處的key若是非對稱密鑰,那麽enc即為非對稱加密;若key是對稱密鑰,那麽enc即為對稱加密。非對稱加密的情況可以存在公鑰pk和私鑰sk。在本步驟中,可以將產生生產信息加密資料表示為enc(key生產加密 ,m生產 )。   在前文已經介紹,key生產加密 可以由pincode單向產生,也可以由pincode||nonce生產 單向產生,可見在加入nonce生產 的情況下,pincode與nonce生產 是得到key生產加密 的關鍵,而pincode只有購買方能夠獲得,所以為了達到保護nonce生產 的目的,本方法還可以包括:   根據唯一暗碼,單向產生隨機數查詢標識;在可信儲存庫中為該產品創建唯一標識;將隨機數查詢標識以及生產隨機數發送至可信儲存庫,並均與唯一標識關聯。   具體地,為了達到保護nonce生產 的目的,可以將該nonce生產 發送至一個可信儲存庫中,當購買方需要產生 key生產加密 ,並對enc(key生產加密 ,m生產 )進行解密時,可以從可信儲存庫中,查找到nonce生產 。該可信儲存庫,可以是高度安全的國家機構或企業,為在可信儲存庫中,可以儲存針對不同產品的生產隨機數,所以可以為不同產品分別創建一個唯一標識,對於如何查找nonce生產 ,可以根據唯一暗碼,單向產生隨機數查詢標識hash(pincode),在將nonce生產 發送至可信儲存庫時,可以將hash(pincode)以及nonce生產 共同發送至可信儲存庫,並均與唯一標識關聯,以便購買方可以透過hash(pincode)查找到nonce生產 。而在加入nonce生產 的情況下,key生產加密 =hash(pincode||nonce生產 ),對於隨機數查詢標識hash(pincode),也不會影響的key生產加密 安全性。   根據本實施例的前提,在產品流通過程中,只存在生產方和購買方的情況下,實際應用中,可以由生產方將enc(key生產加密 ,m生產 )發送至購買方,以便購買方解析 m生產 。   步驟16:根據生產加密密鑰,產生生產信息查詢標識。   步驟18:將生產信息集合寫入區塊鏈,該生產信息集合可以包含生產信息查詢標識、以及生產信息加密資料。   區塊鏈,可以是一種按照時間順序將資料區塊以順序相連的方式組合成的一種鏈式資料結構,並以密碼學方式保證的不可篡改和不可偽造的分散式資料庫。而將enc(key生產加密 ,m生產 )寫入區塊鏈中,可以有效地防止篡改和偽造,具有較高的安全性和隱私性。由於區塊鏈中,有大量的資料,所以為了使購買方能夠快速地查找到enc(key生產加密 ,m生產 ),可以根據key生產加密 ,產生一個生產信息查詢標識,比如,就可以透過單向函數產生,還可以根據key生產加密 中特定個字元位數產生,又或結合特定個字元位數以及單向函數產生,又或對進行二次單向計算,產生生產信息查詢標識。可以包含生產信息查詢標識以及enc(key生產加密 ,m生產 )的生產信息集合寫入區塊鏈,以便購買方可以讀取。   如圖2所示,為本方法的一個實施方式的示意圖;如圖3所示,為本方法的另一個實施例方式的示意圖,區別在於如圖3所示的實施方式中對key生產加密 的產生過程加入nonce生產 ,更加有利於對enc(key生產加密 ,m生產 )進行保護。   需要說明的是,在本實施例以及下文的描述中,所指的“產品”均為同一產品,即生產方產生出的產品,比如,本說明書中的產品可以為“一批飲料”或“一個50GB的網路儲存空間”,圍繞產品的信息、密鑰、公鑰、私鑰等,均對應同一產品。   採用實施例1提供的方法,生產方利用產品的唯一暗碼,單向產生生產加密密鑰,再根據生產加密密鑰,對產品的生產信息進行加密,產生生產信息加密資料,根據生產加密密鑰,產生生產信息查詢標識,將包含生產信息查詢標識、以及生產信息加密資料的生產信息集合寫入區塊鏈。利用產品唯一暗碼除生產方和購買方以外無法獲知的特性,以及區塊鏈不可篡改不可偽造的特性,對生產信息進行加密和儲存,使得生產信息有很高的保密性。此外,還可以透過生產隨機數,進一步加强生產信息的保密性。 實施例2   基於與實施例1相同的發明思路,本實施例以流通過程中,存在生產方和購買方的情況為例,介紹基於區塊鏈的產品信息加密、解密方法,用於在產品流通過程中,對產品信息進行保密,且確保購買方能夠獲得產品信息。具體地,本實施例介紹一種基於區塊鏈的產品信息解密方法,應用於存在生產方和購買方中的購買方。該方法的流程如圖4所示,包括下述步驟:   步驟22:根據產品的唯一暗碼,單向產生生產加密密鑰。   在實施例1中已經介紹,生產方可以根據pincode,單向產生key生產加密 ,即有key生產加密 =hash(pincode),還介紹了pincode的特性,即購買方在破壞產品完整性,開始使用產品後,能夠找到pincode,所以,購買方也就可以根據pincode,單向產生key生產加密 。   在實施例1中還介紹了,為了進一步加强的key生產加密 的安全性,生產方在生產產品時,可以產生nonce生產 ,所以在一種實施方式中,本步驟可以包括:根據產品的唯一暗碼,單向產生隨機數查詢標識;從可信儲存庫中獲取與隨機數查詢標識對應的生產隨機數;根據唯一暗碼與生產隨機數的組合,單向產生生產加密密鑰。   具體地,在加入nonce生產 的情況下,key生產加密 =hash(pincode||nonce生產 ),由於生產方根據pincode產生了隨機數查詢標識hash(pincode),並將hash(pincode)以及nonce生產 共同發送至可信儲存庫,且均與為產品創建的唯一標識關聯。所以購買方也可以根據pincode,單向產生hash(pincode),可以在可信儲存庫中透過hash(pincode)查找到nonce生產 ,再單向產生key生產加密 =hash(pincode||nonce生產 ),在實施例1中介紹pincode的nonce生產 的組合,本步驟中可以透過相同的組合方式進行組合,以便產生的key生產加密 與生產方產生的key生產加密 一致。   步驟24:根據生產加密密鑰,產生生產信息查詢標識。   在實施例1中介紹了產生生產信息查詢標識的方式,本步驟中,購買方也可以按照生產方產生生產信息查詢標識的方式進行產生,確保一致性。   步驟26:根據生產信息查詢標識,從區塊鏈中讀取產品的生產信息加密資料。   在實施例中生產方將包含生產信息查詢標識以及enc(key生產加密 ,m生產 )的生產信息集合寫入區塊鏈,本步驟就可以根據生產信息查詢標識,讀取到enc(key生產加密 , m生產 )。   步驟28:根據生產加密密鑰,對生產信息加密資料進行解密,獲得生產信息。   在本步驟,根據加密函數的特性,可以根據key生產加密 ,對enc(key生產加密 ,m生產 )進行解密,獲得m生產 。由於購買方在破壞產品完整性,開始使用產品後,才能夠找到pincode。盜竊方即使得到enc(key生產加密 ,m生產 ),也由於無法得知pincode,無法進行解密,如果在加上nonce生產 的情況,由於無法得知pincode也就無法得知hash(pincode),更無法確定出key生產加密 =hash(pincode||nonce生產 )。   如圖5所示,為本方法的一個實施方式的示意圖;如圖6所示,為本方法的另一個實施例方式的示意圖,區別在於如圖6所示的實施方式中對key生產加密 的產生過程加入nonce生產 ,增加了解析m生產 的難度。   採用實施例2提供的方法,購買方利用產品的唯一暗碼,單向產生生產加密密鑰,再根據生產加密密鑰產生生產信息查詢標識,對從區塊鏈讀取到的生產信息加密資料進行解密,獲得生產信息。利用產品唯一暗碼在購買方破壞產品完整性後才能獲知的特性,以及區塊鏈不可篡改不可偽造的特性,對生產信息進行解密,使得生產信息有很高的保密性。此外,還可以透過生產隨機數,進一步加强生產信息的保密性。 實施例3   在前述兩個實施例中,已經介紹了流通過程中,存在生產方和購買方的情況,而在實際應用中,也很可能存在一個或多個流通方,即可以使產品便捷地從生產方流通到購買方,比如代理商、批發商、零售商等。而流通方也會在流通過程中,為產品產生流通信息,而流通信息中可以包含流通方的隱私信息,所以也需要進行保密,即對於對其他流通方以及竊取者而言,需要對產品信息進行保密,並確保購買方可以查看產品信息,其他流通方無法獲知生產信息以及其他流通方的流通信息。   所以基於與前述兩個實施例相同的發明思路,本實施例以流通過程中存在生產方、流通方和購買方的情況為例,介紹一種基於區塊鏈的產品信息加密、解密方法,具體地,先介紹一種基於區塊鏈的產品信息的加密方法,應用於存在生產方、流通方和購買方中的生產方。該方法的流程如圖7所示,包括下述步驟:   步驟32:根據產品的唯一暗碼,單向產生生產加密密鑰;   步驟34:根據生產加密密鑰,對該產品的生產信息進行加密,產生生產信息加密資料。   前兩步驟中,與實施例1類似,此處不再贅述,可以根據如圖2或圖3所示的實施方式產生enc(key生產加密 , m生產 )。   步驟36:根據生產加密密鑰,單向產生第1流通密鑰,再根據所述第1流通密鑰,單向產生生產信息查詢標識。   這裡所指的第1流通密鑰,可以作用於第1次序流通方進行流通,比如批發商作為生產方後的第一個流通方,那麽批發商就可以是指第1次序流通方。考慮到pincode的特性,即生產方和破壞產品完整性後的購買方才能獲知,可以以pincode作為基礎,在流通過程中進行鏈式連續產生加密密鑰。具體地,可以利用單向函數的特性,即得知結果無法逆向解析輸入的特性,根據生產加密密鑰,單向產生第1流通密鑰,該第1流通密鑰可以key 1 流通 表示。   在實施例1中已經介紹,可以將信息加密資料寫入區塊鏈,購買方可以透過key生產加密 產生生產信息查詢標識,且便於從區塊鏈中讀取enc(key生產加密 ,m生產 )。但針對流通方而言,為了達到對生產信息保密的目的,可以無需流通方獲知key生產加密 ,但流通方也需要在區塊鏈中讀取資料,所以可以為流通方也產生一個生產信息查詢標識,且避免由key生產加密 直接產生,即根據key 1 流通 ,單向產生生產信息查詢標識,可以表示為hash(key 1 流通 )。   步驟38:根據第1公鑰,對第1流通密鑰進行加密,產生第1流通密鑰加密資料,所述第1公鑰為第1次序流通方的流通公鑰。   由於是key 1 流通 透過key生產加密 產生的,而key 1 流通 又可以作用於第1次序流通方進行流通,可以考慮讓第1次序流通方獲知key 1 流通 ,但無法獲知key生產加密 ,所以可以透過第1公鑰對key 1 流通 進行加密,第1公鑰可以表示為pk1 ,可以是指第1次序流通方的流通公鑰。具體地,用第1次序流通方的pk1 對key 1 流通 進行加密,可以產生第1流通密鑰加密資料enc(pk1 ,key 1 流通 )。從而使得第1次序流通方可以根據第1私鑰sk1 進行解密。   在實際應用中,為了進一步保護產品流通過程的隱私性,可以在產生enc(pk1 ,key 1 流通 )的過程中,加入產品的公開明碼,在一種實施方式中,本步驟可以包括:根據第1公鑰,對產品的公開明碼與第1流通密鑰的組合進行加密,產生第1流通密鑰加密資料。公開明碼qcode,可以在產品外部且全域唯一,任何一方在接收到產品後,均可以獲得qcode,但對於未拿到產品的任何對象不容易獲得(比如竊取者,但也可以透過非正常手段竊取),所以可以將qcode加入到流通過程中,進一步加强流通的隱私性。具體地,可以有enc(pk1 ,qcode||key 1 流通 )。   步驟310:根據第1公鑰,單向產生第1流通密鑰查詢標識。   上一步驟中,產生了enc(pk1 ,key 1 流通 ),而為了保證資料安全性,本方法也可以將信息集合寫入區塊鏈,所以為了使第1流通方便捷地找到enc(pk1 ,key 1 流通 ),可以為流通方產生單向一個密鑰查詢標識,即第1流通密鑰查詢標識,可以表示為hash(pk1 ),以便第1流通可以透過pk1 從區塊鏈中讀取到enc(pk1 ,key 1 流通 )。   步驟312:將生產信息集合寫入區塊鏈,該生產信息集合可以包含第1接收密鑰查詢標識、生產信息查詢標識、第1接收密鑰加密資料以及生產信息加密資料。   本步驟可以將生產信息寫入區塊鏈(上鏈),以便流通方和購買方可以獲取到enc(pk1 ,key 1 流通 )以及enc(key生產加密 ,m生產 ),對於如何查找,可以透過hash(pk1 ),以及hash(key 1 流通 )。   在實際應用中,為了進一步加强隱私性,本步驟可以包括:根據生產私鑰,對生產信息集合進行簽名,該生產私鑰為生產方在生產產品時產生的私鑰;將簽名後的生產信息集合寫入區塊鏈。如圖8所示,為本方法的一個實施方式的示意圖。   採用實施例3提供的方法,在實施例1的基礎上,根據生產加密密鑰,單向產生用於流通至第1次序流通方的第1流通密鑰,再單向產生生產信息查詢標識,根據第1公鑰,對第1流通密鑰進行加密,產生第1流通密鑰加密資料,根據第1公鑰,單向產生第1流通密鑰查詢標識,將包含所述第1接收密鑰查詢標識、生產信息查詢標識、第1接收密鑰加密資料以及生產信息加密資料生產信息集合寫入區塊鏈。利用產品唯一暗碼在購買方破壞產品完整性後才能獲知的特性,以及區塊鏈不可篡改不可偽造的特性,對生產信息進行加密,使得生產信息有很高的保密性,且將生產信息寫入區塊鏈,使得下個流通方能夠透過鏈式連續加密的方式,將產品信息寫入區塊鏈。 實施例4   基於與前述兩個實施例相同的發明思路,本實施例以流通過程中存在生產方、流通方和購買方的情況為例,介紹一種基於區塊鏈的產品信息加密、解密方法,具體地,介紹一種基於區塊鏈的產品信息的加密方法,應用於存在生產方、流通方和購買方中的流通方。該方法的流程如圖9所示,包括下述步驟:   步驟42:根據第n公鑰,單向產生第n流通密鑰查詢標識。   在實施例3中,介紹了流通方公鑰的作用,本步驟可以根據pkn ,單向產生第n流通密鑰查詢標識hash(pkn ),其中,n可以是大於0的自然數,比如1、2、3、4……等。   步驟44:根據第n流通密鑰查詢標識,從區塊鏈中讀取第n接收密鑰加密資料。   如圖8所示,在將生產信息集合寫入區塊鏈時,第1次序流通方可以根據hash(pk1 ),查找到enc(pk1 ,key 1 流通 ),類似地,第n次序流通方可以根據hash(pkn ),查找到enc(pkn ,key n 流通 )。   在實施例3中已經介紹,可以實際應用中,對生產信息集合進行簽名,而對於流通方,可以有多個流通方,每個流通方均以各自的私鑰進行簽名,所以在本步驟之後,還可以包括:根據生產公鑰,對簽名後的生產信息集合進行簽名驗證;或根據第n公鑰,對簽名後的第n信息集合進行簽名驗證。當驗證成功後,再執行下個步驟。   步驟46:根據第n私鑰,對所述第n流通密鑰加密資料進行解密,得到第n流通密鑰。   在實施例3中已經介紹,第1次序流通方可以根據第1私鑰sk1 對enc(pk1 ,key 1 流通 )進行解密,類似地,本步驟中,也可以根據第n私鑰skn 對enc(pkn ,key n 流通 )進行解密。   步驟48:根據第n流通密鑰,單向產生第n加密密鑰。   在實施例3(可以參考實施例1)中介紹了根據產品的pincode,單向產生key生產加密 ,而作為流通方無法獲取到pincode,而本說明書提供的加密方法,就可以對pincode進行鏈式連續產生加密密鑰作為核心,所以本步驟中,流通方,可以根據key n 流通 ,單向產生key n 加密 ,與生產方關聯到一起,就是可以是生產方根據pincode產生key生產加密 ,而各個流通方鏈式連續產生key 1 加密 、key 2 加密 、 key 3 加密 等,即key n 加密 =hash(key n 流通 )。   在實際應用中,為了進一步加强隱私性,也可以與生產方類似,流通方也可以產生一個隨機數,所以在一種實施方式中,本步驟可以包括:接收第n次序流通方在接收產品時產生的第n隨機數;根據第n流通密鑰與所述第n隨機數的組合,單向產生第n加密密鑰。具體地,可以有 key n 加密 =hash(key n 流通 ||nonce n )。   與實施例1類似的,本步驟還可以包括:將第n隨機數發送至可信儲存庫,並與產品的唯一標識關聯,以便購買方可以透過產品的唯一標識,找到各個流通方的隨機數,而其他流通方,由於無法得知pincode,也就無法獲得其他流通方的隨機數。   步驟410:根據第n加密密鑰,對第n流通信息進行加密,產生第n流通信息加密資料。   生產方可以產生一個生產信息m生產 ,則流通方就可以在流通過程中產生各自的流通信息m n ,比如,第1次序流通方可以產生m 1 ,第1次序流通方可以產生m 2 ,等。從而本步驟可以根據key n 加密 對m n 進行加密,產生enc(key n 加密 ,m n )。   步驟412:根據第n加密密鑰,產生第n流通信息查詢標識。   在實施例1中已經介紹,產生信息查詢標識的方式,在本步驟中,也可以根據實施例1介紹的方式,由key n 加密 產生第n流通信息查詢標識。   而在實際應用中,可以有下一個流通方,則與實施例3中步驟36類似地的,本步驟還可以包括:根據第n加密密鑰,單向產生第n+1流通密鑰,再根據第n+1流通密鑰,單向產生第n流通信息查詢標識。而第n+1流通密鑰,就可以是相對於第n次序流通方而言的下一次序的流通方。即 key n+1 流通 =hash(key n 流通 ), 第n流通信息查詢標識可以是hash(key n+1 流通 ),以便第n+1次序流通方可以根據hash(key n+1 流通 ),讀取區塊鏈中的資料。   步驟414:將第n信息集合寫入區塊鏈,所述第n信息集合包含第n流通信息查詢標識以及第n流通信息加密資料。   如圖2或3所示,本步驟可以類似地,將包含第n流通信息查詢標識以及enc(key n 加密 ,m n )的第n信息集合寫入區塊鏈中。   在有下一個流通方的情況下,本步驟可以包括   根據第n+1公鑰,對第n+1流通密鑰進行加密,產生第n+1流通密鑰加密資料,該第n+1公鑰可以是第n+1次序流通方的流通公鑰;根據第n+1公鑰,單向產生第n+1流通密鑰查詢標識;將第n信息集合寫入區塊鏈,該第n信息集合包含第n+1接收密鑰查詢標識、第n流通信息查詢標識、第n+1接收密鑰加密資料以及第n流通信息加密資料。   具體地,可以是與前述類似地,   可以根據pkn+1 ,對key n+1 流通 進行加密,產生enc(pkn+1 ,key n+1 流通 ),產生hash(pkn+1 )作為第n+1流通密鑰查詢標識。將包含hash(pkn+1 )、hash(key n+1 流通 )、enc(pkn+1 ,key n+1 流通 )、以及enc(key n 加密 ,m n )的第n信息集合寫入區塊鏈。   而在實際應用中,根據第n+1公鑰,對第n+1流通密鑰進行加密,產生第n+1流通密鑰加密資料,可以包括:   根據第n+1公鑰,對產品的公開明碼與第n+1流通密鑰的組合進行加密,產生第n+1流通密鑰加密資料,即可以有enc(pkn+1 ,qcode||key n+1 流通 )。   而在實際應用中,與前述類似地,可以根據第n私鑰,對所述第n信息集合進行簽名;將簽名後的第n信息集合寫入區塊鏈,以便下個流通方可以根據公鑰進行簽名驗證。如圖10所示,為本實施例的示意圖。   採用實施例4的方法,在實施例3的生產方的基礎上,根據第n私鑰,解析出第n流通密鑰,最終將包含第n+1接收密鑰查詢標識、第n流通信息查詢標識、第n+1接收密鑰加密資料以及第n流通信息加密資料的第n信息集合寫入區塊鏈。利用產品唯一暗碼在購買方破壞產品完整性後才能獲知的特性,以及區塊鏈不可篡改不可偽造的特性,對第n流通信息進行加密,使得第n流通信息有很高的保密性,且將第n流通信息寫入區塊鏈,使得下個流通方能夠透過鏈式連續加密的方式,將產品信息寫入區塊鏈。若沒有下個流通方,也可以透過將包含第n流通信息查詢標識以及第n流通信息加密資料的第n信息集合寫入區塊鏈。 實施例5   基於與前述實施例相同的發明思路,本實施例以流通過程中存在生產方、流通方和購買方的情況為例,介紹一種基於區塊鏈的產品信息加密、解密方法,具體地,介紹一種基於區塊鏈的產品信息的加密方法,應用於存在生產方、流通方和購買方中的購買方。該方法的流程如圖11所示,包括下述步驟:   步驟52:根據產品的唯一暗碼,單向產生生產加密密鑰。   步驟54:根據生產加密密鑰,產生生產信息查詢標識。   步驟56:根據生產信息查詢標識,從區塊鏈中讀取產品的生產信息加密資料。   在一種實施方式中,本步驟可以包括:   根據唯一暗碼與生產隨機數的組合,單向產生生產加密密鑰,再單向產生第1流通密鑰,再單向產生生產信息查詢標識;根據生產信息查詢標識,從區塊鏈中讀取生產信息集合中的生產信息加密資料。   具體地,本步驟可以加入隨機數的組合,即可以有key生產加密 =hash(pincode||nonce生產 ),key 1 流通 =hash(key生產加密 ),單向產生生產信息查詢標識hash(key 1 流通 ),從而可以從區塊鏈中讀取生產信息集合中的enc( key生產加密 ,m生產 )。   步驟58:根據生產加密密鑰,對生產信息加密資料進行解密,獲得生產信息。   上述步驟與實施例2中介紹的實施方式類似,此處不再贅述。   步驟510:根據生產加密密鑰,單向產生第1流通密鑰,根據第n流通密鑰,單向產生第n加密密鑰,根據第n加密密鑰,單向產生第n+1流通密鑰。   購買方可以根據key生產加密 單向產生key 1 流通 。即 key 1 流通 =hash(key生產加密 )。根據鏈式連續產生的方式,可以根據key n 流通 產生key n 加密 ,在前文已經介紹了,可以在產生加密密鑰時,加入隨機數,所以根據第n流通密鑰,單向產生第n加密密鑰,可以包括:從可信儲存庫中獲取與隨機數查詢密鑰對應的第n隨機數;根據第n流通密鑰與第n隨機數的組合,單向產生第n加密密鑰。具體地,由於購買方獲知了pincode,所以可以單向產生隨機數查詢密鑰hash(pincode),根據前述實施例的介紹,生產方和流通方,均可以將隨機數發送至可信儲存庫,且可以與產品的唯一標識關聯,也即唯一標識可以關聯hash(pincode)、生產隨機數、以及第n隨機數,此時可以將可信儲存庫設置為,只允許透過唯一標識關聯隨機數而不能讀取,而hash(pincode)可以進行讀取,就有效防止流通方透過唯一標識獲取隨機數。而購買方透過hash(pincode)獲取到對應的第n隨機數(包括第1隨機數、第2隨機數……第n隨機數)後,就可以單向產生第n加密密鑰,可以有key n 加密 =hash(key n 流通 ||nonce n )。而對於流通密鑰,可以根據第n加密密鑰,單向產生第n+1流通密鑰,可以有key n+1 流通 =hash(key n 加密 )。具體比如,購買方在步驟52中產生了key生產加密 ,則本步驟可以有 key 1 流通 =hash(key生產加密 )、再可以產生key 1 加密 =hash(key 1 流通 ||nonce 1 )、以及還可以產生key 2 流通 =hash(key 1 加密 ),如此往復,可以得到全部的流通方的流通密鑰。   本實施例中,n可以是大於0的自然數。   步驟512:根據第n流通信息查詢標識,從區塊鏈中讀取產品的第n流通信息加密資料。   若對於最後一個流通方,可以根據第n加密密鑰,根據預設方式產生第n流通信息查詢標識,比如實施例1中步驟18介紹的方式,根據key n 加密 中特定個字元位數產生,又或結合特定個字元位數以及單向函數產生,又或對進行二次單向計算,產生第n流通信息查詢標識。   而對於非最後一個流通方而言,則本步驟可以包括:根據第n流通密鑰與所述第n隨機數的組合,單向產生第n加密密鑰,再單向產生第n+1流通密鑰,再單向產生第n流通信息查詢標識;根據第n流通信息查詢標識,從區塊鏈中讀取第n信息集合中的enc(key n 加密 ,m n )。   具體地,可以有key n 加密 =hash(key n 流通 ||nonce n ),key n+1 流通 =hash(key n 加密 ),此後可以產生第n流通信息查詢標識hash(key n+1 流通 )。如圖10所示,可以根據hash(key n+1 流通 ),從區塊鏈中讀取enc(key n 加密 ,m n )。   步驟514:根據第n加密密鑰,對第n流通信息加密資料進行解密,獲得第n流通信息。   具體地,可以與實施例2的介紹類似,根據key n 加密 ,對enc(key n 加密 ,m n )進行解密,獲取m n 。如圖12為本實施例的示意圖。   採用實施例5提供的方法,購買方利用產品的唯一暗碼,單向產生生產加密密鑰,再根據生產加密密鑰產生生產信息查詢標識,對從區塊鏈讀取到的生產信息加密資料進行解密,獲得生產信息。透過鏈式連續加密的方式,根據生產加密密鑰,產生第1流通密鑰,再產生第1加密密鑰、從而持續產生第n加密密鑰,再產生第n+1流通密鑰、第n信息查詢標識,進而根據第n加密密鑰對根據第n信息查詢標識獲取到的第n流通信息加密資料進行解密,得到第n流通信息。 實施例6   基於相同的發明構思,實施例6提供了一種基於區塊鏈的產品信息加密裝置,所述裝置可以應用於生產方,用於實現實施例1和實施例3所述的方法。該裝置的結構方塊圖如圖13所示,為該裝置的結構圖,包括:   密鑰產生單元61、資料產生單元62、標識產生單元63、資料寫入單元64,其中,   所述密鑰產生單元61,可以根據產品的唯一暗碼,單向產生生產加密密鑰;   所述資料產生單元62,可以根據所述生產加密密鑰,對所述產品的生產信息進行加密,產生生產信息加密資料;   所述標識產生單元63,可以根據所述生產加密密鑰,產生生產信息查詢標識;   所述資料傳輸單元64,可以將生產信息集合寫入區塊鏈,所述生產信息集合包含生產信息查詢標識、以及生產信息加密資料。   在一種實施方式中,所述密鑰產生單元61,可以   接收生產方在生產所述產品時產生的生產隨機數;   根據所述唯一暗碼與所述生產隨機數的組合,單向產生生產加密密鑰。   在一種實施方式中,   所述標識產生單元63,可以根據所述唯一暗碼,單向產生隨機數查詢標識;   所述資料傳輸單元64,可以   在可信儲存庫中為所述產品創建唯一標識;   將所述隨機數查詢標識以及所述生產隨機數發送至所述可信儲存庫,並均與所述唯一標識關聯。   在一種實施方式中,所述標識產生單元63,可以   根據所述生產加密密鑰,單向產生第1流通密鑰,再根據所述第1流通密鑰,單向產生生產信息查詢標識;則   所述資料產生單元62,可以   根據第1公鑰,對第1流通密鑰進行加密,產生第1流通密鑰加密資料,所述第1公鑰為第1次序流通方的流通公鑰;   根據第1公鑰,單向產生第1流通密鑰查詢標識;   所述資料傳輸單元64,可以   將生產信息集合寫入區塊鏈,所述生產信息集合包含所述第1接收密鑰查詢標識、生產信息查詢標識、第1接收密鑰加密資料以及生產信息加密資料。   在一種實施方式中,所述資料產生單元62,   根據第1公鑰,對產品的公開明碼與第1流通密鑰的組合進行加密,產生第1流通密鑰加密資料。   在一種實施方式中,所述資料傳輸單元64,可以   根據生產私鑰,對所述生產信息集合進行簽名,所述生產私鑰為生產方在生產所述產品時產生的私鑰;   將簽名後的生產信息集合寫入區塊鏈。 實施例7   基於相同的發明構思,實施例7提供了一種基於區塊鏈的產品信息加密裝置,所述裝置可以應用於流通方,用於實現實施例4所述的方法。該裝置的結構框圖如圖14所示,為該裝置的結構圖,包括:   標識產生單元71、資料讀取單元72、資料解析單元73、密鑰產生單元74、資料加密單元75、資料傳輸單元76,其中,   所述標識產生單元71,可以根據第n公鑰,單向產生第n流通密鑰查詢標識;   所述資料讀取單元72,可以根據第n流通密鑰查詢標識,從區塊鏈中讀取第n接收密鑰加密資料;   所述資料解析單元73,可以根據第n私鑰,對所述第n流通密鑰加密資料進行解密,得到第n流通密鑰;   所述密鑰產生單元74,可以根據所述第n流通密鑰,單向產生第n加密密鑰;   所述資料加密單元75,可以根據第n加密密鑰,對第n流通信息進行加密,產生第n流通信息加密資料;   根據所述第n加密密鑰,產生第n流通信息查詢標識;   所述資料傳輸單元76,可以將第n信息集合寫入區塊鏈,所述第n信息集合包含第n流通信息查詢標識以及第n流通信息加密資料;   其中,n為大於0的自然數。   在一種實施方式中,所述密鑰產生單元74,可以   接收第n次序流通方在接收產品時產生的第n隨機數;   根據所述第n流通密鑰與所述第n隨機數的組合,單向產生第n加密密鑰。   在一種實施方式中,所述資料傳輸單元76,可以   將所述第n隨機數發送至可信儲存庫,並與所述產品的唯一標識關聯。   在一種實施方式中,所述標識產生單元71,可以   根據所述第n加密密鑰,單向產生第n+1流通密鑰,再根據第n+1流通密鑰,單向產生第n流通信息查詢標識;則   所述密鑰產生單元74,可以根據第n+1公鑰,對第n+1流通密鑰進行加密,產生第n+1流通密鑰加密資料,所述第n+1公鑰為第n+1次序流通方的流通公鑰;   所述標識產生單元71,可以根據第n+1公鑰,單向產生第n+1流通密鑰查詢標識;   所述資料傳輸單元76,可以將第n信息集合寫入區塊鏈,所述第n信息集合包含所述第n+1接收密鑰查詢標識、第n流通信息查詢標識、第n+1接收密鑰加密資料以及第n流通信息加密資料。   在一種實施方式中,所述資料加密單元75,可以   根據第n+1公鑰,對產品的公開明碼與第n+1流通密鑰的組合進行加密,產生第n+1流通密鑰加密資料。   在一種實施方式中,所述資料傳輸單元76,可以   根據第n私鑰,對所述第n信息集合進行簽名;   將簽名後的第n信息集合寫入區塊鏈。   在一種實施方式中,所述資料解析單元73,可以根據第n私鑰,對所述第n流通密鑰加密資料進行解密之前,   根據生產公鑰,對簽名後的生產信息集合進行簽名驗證;或   根據第n公鑰,對簽名後的第n信息集合進行簽名驗證。 實施例8   基於相同的發明構思,實施例8提供了一種基於區塊鏈的產品信息解密裝置,所述裝置可以應用於購買方,用於實現實施例3和5所述的方法。該裝置的結構方塊圖如圖15所示,為該裝置的結構圖,包括:   密鑰產生單元81、標識產生單元82、資料讀取單元83、以及資料解析單元84,其中,   所述密鑰產生單元81,可以根據產品的唯一暗碼,單向產生生產加密密鑰;   所述標識產生單元82,可以根據所述生產加密密鑰,產生生產信息查詢標識;   所述資料讀取單元83,可以根據所述生產信息查詢標識,從區塊鏈中讀取所述產品的生產信息加密資料;   所述資料解析單元84,可以根據所述生產加密密鑰,對所述生產信息加密資料進行解密,獲得生產信息。   在一種實施方式中,   所述密鑰產生單元81,可以根據所述生產加密密鑰,單向產生第1流通密鑰,根據所述第n流通密鑰,單向產生第n加密密鑰,根據第n加密密鑰,單向產生第n+1流通密鑰;   所述資料讀取單元83,可以根據所述第n流通信息查詢標識,從區塊鏈中讀取所述產品的第n流通信息加密資料;   所述資料解析單元84,可以根據所述第n加密密鑰,對所述第n流通信息加密資料進行解密,獲得第n流通信息;   其中,n為大於0的自然數。   在一種實施方式中,   所述密鑰產生單元81,可以根據產品的唯一暗碼,單向產生隨機數查詢標識;   所述資料讀取單元83,可以從可信儲存庫中獲取與所述隨機數查詢標識對應的生產隨機數;   所述密鑰產生單元81,可以根據所述唯一暗碼與所述生產隨機數的組合,單向產生生產加密密鑰。   在一種實施方式中,   所述資料讀取單元83,從可信儲存庫中獲取與所述隨機數查詢密鑰對應的第n隨機數;   所述密鑰產生單元81,根據所述第n流通密鑰與所述第n隨機數的組合,單向產生第n加密密鑰,   其中,n為大於0的自然數。   在一種實施方式中,   所述密鑰產生單元81,根據所述唯一暗碼與所述生產隨機數的組合,單向產生生產加密密鑰,再單向產生第1流通密鑰,再單向產生生產信息查詢標識;   所述資料讀取單元83,根據所述生產信息查詢標識,從區塊鏈中讀取生產信息集合中的生產信息加密資料;則   所述密鑰產生單元81,根據所述第n流通密鑰與所述第n隨機數的組合,單向產生第n加密密鑰,再單向產生第n+1流通密鑰,再單向產生第n流通信息查詢標識;   所述資料讀取單元83,根據所述第n流通信息查詢標識,從區塊鏈中讀取第n信息集合中的第n流通信息加密資料。   圖16是本說明書的一個實施例電子設備的結構示意圖。在硬體層面,該電子設備包括處理器,可選地還包括內部匯流排、網路介面、記憶體。其中,記憶體可能包含記憶體,例如高速隨機存取記憶體(Random-Access Memory,RAM),也可能還包括非易失性記憶體(non-volatile memory),例如至少1個磁碟記憶體等。當然,該電子設備還可能包括其他業務所需要的硬體。   處理器、網路介面和記憶體可以透過內部匯流排相互連接,該內部匯流排可以是ISA(Industry Standard Architecture,工業標準架構)匯流排、PCI(Peripheral Component Interconnect,週邊部件互連標準)匯流排或EISA(Extended Industry Standard Architecture,擴展工業標準架構)匯流排等。所述匯流排可以分為位址匯流排、資料匯流排、控制匯流排等。為便於表示,圖16中僅用一個雙向箭頭表示,但並不表示僅有一根匯流排或一種類型的匯流排。   記憶體,用於存放程式。具體地,程式可以包括程式代碼,所述程式代碼包括電腦操作指令。記憶體可以包括記憶體和非易失性記憶體,並向處理器提供指令和資料。   處理器從非易失性記憶體中讀取對應的電腦程式到記憶體中然後運行,在邏輯層面上形成會話窗口中信息對話框的描繪裝置。處理器,執行記憶體所存放的程式,並具體用於執行以下操作:   根據產品的唯一暗碼,單向產生生產加密密鑰;   根據所述生產加密密鑰,對所述產品的生產信息進行加密,產生生產信息加密資料;   根據所述生產加密密鑰,產生生產信息查詢標識;   將生產信息集合寫入區塊鏈,所述生產信息集合包含生產信息查詢標識、以及生產信息加密資料。   還可以用於執行以下操作:   根據第n公鑰,單向產生第n流通密鑰查詢標識;   根據第n流通密鑰查詢標識,從區塊鏈中讀取第n接收密鑰加密資料;   根據第n私鑰,對所述第n流通密鑰加密資料進行解密,得到第n流通密鑰;   根據所述第n流通密鑰,單向產生第n加密密鑰;   根據第n加密密鑰,對第n流通信息進行加密,產生第n流通信息加密資料;   根據所述第n加密密鑰,產生第n流通信息查詢標識;   將第n信息集合寫入區塊鏈,所述第n信息集合包含第n流通信息查詢標識以及第n流通信息加密資料;   其中,n為大於0的自然數。   還可以用於執行以下操作:   根據產品的唯一暗碼,單向產生生產加密密鑰;   根據所述生產加密密鑰,產生生產信息查詢標識;   根據所述生產信息查詢標識,從區塊鏈中讀取所述產品的生產信息加密資料;   根據所述生產加密密鑰,對所述生產信息加密資料進行解密,獲得生產信息。   上述如本說明書圖16所示實施例提供的業務反饋裝置執行的方法可以應用於處理器中,或者由處理器實現。處理器可能是一種積體電路晶片,具有信號的處理能力。在實現過程中,上述方法的各步驟可以透過處理器中的硬體的集成邏輯電路或者軟體形式的指令完成。上述的處理器可以是通用處理器,包括中央處理器(Central Processing Unit,CPU)、網路處理器(Network Processor,NP)等;還可以是數位信號處理器(Digital Signal Processor,DSP)、專用積體電路(Application Specific Integrated Circuit,ASIC)、場可程式閘陣列(Field-Programmable Gate Array,FPGA)或者其他可程式邏輯裝置、分立閘或者電晶體邏輯裝置、分立硬體組件。可以實現或者執行本說明書實施例中的公開的各方法、步驟及邏輯方塊圖。通用處理器可以是微處理器或者該處理器也可以是任何常見的處理器等。結合本說明書實施例所公開的方法的步驟可以直接體現為硬體譯碼處理器執行完成,或者用譯碼處理器中的硬體及軟體模組組合執行完成。軟體模組可以位於隨機記憶體,快閃記憶體、唯讀記憶體,可程式唯讀記憶體或者電可抹除可程式記憶體、暫存器等本領域成熟的儲存媒體中。該儲存媒體位於記憶體,處理器讀取記憶體中的信息,結合其硬體完成上述方法的步驟。   該電子設備還可執行圖13至圖15中的基於區塊鏈的產品信息加密、解密裝置執行的方法,並實現基於區塊鏈的產品信息加密、解密裝置在圖16所示實施例的功能,本說明書實施例在此不再贅述。   本說明書實施例還提出了一種電腦可讀儲存媒體,該電腦可讀儲存媒體儲存一個或多個程式,該一個或多個程式包括指令,該指令當被包括多個應用程式的電子設備執行時,能夠使該電子設備執行圖16所示實施例中業務反饋裝置執行的方法,並具體用於執行:   根據產品的唯一暗碼,單向產生生產加密密鑰;   根據所述生產加密密鑰,對所述產品的生產信息進行加密,產生生產信息加密資料;   根據所述生產加密密鑰,產生生產信息查詢標識;   將生產信息集合寫入區塊鏈,所述生產信息集合包含生產信息查詢標識、以及生產信息加密資料。   還可以用於執行:   根據第n公鑰,單向產生第n流通密鑰查詢標識;   根據第n流通密鑰查詢標識,從區塊鏈中讀取第n接收密鑰加密資料;   根據第n私鑰,對所述第n流通密鑰加密資料進行解密,得到第n流通密鑰;   根據所述第n流通密鑰,單向產生第n加密密鑰;   根據第n加密密鑰,對第n流通信息進行加密,產生第n流通信息加密資料;   根據所述第n加密密鑰,產生第n流通信息查詢標識;   將第n信息集合寫入區塊鏈,所述第n信息集合包含第n流通信息查詢標識以及第n流通信息加密資料;   其中,n為大於0的自然數。   還可以用於執行:   根據產品的唯一暗碼,單向產生生產加密密鑰;   根據所述生產加密密鑰,產生生產信息查詢標識;   根據所述生產信息查詢標識,從區塊鏈中讀取所述產品的生產信息加密資料;   根據所述生產加密密鑰,對所述生產信息加密資料進行解密,獲得生產信息。   上述實施例闡明的系統、裝置、模組或單元,具體可以由電腦晶片或實體實現,或者由具有某種功能的產品來實現。一種典型的實現設備為電腦。具體的,電腦例如可以為個人電腦、膝上型電腦、蜂巢式電話、相機電話、智慧電話、個人數位助理、媒體播放器、導航設備、電子郵件設備、遊戲控制台、平板電腦、穿戴式設備或者這些設備中的任何設備的組合。   為了描述的方便,描述以上裝置時以功能分為各種單元分別描述。當然,在實施本說明書時可以把各單元的功能在同一個或多個軟體和/或硬體中實現。   本領域內的技術人員應明白,本說明書的實施例可提供為方法、系統、或電腦程式產品。因此,本說明書可採用完全硬體實施例、完全軟體實施例、或結合軟體和硬體方面的實施例的形式。而且,本說明書可採用在一個或多個其中包含有電腦可用程式碼的電腦可用儲存媒體(包括但不限於磁碟記憶體、CD-ROM、光學記憶體等)上實施的電腦程式產品的形式。   本說明書是參照根據本說明書實施例的方法、設備(系統)、和電腦程式產品的流程圖和/或方塊圖來描述的。應理解可由電腦程式指令實現流程圖和/或方塊圖中的每一流程和/或方塊、以及流程圖和/或方塊圖中的流程和/或方塊的結合。可提供這些電腦程式指令到通用電腦、專用電腦、嵌入式處理機或其他可程式資料處理設備的處理器以產生一個機器,使得透過電腦或其他可程式資料處理設備的處理器執行的指令產生用於實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方塊中指定的功能的裝置。   這些電腦程式指令也可儲存在能引導電腦或其他可程式資料處理設備以特定方式工作的電腦可讀記憶體中,使得儲存在該電腦可讀記憶體中的指令產生包括指令裝置的製造品,該指令裝置實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方塊中指定的功能。   這些電腦程式指令也可裝載到電腦或其他可程式資料處理設備上,使得在電腦或其他可程式設備上執行一系列操作步驟以產生電腦實現的處理,從而在電腦或其他可程式設備上執行的指令提供用於實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方塊中指定的功能的步驟。   在一個典型的配置中,計算設備包括一個或多個處理器(CPU)、輸入/輸出介面、網路介面和記憶體。   記憶體可能包括電腦可讀媒體中的非永久性記憶體,隨機存取記憶體(RAM)和/或非易失性記憶體等形式,如唯讀記憶體(ROM)或快閃記憶體(flash RAM)。記憶體是電腦可讀媒體的示例。   電腦可讀媒體包括永久性和非永久性、可移動和非可移動媒體可以由任何方法或技術來實現信息儲存。信息可以是電腦可讀指令、資料結構、程式的模組或其他資料。電腦的儲存媒體的例子包括,但不限於相變記憶體(PRAM)、靜態隨機存取記憶體(SRAM)、動態隨機存取記憶體(DRAM)、其他類型的隨機存取記憶體(RAM)、唯讀記憶體(ROM)、電可抹除可程式唯讀記憶體(EEPROM)、快閃記憶體或其他記憶體技術、唯讀光碟唯讀記憶體(CD-ROM)、數位多功能光碟(DVD)或其他光學儲存、磁盒式磁帶,磁帶磁碟儲存或其他磁性儲存設備或任何其他非傳輸媒體,可用於儲存可以被計算設備存取的信息。按照本文中的界定,電腦可讀媒體不包括暫存電腦可讀媒體(transitory media),如調變的資料信號和載波。   還需要說明的是,術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、方法、商品或者設備不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、方法、商品或者設備所固有的要素。在沒有更多限制的情況下,由語句“包括一個……”限定的要素,並不排除在包括所述要素的過程、方法、商品或者設備中還存在另外的相同要素。   本領域技術人員應明白,本說明書的實施例可提供為方法、系統或電腦程式產品。因此,本說明書可採用完全硬體實施例、完全軟體實施例或結合軟體和硬體方面的實施例的形式。而且,本說明書可採用在一個或多個其中包含有電腦可用程式代碼的電腦可用儲存媒體(包括但不限於磁碟記憶體、CD-ROM、光學記憶體等)上實施的電腦程式產品的形式。   本說明書可以在由電腦執行的電腦可執行指令的一般上下文中描述,例如程式模組。一般地,程式模組包括執行特定任務或實現特定抽象資料類型的歷程、程式、對象、組件、資料結構等等。也可以在分散式計算環境中實踐本說明書,在這些分散式計算環境中,由透過通信網路而被連接的遠程處理設備來執行任務。在分散式計算環境中,程式模組可以位於包括儲存設備在內的本地和遠程電腦儲存媒體中。   本說明書中的各個實施例均採用遞進的方式描述,各個實施例之間相同相似的部分互相參見即可,每個實施例重點說明的都是與其他實施例的不同之處。尤其,對於系統實施例而言,由於其基本相似於方法實施例,所以描述的比較簡單,相關之處參見方法實施例的部分說明即可。   以上所述僅為本說明書的實施例而已,並不用於限制本說明書。對於本領域技術人員來說,本說明書可以有各種更改和變化。凡在本說明書的精神和原理之內所作的任何修改、等同替換、改進等,均應包含在本說明書的申請專利範圍之內。In order to make the purpose, technical solutions and advantages of this description more clear, the technical solutions of this description will be described clearly and completely in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, but not all the embodiments. Based on the embodiments in this specification, other embodiments obtained by persons of ordinary skill in the art without making creative efforts fall within the scope of protection of this specification. The technical solutions provided by the embodiments in this specification will be described in detail below in conjunction with the drawings. Example 1 As mentioned above, in the entire circulation process of a product, any party except the buyer will generate a product information for the product, for example, the manufacturer (product manufacturer) can generate a production information for the product during the production process (Can include characteristic information of the product, manufacturer, etc.), and the circulation party can generate a circulation information after receiving the product (may include the circulation party's time, price, address and other characteristic information), these information are concatenated together, can be The basis for tracing the product, tracing can refer to tracking the entire circulation process of a specific product from production, through intermediate links such as circulation, to the purchaser. For non-purchasers and producers (circulators and thieves), both need to keep product information confidential and ensure that the buyer can view the product information, so it is necessary to provide a scheme for keeping the product information generated by all parties confidential. , And ensure that the buyer can trace the source of the product. This manual provides a blockchain-based product information encryption and decryption method, used to keep product information confidential during product circulation and ensure that buyers can obtain product information. This method can be applied to the situation where there is a producer and a buyer in the circulation process, or it can be applied to the situation where there is a buyer, one or more circulation parties, and a buyer during the circulation process. In this embodiment 1, taking the case of a producer and a buyer as an example, a method of encrypting product information is introduced. Specifically, a product information encryption method based on blockchain is introduced first, which is applied to producers existing in producers and buyers. The flow of this method is shown in Figure 1. It includes the following steps: Step 12: Generate a production encryption key unidirectionally according to the product's unique password; Fang destroys the integrity of the product and can only find the unique password after starting to use the product. The meaning of the unique password of the product is that except for the manufacturer and the buyer, the unique password of the product cannot be obtained. For example, for bottled beverages, only when the cap is opened, that is, the integrity of the product is destroyed, can the unique code of the product be found from the inside of the cap. Therefore, as the producer, the unique password can be used as the basis to encrypt the product information, so that only the purchaser can find the unique password after starting to use it after destroying the integrity of the product. Specifically, the production encryption key can be generated for the unique password of the product through a one-way function, where the one-way function can refer to the calculation of the output for any input, but the input cannot be determined by the known output, or through the one-way function The hash function method generates the production encryption key for the unique password of the product. The one-way hash function, also known as the one-way hash function and hash function, is to change the input message string of any length into an output string of fixed length and It is difficult to get a function of the input string from the output string. Therefore, in the case where the unique password cannot be obtained, the production encryption key cannot be determined. Here the unique password can be represented by pincode, and the one-way function can be represented by hash, then the production encryption key generated unidirectionally according to the product unique password can be represented by keyProduction encryption Said, you can have the keyProduction encryption = hash (pincode) expression. In practical applications, in order to further strengthen the keyProduction encryption In one embodiment, this step may include: receiving the production random number generated by the producer when producing the product; according to the combination of the unique password and the production random number, unidirectionally generating the production encryption key. Specifically, the producer can generate a production random number when producing the product. The production random number can be used for unidirectional calculation of the pincode, and the nonce can be used to generate the random number.produce Said. The combination of the unique password and the random number can be (pincode || nonceproduce ) Means that there can be a keyProduction encryption = hash (pincode || nonceproduce ), It should be noted that the pincode and nonce referred to hereproduce The combination can be a simple string of characters in series, that is, the pincode string is in front, nonceproduce After the character string, it can also be a preset character string interspersed in series, for example, pincode can have a 6-bit character string, and nonceproduce There can be a 4-bit character string, the default character string interspersed in series can be the first 3 bits of the pincode + nonceproduce First 2 digits + last 3 digits of pincode + nonceproduce The last two, wait. Step 14: According to the production encryption key, the production information of the product is encrypted to produce production information encrypted data. Due to the production encryption key generated in the previous stepProduction encryption Need pincode support, but no one can get the pincode except the buyer, so this step can be based on the keyProduction encryption Encrypt the production information of the product to produce encrypted information of the production information. Specifically, the production information may refer to the product information generated by the manufacturer when producing the product, where the product information can be represented by m, then the production information can be transmitted by mproduce Said. In practical applications, it is usually necessary to protect mproduce The privacy of can also be understood as protecting the privacy of the producer, so the production information is encrypted according to the pincode that is not known to the purchaser, and the security is very high. For encryption, it can be achieved through an encryption function. The encryption function enc can refer to a function that encrypts information. There are two inputs in the function, a key and information. After encryption, information encryption data can be generated (in this embodiment, the encrypted The information is the product information m), which can be represented by enc (encryption key key, product information m). However, for the information encryption data enc obtained, but the key is unknown, m cannot be parsed; for the enc and m obtained, the key cannot be known. If the key here is an asymmetric key, then enc is asymmetric encryption; If the key is a symmetric key, then enc is symmetric encryption. In the case of asymmetric encryption, there may be a public key pk and a private key sk. In this step, the encrypted data of production information can be expressed as enc (keyProduction encryption , Mproduce ). Has been introduced above, keyProduction encryption It can be generated unidirectionally by pincode or pincode || nonceproduce Unidirectional generation, visible in joining nonceproduce Case, pincode and nonceproduce Is to get the keyProduction encryption The key, and pincode can only be obtained by the purchaser, so in order to achieve protection nonceproduce For the purpose of this method, this method may also include: Generating a random number query identifier based on the unique password; creating a unique identifier for the product in the trusted repository; sending the random number query identifier and the production random number to the trusted repository, They are all associated with unique identifiers. Specifically, in order to achieve protection nonceproduce For the purpose, you can use the nonceproduce Sent to a trusted repository when the buyer needs to generate a keyProduction encryption , And for enc (keyProduction encryption , Mproduce ) When decrypting, you can find the nonce from the trusted repositoryproduce . The trusted repository can be a highly secure national institution or enterprise. In the trusted repository, production random numbers for different products can be stored, so a unique identifier can be created for different products. For how to find the nonceproduce , According to the unique password, one-way random number query identifier hash (pincode), in the nonceproduce When sending to a trusted repository, you can hash (pincode) and nonceproduce Commonly sent to the trusted repository, and are all associated with a unique identifier, so that the buyer can find the nonce through the hash (pincode)produce . While joining nonceproduce In the case of keyProduction encryption = hash (pincode || nonceproduce ), For random number query identifier hash (pincode), it will not affect the keyProduction encryption safety. According to the premise of this embodiment, in the process of product circulation, there are only producers and purchasers, in actual application, the producer can enc (keyProduction encryption , Mproduce ) Sent to the buyer for the buyer to resolve mproduce . Step 16: According to the production encryption key, generate the production information query identifier. Step 18: Write the production information set into the blockchain. The production information set may include the production information query identifier and the production information encryption material. Blockchain can be a chain data structure that combines data blocks in a chronological order in a sequential manner, and is a tamper-proof and unforgeable decentralized database guaranteed by cryptography. While enc (keyProduction encryption , Mproduce ) Write to the blockchain, which can effectively prevent tampering and forgery, and has high security and privacy. Because there are a lot of data in the blockchain, in order to enable the buyer to quickly find the enc (keyProduction encryption , Mproduce ), According to the keyProduction encryption , To generate a production information query identifier, for example, it can be generated through a one-way function, or according to the keyProduction encryption The number of digits in a specific character is generated, or it is generated in combination with the number of digits in a specific character and a one-way function, or a second one-way calculation is performed to produce a production information query identifier. Can include production information query identifier and enc (keyProduction encryption , Mproduce ) The production information set is written into the blockchain so that the buyer can read it. As shown in FIG. 2, it is a schematic diagram of one embodiment of the method; as shown in FIG. 3, it is a schematic diagram of another embodiment of the method, the difference is that in the embodiment shown in FIG. 3Production encryption Join nonceproduce , More conducive to enc (keyProduction encryption , Mproduce ) For protection. It should be noted that in this embodiment and the following description, the "products" refer to the same product, that is, the product produced by the manufacturer. For example, the product in this specification may be "a batch of beverages" or " A 50GB network storage space ", around the product information, key, public key, private key, etc., all correspond to the same product. Using the method provided in Example 1, the manufacturer uses the unique password of the product to generate a production encryption key unidirectionally, and then encrypts the production information of the product according to the production encryption key, generates production information encryption data, and generates the production encryption key To generate a production information query identifier, and write the production information collection containing the production information query identifier and the encrypted information of the production information into the blockchain. The unique password of the product is not known except the producer and the buyer, and the blockchain cannot be tampered with or forged. The production information is encrypted and stored, making the production information highly confidential. In addition, the confidentiality of production information can be further enhanced by producing random numbers. Embodiment 2 Based on the same inventive idea as Embodiment 1, this embodiment takes the case where there are producers and purchasers in the circulation process as an example to introduce a blockchain-based product information encryption and decryption method, which is used in product circulation During the process, the product information is kept confidential and the purchaser can obtain the product information. Specifically, this embodiment introduces a method for decrypting product information based on a blockchain, which is applied to a buyer existing in a producer and a buyer. The flow of this method is shown in Fig. 4 and includes the following steps: Step 22: According to the unique password of the product, a production encryption key is generated unidirectionally. Has been introduced in Example 1, the producer can generate the key unidirectionally according to the pincodeProduction encryption , There is a keyProduction encryption = hash (pincode), also introduces the characteristics of pincode, that is, the buyer can find the pincode after destroying the integrity of the product and starting to use the product, so the buyer can also generate the key unidirectionally according to the pincodeProduction encryption . Also introduced in Example 1, for further strengthening of the keyProduction encryption Security, when the manufacturer produces a product, it can produce a nonceproduce , So in one embodiment, this step may include: generating a random number query identifier unidirectionally according to the product's unique password; obtaining a production random number corresponding to the random number query identifier from a trusted repository; based on the unique password and production The combination of random numbers generates the production encryption key in one direction. Specifically, join the nonceproduce In the case of keyProduction encryption = hash (pincode || nonceproduce ), Because the producer generates a random number query identifier hash (pincode) according to pincode, and combines hash (pincode) and nonceproduce Commonly sent to a trusted repository, and all are associated with a unique identifier created for the product. Therefore, the buyer can also generate a hash (pincode) unidirectionally according to the pincode, and can find the nonce through the hash (pincode) in the trusted repositoryproduce , And then generate the key unidirectionallyProduction encryption = hash (pincode || nonceproduce ), Introducing the nonce of pincode in Example 1produce The combination of this step can be combined through the same combination in this step in order to generate the keyProduction encryption The key generated by the producerProduction encryption Consistent. Step 24: According to the production encryption key, produce the production information query identifier. In the first embodiment, the method of generating the production information query mark is introduced. In this step, the purchaser can also generate the production information query mark by the producer to ensure consistency. Step 26: According to the production information query identifier, read the production production encrypted data of the product from the blockchain. In the embodiment, the producer will include the production information query identifier and enc (keyProduction encryption , Mproduce ) The production information set is written into the blockchain. In this step, the identifier can be queried according to the production information, and the enc (keyProduction encryption , Mproduce ). Step 28: According to the production encryption key, decrypt the encrypted information of the production information to obtain the production information. In this step, according to the characteristics of the encryption function, you canProduction encryption , For enc (keyProduction encryption , Mproduce ) To decrypt and get mproduce . Because the buyer is destroying the integrity of the product, the pincode can only be found after starting to use the product. Even if the theft party gets the enc (keyProduction encryption , Mproduce ), Because of the inability to know the pincode, it cannot be decrypted, if you add nonceproduce Situation, because the pincode cannot be known, the hash (pincode) cannot be known, and the key cannot be determined.Production encryption = hash (pincode || nonceproduce ). Is shown in FIG. 5 as a schematic diagram of one embodiment of the method; as shown in FIG. 6 is a schematic diagram of another embodiment of the method, the difference is that in the embodiment shown in FIG. 6Production encryption Join nonceproduce , Added resolution mproduce Difficulty. Using the method provided in Example 2, the purchaser uses the unique password of the product to generate a production encryption key unidirectionally, and then generates a production information query identifier according to the production encryption key, and performs encryption on the production information read from the blockchain Decrypt to obtain production information. The unique password of the product can only be known after the buyer destroys the integrity of the product, and the blockchain cannot be tampered with or forged. The production information is decrypted, making the production information highly confidential. In addition, the confidentiality of production information can be further enhanced by producing random numbers. Embodiment 3 In the foregoing two embodiments, it has been introduced that there are producers and buyers in the circulation process, and in practical applications, there may also be one or more circulation parties, which can make the product convenient From the producer to the buyer, such as agents, wholesalers, retailers, etc. The circulation party also generates circulation information for the product during the circulation process, and the circulation information can contain the circulation party's privacy information, so it also needs to be kept confidential, that is, for other circulation parties and stolen, the product information Keep it confidential and ensure that the purchaser can view the product information, and other circulation parties cannot obtain the production information and the circulation information of other circulation parties. Therefore, based on the same inventive ideas as the previous two embodiments, this embodiment takes a case where there are producers, distributors, and purchasers in the circulation process as an example to introduce a method for encrypting and decrypting product information based on blockchain, specifically , First introduces a method of encryption of product information based on blockchain, which is applied to producers among producers, distributors and purchasers. The flow of this method is shown in FIG. 7 and includes the following steps: Step 32: unidirectionally generate a production encryption key based on the product's unique password; Step 34: encrypt the production information of the product based on the production encryption key, Produce encrypted information of production information. The first two steps are similar to Embodiment 1, and are not repeated here. The enc (key can be generated according to the implementation shown in FIG. 2 or FIG. 3Production encryption , Mproduce ). Step 36: According to the production encryption key, unidirectionally generate the first circulation key, and then according to the first circulation key, unidirectionally generate the production information query mark. The first circulation key mentioned here can be used to circulate the first order circulation party. For example, if the wholesaler is the first circulation party after the producer, then the wholesaler can refer to the first order circulation party. Taking into account the characteristics of pincode, that is, the producer and the buyer who destroys the integrity of the product can be informed, you can use pincode as the basis to continuously generate encryption keys in the chain during the circulation process. Specifically, the characteristics of the one-way function can be used, that is, the characteristic that the result cannot be reversely analyzed, and the first circulation key can be generated unidirectionally according to the production encryption key. The first circulation key can be keyFirst 1 Circulation Said. Has been introduced in Example 1, you can write encrypted information to the blockchain, the buyer can use the keyProduction encryption Generate production information query identifier, and facilitate reading enc (keyProduction encryption , Mproduce ). However, for the circulation party, in order to achieve the purpose of keeping the production information confidential, it is not necessary for the circulation party to obtain the keyProduction encryption , But the circulation party also needs to read the data in the blockchain, so it can also generate a production information query identifier for the circulation party, and avoid the keyProduction encryption Directly generated, that is, according to the keyFirst 1 Circulation , A one-way production information query identifier can be expressed as hash (keyFirst 1 Circulation ). Step 38: Encrypt the first circulation key according to the first public key to generate the first circulation key encrypted data. The first public key is the circulation public key of the first order circulation party. Because it is a keyFirst 1 Circulation By keyProduction encryption Generated, and keyFirst 1 Circulation It can also act on the first-order circulation party to circulate. You can consider letting the first-order circulation party know the keyFirst 1 Circulation , But the key cannot be obtainedProduction encryption , So you can pair the key with the first public keyFirst 1 Circulation Encrypted, the first public key can be expressed as pk1 , May refer to the circulation public key of the first order circulation party. Specifically, using the pk of the first order distributor1 Pair keyFirst 1 Circulation Encryption can generate the first circulation key encrypted data enc (pk1 , KeyFirst 1 Circulation ). So that the first order circulation party can use the first private key sk1 To decrypt. In practical applications, in order to further protect the privacy of the product circulation process, you can generate enc (pk1 , KeyFirst 1 Circulation ), The product ’s public clear code is added. In one embodiment, this step may include: encrypting the combination of the product ’s public clear code and the first circulation key according to the first public key to generate the first circulation key Encrypt data. The publicly available qcode can be external to the product and unique in the whole area. After receiving the product, either party can obtain the qcode, but it is not easy to obtain for any object that has not received the product (such as a stealer, but it can also be stolen through abnormal means ), So qcode can be added to the circulation process to further enhance the privacy of circulation. Specifically, there can be enc (pk1 , Qcode || keyFirst 1 Circulation ). Step 310: According to the first public key, unidirectionally generate the first circulation key query identifier. In the previous step, enc (pk1 , KeyFirst 1 Circulation ), And in order to ensure the security of the data, this method can also write the information set to the blockchain, so in order to make the first circulation party find enc (pk1 , KeyFirst 1 Circulation ), Can generate a one-way key query identifier for the circulation party, that is, the first circulation key query identifier, which can be expressed as hash (pk1 ) So that the first circulation can pass through pk1 Read from the blockchain to enc (pk1 , KeyFirst 1 Circulation ). Step 312: Write the production information set into the blockchain. The production information set may include the first received key query identifier, the production information query identifier, the first received key encrypted data, and the production information encrypted data. This step can write production information to the blockchain (uplink), so that the circulation and purchasers can obtain enc (pk1 , KeyFirst 1 Circulation ) And enc (keyProduction encryption , Mproduce ), For how to find, you can use hash (pk1 ), And hash (keyFirst 1 Circulation ). In practical applications, in order to further enhance privacy, this step may include: signing the production information set according to the production private key, which is the private key generated by the producer when producing the product; the signed production information The collection is written to the blockchain. As shown in FIG. 8, it is a schematic diagram of an embodiment of the method. Using the method provided in Embodiment 3, on the basis of Embodiment 1, based on the production encryption key, unidirectionally generate the first circulation key for circulation to the first order circulation party, and then unidirectionally generate the production information query identifier, According to the first public key, the first circulation key is encrypted to generate the first circulation key encrypted data, and according to the first public key, the first circulation key query identifier is generated unidirectionally, which will contain the first receiving key The query identifier, the production information query identifier, the first received key encrypted data, and the production information encrypted data The production information set is written into the blockchain. The unique password of the product can only be known after the buyer destroys the integrity of the product, and the blockchain cannot be tampered with or forged. The production information is encrypted, so that the production information is highly confidential and the production information is written. The blockchain allows the next circulation party to write product information into the blockchain through continuous chain encryption. Embodiment 4 Based on the same inventive ideas as the previous two embodiments, this embodiment introduces a case where there are producers, distributors, and purchasers in the circulation process as an example to introduce a method for encrypting and decrypting product information based on blockchain Specifically, an encryption method of product information based on blockchain is introduced, which is applied to the circulators among the producer, circulator, and purchaser. The flow of the method is shown in FIG. 9 and includes the following steps: Step 42: According to the nth public key, generate the nth circulation key query identifier unidirectionally. In Example 3, the role of the public key of the circulation party is introduced. This step can be based on pkn , One-way generation of the nth circulation key query identifier hash (pkn ), Where n can be a natural number greater than 0, such as 1, 2, 3, 4 ... etc. Step 44: According to the nth circulation key query identifier, read the nth received key encrypted data from the blockchain. As shown in Figure 8, when writing production information sets to the blockchain, the first order circulation party can use the hash (pk1 ), Find enc (pk1 , KeyFirst 1 Circulation ), Similarly, the nth order circulation party can use hash (pkn ), Find enc (pkn , KeyFirst n Circulation ). It has been introduced in Embodiment 3, and it can be used to sign the production information set in practical application. For the circulation party, there can be multiple circulation parties, and each circulation party signs with its own private key, so after this step , May also include: performing signature verification on the signed production information set according to the production public key; or performing signature verification on the signed nth information set according to the nth public key. When the verification is successful, perform the next step. Step 46: Decrypt the n-th circulation key encrypted data according to the n-th private key to obtain the n-th circulation key. Has been introduced in Embodiment 3, the first order circulation party can use the first private key sk1 For enc (pk1 , KeyFirst 1 Circulation ) Decryption, similarly, in this step, you can also use the nth private key skn For enc (pkn , KeyFirst n Circulation ) To decrypt. Step 48: According to the nth circulation key, generate the nth encryption key unidirectionally. In Example 3 (refer to Example 1), according to the pincode of the product, the key is generated unidirectionallyProduction encryption However, as the circulation party cannot obtain the pincode, and the encryption method provided in this manual can continuously generate the encryption key for the pincode chain as the core, so in this step, the circulation partyFirst n Circulation , Generate key unidirectionallyFirst n encryption , Associated with the producer, that is, the producer can generate the key according to the pincodeProduction encryption , And each circulation chain continuously generates keysFirst 1 encryption , KeyFirst 2 encryption , KeyFirst 3 encryption Etc. ie keyFirst n encryption = hash (keyFirst n Circulation ). In practical applications, in order to further enhance privacy, it may be similar to the producer, and the circulation party may also generate a random number, so in one embodiment, this step may include: receiving the nth order circulation party generates when receiving the product Random number of the nth; according to the combination of the nth circulation key and the nth random number, the nth encryption key is generated unidirectionally. Specifically, there can be a keyFirst n encryption = hash (keyFirst n Circulation || nonceFirst n ). Similar to Embodiment 1, this step may also include: sending the nth random number to the trusted storage and associated with the unique identifier of the product, so that the purchaser can find the random number of each circulation party through the unique identifier of the product , And other circulation parties, because they cannot know the pincode, they cannot obtain the random numbers of other circulation parties. Step 410: Encrypt the nth circulation information according to the nth encryption key, and generate the nth circulation information encrypted data. The producer can produce a production information mproduce , Then the circulation party can generate its own circulation information in the circulation process mFirst n , For example, the first order circulation party can produce mFirst 1 , The first order circulation party can produce mFirst 2 ,Wait. Thus this step can be based on the keyFirst n encryption To mFirst n Encrypt to generate enc (keyFirst n encryption , MFirst n ). Step 412: According to the nth encryption key, generate the nth circulation information query mark. Has been introduced in Embodiment 1, the way to generate the information query identifier, in this step, it can alsoFirst n encryption Generate the nth circulation information query mark. In practical applications, there may be a next circulation party, similar to step 36 in Embodiment 3, this step may further include: generating the n + 1th circulation key unidirectionally according to the nth encryption key, and then According to the n + 1th circulation key, the nth circulation information query mark is generated unidirectionally. The n + 1th circulation key may be the next order circulation party relative to the nth order circulation party. KeyFirst n + 1 Circulation = hash (keyFirst n Circulation ), The nth circulation information query identifier can be hash (keyFirst n + 1 Circulation ), So that the n + 1th order circulation party can follow the hash (keyFirst n + 1 Circulation ), Read the data in the blockchain. Step 414: Write the nth information set into the blockchain, the nth information set contains the nth circulation information query mark and the nth circulation information encrypted data. As shown in Figure 2 or 3, this step can similarly include the nth circulation information query mark and enc (keyFirst n encryption , MFirst n ) The nth information set is written into the blockchain. In the case where there is a next circulation party, this step may include encrypting the n + 1th circulation key according to the n + 1th public key to generate n + 1th circulation key encrypted data, the n + 1th public key The key can be the circulation public key of the n + 1th circulation party; according to the n + 1th public key, the n + 1th circulation key query identifier is generated unidirectionally; the nth information set is written into the blockchain, the nth The information set includes the n + 1th received key query mark, the nth circulation information query mark, the n + 1th reception key encrypted data, and the nth circulation information encrypted data. Specifically, it may be similar to the foregoing, may be based on pkn + 1 , For keyFirst n + 1 Circulation Encrypt to generate enc (pkn + 1 , KeyFirst n + 1 Circulation ), Generate hash (pkn + 1 ) As the n + 1th circulation key query identifier. Will contain hash (pkn + 1 ), Hash (keyFirst n + 1 Circulation ), Enc (pkn + 1 , KeyFirst n + 1 Circulation ), And enc (keyFirst n encryption , MFirst n ) The nth information set is written into the blockchain. In practice, according to the n + 1th public key, the n + 1th circulation key is encrypted to generate the n + 1th circulation key encryption data, which may include: According to the n + 1th public key, the Encrypt the combination of the public clear code and the n + 1th circulation key to generate the n + 1th circulation key encrypted data, that is, there can be enc (pkn + 1 , Qcode || keyFirst n + 1 Circulation ). In practical applications, similar to the foregoing, the nth information set can be signed based on the nth private key; the signed nth information set is written into the blockchain so that the next circulation party can Signature verification. As shown in FIG. 10, it is a schematic diagram of this embodiment. Using the method of Embodiment 4, on the basis of the producer of Embodiment 3, the nth circulation key is parsed based on the nth private key, which will eventually include the n + 1th received key query identifier and the nth circulation information query The nth information set of the logo, the n + 1th received key encrypted data, and the nth circulating information encrypted data is written into the blockchain. The unique password of the product can only be known after the buyer destroys the integrity of the product, and the blockchain cannot be tampered with or forged. The nth circulation information is encrypted, so that the nth circulation information has high confidentiality and will be The nth circulation information is written into the blockchain, so that the next circulation party can write product information into the blockchain through continuous chain encryption. If there is no next circulation party, the nth information set including the nth circulation information query mark and the nth circulation information encrypted data can also be written into the blockchain. Embodiment 5 Based on the same inventive idea as the previous embodiment, this embodiment takes a case where there are producers, distributors and purchasers in the circulation process as an example to introduce a blockchain-based product information encryption and decryption method, specifically , Introduce a method of encryption of product information based on blockchain, which is applied to buyers who exist in producers, distributors and buyers. The flow of the method is shown in FIG. 11 and includes the following steps: Step 52: According to the unique password of the product, a production encryption key is generated unidirectionally. Step 54: According to the production encryption key, produce the production information query identifier. Step 56: According to the production information query identifier, read the production information encrypted data of the product from the blockchain. In an embodiment, this step may include: According to the combination of the unique password and the production random number, unidirectionally generate the production encryption key, then unidirectionally generate the first circulation key, and unidirectionally generate the production information query identifier; according to the production Information query identification, read the production information encrypted data in the production information collection from the blockchain. Specifically, a random number combination can be added in this step, that is, there can be a keyProduction encryption = hash (pincode || nonceproduce ), KeyFirst 1 Circulation = hash (keyProduction encryption ), A one-way production information query identifier hash (keyFirst 1 Circulation ), So that the enc (key in the production information set can be read from the blockchainProduction encryption , Mproduce ). Step 58: According to the production encryption key, decrypt the encrypted information of the production information to obtain the production information. The above steps are similar to the implementation described in Embodiment 2, and will not be repeated here. Step 510: Generate the first circulation key unidirectionally according to the production encryption key, generate the nth encryption key unidirectionally according to the nth circulation key, and generate the n + 1th circulation key unidirectionally according to the nth encryption key key. Purchaser can according to keyProduction encryption Unidirectional key generationFirst 1 Circulation . KeyFirst 1 Circulation = hash (keyProduction encryption ). According to the chain continuous generation method, according to the keyFirst n Circulation Generate keyFirst n encryption , As already mentioned above, random numbers can be added when generating encryption keys, so according to the nth circulation key, the nth encryption key can be generated unidirectionally, which can include: obtaining from a trusted repository and random number query The nth random number corresponding to the key; the nth encryption key is generated unidirectionally based on the combination of the nth circulation key and the nth random number. Specifically, since the purchaser learns the pincode, it can generate a random number query key hash (pincode) in one direction. According to the introduction of the foregoing embodiment, both the producer and the circulator can send the random number to the trusted repository. And it can be associated with the unique identifier of the product, that is, the unique identifier can be associated with hash (pincode), production random number, and nth random number. At this time, the trusted repository can be set to only allow the random number to be associated through the unique identifier. It cannot be read, but the hash (pincode) can be read, which effectively prevents the circulation party from obtaining the random number through the unique identifier. After the buyer obtains the corresponding nth random number (including the 1st random number, the 2nd random number ... the nth random number) through the hash (pincode), it can unidirectionally generate the nth encryption key, which can have a keyFirst n encryption = hash (keyFirst n Circulation || nonceFirst n ). For the circulation key, the n + 1th circulation key can be generated unidirectionally according to the nth encryption key, which can have a keyFirst n + 1 Circulation = hash (keyFirst n encryption ). For example, the buyer generated the key in step 52Production encryption , Then this step can have keyFirst 1 Circulation = hash (keyProduction encryption ), Can then generate the keyFirst 1 encryption = hash (keyFirst 1 Circulation || nonceFirst 1 ), And can also generate keyFirst 2 Circulation = hash (keyFirst 1 encryption ), So back and forth, you can get all the circulation key of the circulation party. In this embodiment, n may be a natural number greater than 0. Step 512: According to the nth circulation information query mark, read the nth circulation information encrypted data of the product from the blockchain. For the last circulation party, you can generate the nth circulation information query identifier according to the nth encryption key, according to a preset method, such as the method described in step 18 in Embodiment 1, according to the keyFirst n encryption The number of characters in a specific character is generated, or it is generated in combination with the number of characters in a specific character and a one-way function, or a second one-way calculation is performed to generate the nth circulation information query identifier. For the non-last circulation party, this step may include: according to the combination of the nth circulation key and the nth random number, unidirectionally generate the nth encryption key, and then unidirectionally generate the n + 1th circulation The key, and then generate the nth circulation information query mark unidirectionally; according to the nth circulation information query mark, read the enc (key in the nth information set from the blockchainFirst n encryption , MFirst n ). Specifically, there can be a keyFirst n encryption = hash (keyFirst n Circulation || nonceFirst n ), KeyFirst n + 1 Circulation = hash (keyFirst n encryption ), The nth circulation information query identifier hash (keyFirst n + 1 Circulation ). As shown in Figure 10, according to hash (keyFirst n + 1 Circulation ), Read enc (key from the blockchainFirst n encryption , MFirst n ). Step 514: Decrypt the nth circulation information encrypted data according to the nth encryption key to obtain the nth circulation information. Specifically, it can be similar to the introduction of Embodiment 2, according to the keyFirst n encryption , For enc (keyFirst n encryption , MFirst n ) Decrypt and get mFirst n . FIG. 12 is a schematic diagram of this embodiment. Using the method provided in Example 5, the purchaser uses the unique password of the product to generate a production encryption key in one direction, and then generates a production information query identifier according to the production encryption key, and performs encryption on the production information read from the blockchain Decrypt to obtain production information. Through the chain continuous encryption method, according to the production encryption key, the first circulation key is generated, and then the first encryption key is generated, thereby continuously generating the nth encryption key, and then generating the n + 1th circulation key, the nth The information query mark, and then decrypt the nth circulation information encrypted data obtained according to the nth information query mark according to the nth encryption key to obtain the nth circulation information. Embodiment 6 Based on the same inventive concept, Embodiment 6 provides a blockchain-based product information encryption device, which can be applied to the producer to implement the methods described in Embodiment 1 and Embodiment 3. The block diagram of the device is shown in FIG. 13, which is a block diagram of the device, including: key generation unit 61, data generation unit 62, identification generation unit 63, data writing unit 64, wherein the key generation Unit 61 can generate the production encryption key unidirectionally according to the unique password of the product; The data generation unit 62 can encrypt the production information of the product according to the production encryption key to generate the production information encrypted data; The identifier generating unit 63 can generate a production information query identifier according to the production encryption key; The data transmission unit 64 can write the production information collection to the blockchain, and the production information collection includes the production information query identifier , And production information encryption data. In one embodiment, the key generation unit 61 can receive the production random number generated by the manufacturer when producing the product; according to the combination of the unique password and the production random number, unidirectionally generate a production encryption password key. In one embodiment, the identification generating unit 63 can generate a random number query ID according to the unique password; the data transmission unit 64 can create a unique ID for the product in a trusted repository; The random number query identifier and the production random number are sent to the trusted repository, and are all associated with the unique identifier. In one embodiment, the identification generating unit 63 may unidirectionally generate the first circulation key according to the production encryption key, and then unidirectionally generate the production information query identifier based on the first circulation key; then The data generating unit 62 may encrypt the first circulation key based on the first public key to generate the first circulation key encrypted data, and the first public key is the circulation public key of the first order circulation party; based The first public key generates the first circulation key query identifier in one direction; The data transmission unit 64 can write the production information set into the blockchain, the production information set includes the first received key query identifier, Production information query mark, the first receiving key encryption material and production information encryption material. In one embodiment, the data generating unit 62 encrypts the combination of the product's public clear code and the first circulation key based on the first public key to generate the first circulation key encrypted data. In one embodiment, the data transmission unit 64 may sign the production information set according to a production private key, which is the private key generated by the producer when producing the product; The production information set is written into the blockchain. Embodiment 7 Based on the same inventive concept, Embodiment 7 provides a blockchain-based product information encryption device, which can be applied to a circulation party to implement the method described in Embodiment 4. The structural block diagram of the device is shown in FIG. 14, which is a structural diagram of the device, including: ID generation unit 71, data reading unit 72, data analysis unit 73, key generation unit 74, data encryption unit 75, data transmission Unit 76, wherein, the identification generating unit 71 can generate the nth circulation key query mark unidirectionally based on the nth public key; the material reading unit 72 can query the mark based on the nth circulation key, from the zone Read the nth received key encrypted data in the blockchain; The data analysis unit 73 can decrypt the nth circulation key encrypted data according to the nth private key to obtain the nth circulation key; The secret The key generating unit 74 can unidirectionally generate the nth encryption key according to the nth circulation key; The data encryption unit 75 can encrypt the nth circulation information according to the nth encryption key to generate the nth Circulation information encryption data; Generate the nth circulation information query mark according to the nth encryption key; The data transmission unit 76 can write the nth information set into the blockchain, the nth information set contains the nth Circulation information query mark and nth circulation information encrypted data; Among them, n is a natural number greater than 0. In one embodiment, the key generation unit 74 may receive the nth random number generated by the nth order circulation party when receiving the product; According to the combination of the nth circulation key and the nth random number, Generate the nth encryption key unidirectionally. In one embodiment, the data transmission unit 76 may send the nth random number to a trusted storage and associate it with the unique identifier of the product. In an embodiment, the identification generating unit 71 may generate the n + 1th circulation key unidirectionally according to the nth encryption key, and then generate the nth circulation unidirectionally according to the n + 1th circulation key Information query identifier; then the key generation unit 74 may encrypt the n + 1th circulation key according to the n + 1th public key to generate the n + 1th circulation key encrypted data, the n + 1th The public key is the circulation public key of the n + 1th order circulation party; The identification generation unit 71 can unidirectionally generate the n + 1th circulation key query identifier based on the n + 1th public key; The data transmission unit 76 , The nth information set can be written into the blockchain, the nth information set includes the n + 1th received key query identifier, the nth circulation information query identifier, the n + 1th received key encrypted data, and the n Encrypted information of circulation information. In an embodiment, the data encryption unit 75 may encrypt the combination of the product's public clear code and the n + 1th circulation key according to the n + 1th public key to generate the n + 1th circulation key encrypted data . In one embodiment, the data transmission unit 76 may sign the nth information set based on the nth private key; write the signed nth information set into the blockchain. In an embodiment, the data analysis unit 73 may perform signature verification on the signed production information set based on the production public key before decrypting the nth circulation key encrypted data according to the nth private key; Or, according to the nth public key, perform signature verification on the signed nth information set. Embodiment 8 Based on the same inventive concept, Embodiment 8 provides a blockchain-based product information decryption device that can be applied to the purchaser to implement the methods described in Embodiments 3 and 5. The structure block diagram of the device is shown in FIG. 15, which is a structure diagram of the device, including: key generation unit 81, identification generation unit 82, data reading unit 83, and data analysis unit 84, wherein the key The generating unit 81 can generate the production encryption key unidirectionally according to the unique password of the product; The identification generating unit 82 can generate the production information query identification based on the production encryption key; The material reading unit 83 can Read the production information encrypted data of the product from the blockchain according to the production information query identifier; the data analysis unit 84 may decrypt the production information encrypted data according to the production encryption key, Obtain production information. In one embodiment, the key generation unit 81 may unidirectionally generate a first circulation key based on the production encryption key, and unidirectionally generate an nth encryption key based on the nth circulation key, According to the nth encryption key, generate the n + 1th circulation key in one direction; The data reading unit 83 can query the mark based on the nth circulation information to read the nth circulation of the product from the blockchain Circulation information encrypted data; The data analysis unit 84 can decrypt the nth circulation information encrypted data according to the nth encryption key to obtain the nth circulation information;, where n is a natural number greater than 0. In one embodiment, the key generation unit 81 can generate a random number query identifier in one direction according to the unique password of the product; the data reading unit 83 can obtain the random number from the trusted storage Query the production random number corresponding to the identification; The key generation unit 81 can unidirectionally generate a production encryption key according to the combination of the unique password and the production random number. In one embodiment, the data reading unit 83 obtains the nth random number corresponding to the random number query key from a trusted storage; the key generation unit 81 circulates according to the nth The combination of the key and the nth random number generates the nth encryption key in one direction, where n is a natural number greater than 0. In one embodiment, the key generation unit 81 generates a production encryption key unidirectionally according to the combination of the unique password and the production random number, then unidirectionally generates the first circulation key, and then unidirectionally generates Production information query mark; The data reading unit 83 reads the production information encrypted data in the production information set from the blockchain according to the production information query mark; then the key generation unit 81 according to the The combination of the nth circulation key and the nth random number generates the nth encryption key in one direction, then generates the n + 1th circulation key in one direction, and then generates the nth circulation information query mark in one direction; The data The reading unit 83 reads the nth circulation information encrypted data in the nth information set from the blockchain based on the nth circulation information query identifier. FIG. 16 is a schematic structural diagram of an electronic device according to an embodiment of this specification. At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, network interface, and memory. The memory may include memory, such as high-speed random access memory (Random-Access Memory, RAM), or may also include non-volatile memory (non-volatile memory), such as at least one disk memory Wait. Of course, the electronic device may also include hardware required by other businesses. The processor, network interface and memory can be connected to each other through an internal bus. The internal bus can be an ISA (Industry Standard Architecture) bus and a PCI (Peripheral Component Interconnect) bus Or EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, and a control bus. For ease of representation, only one bidirectional arrow is used in FIG. 16, but it does not mean that there is only one bus bar or one type of bus bar. Memory, used to store programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory may include memory and non-volatile memory, and provide instructions and data to the processor. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a drawing device of the information dialog box in the conversation window at a logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations: Generate a production encryption key unidirectionally according to the product's unique password; Encrypt the production information of the product according to the production encryption key , Generate encrypted information of production information; Generate production information query identifier according to the production encryption key; Write production information collection to the blockchain, the production information collection contains production information query identifier, and production information encrypted data. It can also be used to perform the following operations: Generate the nth circulation key query identifier unidirectionally according to the nth public key; According to the nth circulation key query identifier, read the nth received key encrypted data from the blockchain; according to The nth private key decrypts the nth circulation key encrypted data to obtain the nth circulation key; according to the nth circulation key, unidirectionally generates the nth encryption key; according to the nth encryption key, Encrypt the nth circulation information to generate the nth circulation information encrypted data; According to the nth encryption key, generate the nth circulation information query mark; Write the nth information set to the blockchain, the nth information set Contains the nth circulation information query mark and the nth circulation information encrypted data; Among them, n is a natural number greater than 0. It can also be used to perform the following operations: Generate a production encryption key unidirectionally based on the product's unique password; Generate a production information query identifier based on the production encryption key; Acquire the production information query identifier from the blockchain Obtain the production information encrypted material of the product; According to the production encryption key, decrypt the production information encrypted material to obtain production information. The method performed by the service feedback apparatus provided in the embodiment shown in FIG. 16 of the present specification may be applied to a processor, or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by instructions in the form of hardware integrated logic circuits or software in the processor. The foregoing processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc .; or a digital signal processor (Digital Signal Processor, DSP), dedicated Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps, and logical block diagrams disclosed in the embodiments of the present specification can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may be any common processor. The steps of the method disclosed in conjunction with the embodiments of the present specification may be directly implemented and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor. The software module may be located in a random storage memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a temporary memory, and other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps of the above method. The electronic device can also execute the method performed by the device for encrypting and decrypting product information based on the blockchain in FIGS. 13 to 15 and implement the function of the device for encrypting and decrypting product information based on the blockchain in the embodiment shown in FIG. The embodiments of this specification will not be repeated here. The embodiment of the present specification also proposes a computer-readable storage medium storing one or more programs, the one or more programs including instructions, which are executed by an electronic device including a plurality of application programs It can enable the electronic device to execute the method performed by the service feedback device in the embodiment shown in FIG. 16, and is specifically used to perform: one-way generation of the production encryption key according to the unique password of the product; according to the production encryption key, The production information of the product is encrypted to produce encrypted information of production information; Generates the production information query identifier according to the production encryption key; Writes the production information collection to the blockchain, the production information collection includes the production information query identifier, And encrypted information of production information. It can also be used to execute: Generate the nth circulation key query identifier unidirectionally according to the nth public key; According to the nth circulation key query identifier, read the nth received key encrypted data from the blockchain; according to the nth Private key, decrypt the encrypted data of the nth circulation key to obtain the nth circulation key; according to the nth circulation key, unidirectionally generate the nth encryption key; according to the nth encryption key, n Circulation information is encrypted to generate the nth circulation information encrypted data; According to the nth encryption key, generating the nth circulation information query mark; Write the nth information set to the blockchain, the nth information set contains the n Circulation information query mark and nth circulation information encrypted data; Among them, n is a natural number greater than 0. It can also be used to execute: Generate a production encryption key unidirectionally according to the product's unique password; Generate a production information query identifier based on the production encryption key; Acquire the production information query identifier based on the production information Encryption information of production information of the product; decrypts the encryption information of production information according to the production encryption key to obtain production information. The system, device, module or unit explained in the above embodiments can be realized by a computer chip or entity, or by a product with a certain function. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, and a wearable device Or any combination of these devices. For the convenience of description, when describing the above devices, the functions are divided into various units and described separately. Of course, when implementing this specification, the functions of each unit can be implemented in the same software or multiple hardware and / or hardware. Those skilled in the art should understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, this manual can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code . This specification is described with reference to the flowcharts and / or block diagrams of the method, device (system), and computer program product according to the embodiments of this specification. It should be understood that each flow and / or block in the flowchart and / or block diagram and a combination of the flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing equipment to produce a machine that enables the generation of instructions executed by the processor of the computer or other programmable data processing equipment A device for realizing the functions specified in one block or multiple blocks in one flow or multiple flows in a flowchart and / or one block in a block diagram. These computer program instructions can also be stored in a computer readable memory that can guide the computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, The instruction device implements the functions specified in one block or multiple blocks in one flow or multiple flows in the flowchart and / or one block in the block diagram. These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operating steps can be performed on the computer or other programmable device to generate computer-implemented processing, which can be executed on the computer or other programmable device The instructions provide steps for implementing the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and / or block diagrams. In a typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-permanent memory, random access memory (RAM) and / or non-volatile memory in computer-readable media, such as read-only memory (ROM) or flash memory ( flash RAM). Memory is an example of computer-readable media. Computer-readable media, including permanent and non-permanent, removable and non-removable media, can be stored by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM) , Read-only memory (ROM), electrically erasable and programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tape, magnetic tape storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves. It should also be noted that the terms "include", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device that includes a series of elements includes not only those elements, but also includes Other elements not explicitly listed, or include elements inherent to this process, method, commodity, or equipment. Without more restrictions, the element defined by the sentence "include one ..." does not exclude that there are other identical elements in the process, method, commodity, or equipment that includes the element. Those skilled in the art should understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, this manual can take the form of computer program products implemented on one or more computer usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer usable program code . This manual can be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, program modules include processes, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present specification may also be practiced in distributed computing environments in which remote processing devices connected through a communication network perform tasks. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices. The embodiments in this specification are described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method embodiment. The above is only an example of this specification and is not intended to limit this specification. For those skilled in the art, this specification may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of this specification shall be included in the patent application scope of this specification.

12‧‧‧步驟12‧‧‧Step

14‧‧‧步驟14‧‧‧Step

16‧‧‧步驟16‧‧‧Step

18‧‧‧步驟18‧‧‧Step

22‧‧‧步驟22‧‧‧Step

24‧‧‧步驟24‧‧‧Step

26‧‧‧步驟26‧‧‧Step

28‧‧‧步驟28‧‧‧Step

32‧‧‧步驟32‧‧‧Step

34‧‧‧步驟34‧‧‧Step

36‧‧‧步驟36‧‧‧Step

38‧‧‧步驟38‧‧‧Step

310‧‧‧步驟310‧‧‧Step

312‧‧‧步驟312‧‧‧Step

42‧‧‧步驟42‧‧‧Step

44‧‧‧步驟44‧‧‧Step

46‧‧‧步驟46‧‧‧Step

48‧‧‧步驟48‧‧‧Step

410‧‧‧步驟410‧‧‧Step

412‧‧‧步驟412‧‧‧Step

414‧‧‧步驟414‧‧‧Step

52‧‧‧步驟52‧‧‧Step

54‧‧‧步驟54‧‧‧Step

56‧‧‧步驟56‧‧‧Step

58‧‧‧步驟58‧‧‧Step

510‧‧‧步驟510‧‧‧Step

512‧‧‧步驟512‧‧‧Step

514‧‧‧步驟514‧‧‧Step

61‧‧‧密鑰產生單元61‧‧‧Key generation unit

62‧‧‧資料產生單元62‧‧‧Data generation unit

63‧‧‧標識產生單元63‧‧‧ logo generation unit

64‧‧‧資料寫入單元64‧‧‧Data writing unit

71‧‧‧標識產生單元71‧‧‧ logo generation unit

72‧‧‧資料讀取單元72‧‧‧Data reading unit

73‧‧‧資料解析單元73‧‧‧Data analysis unit

74‧‧‧密鑰產生單元74‧‧‧Key generation unit

75‧‧‧資料加密單元75‧‧‧Data encryption unit

76‧‧‧資料傳輸單元76‧‧‧Data transmission unit

81‧‧‧密鑰產生單元81‧‧‧Key generation unit

82‧‧‧標識產生單元82‧‧‧Mark generation unit

83‧‧‧資料讀取單元83‧‧‧Data reading unit

84‧‧‧資料解析單元84‧‧‧Data analysis unit

為了更清楚地說明本說明書實施例或現有的技術方案,下面將對實施例或現有技術描述中所需要使用的附圖作簡單地介紹,顯而易見地,下面描述中的附圖僅僅是本說明書中記載的一些實施例,對於本領域普通技術人員來講,在不付出創造性勞動性的前提下,還可以根據這些附圖獲得其他的附圖。   圖1為實施例1提供的基於區塊鏈的產品信息加密方法的流程示意圖;   圖2為實施例1提供的基於區塊鏈的產品信息加密方法的示意圖;   圖3為實施例1提供的基於區塊鏈的產品信息加密方法的示意圖;   圖4為實施例2提供的基於區塊鏈的產品信息解密方法的流程示意圖;   圖5為實施例2提供的基於區塊鏈的產品信息解密方法的示意圖;   圖6為實施例2提供的基於區塊鏈的產品信息解密方法的示意圖;   圖7為實施例3提供的基於區塊鏈的產品信息加密方法的流程示意圖;   圖8為實施例3提供的基於區塊鏈的產品信息加密方法的示意圖;   圖9為實施例4提供的基於區塊鏈的產品信息加密方法的流程示意圖;   圖10為實施例4提供的基於區塊鏈的產品信息加密方法的示意圖;   圖11為實施例5提供的基於區塊鏈的產品信息解密方法的流程示意圖;   圖12為實施例5提供的基於區塊鏈的產品信息解密方法的示意圖;   圖13為實施例6提供的基於區塊鏈的產品信息加密裝置的結構示意圖;   圖14為實施例7提供的基於區塊鏈的產品信息加密裝置的結構示意圖;   圖15為實施例8提供的基於區塊鏈的產品信息解密裝置的結構示意圖;   圖16為本說明書實施例提供的一種電子設備的結構示意圖。In order to more clearly explain the embodiments of the present specification or existing technical solutions, the following will briefly introduce the drawings used in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only in the specification For some of the recorded embodiments, for those of ordinary skill in the art, without paying any creative labor, other drawings may be obtained based on these drawings. FIG. 1 is a schematic flow chart of a blockchain-based product information encryption method provided in Embodiment 1; FIG. 2 is a schematic diagram of a blockchain-based product information encryption method provided in Embodiment 1; FIG. 3 is a Schematic diagram of the blockchain-based product information encryption method; FIG. 4 is a schematic flowchart of the blockchain-based product information decryption method provided in Example 2; FIG. 5 is the blockchain-based product information decryption method provided in Example 2 Schematic diagram; FIG. 6 is a schematic diagram of the blockchain-based product information decryption method provided by Example 2; FIG. 7 is a schematic flowchart of the blockchain-based product information encryption method provided by Embodiment 3; FIG. 8 is provided by Embodiment 3 Schematic diagram of the blockchain-based product information encryption method; FIG. 9 is a schematic flow diagram of the blockchain-based product information encryption method provided in Example 4; FIG. 10 is the blockchain-based product information encryption provided in Example 4 Schematic diagram of the method; FIG. 11 is a schematic flowchart of the blockchain-based product information decryption method provided in Example 5; FIG. 12 is a schematic diagram of the blockchain-based product information decryption method provided in Example 5; FIG. 13 is an embodiment 6 Provides a block diagram of a blockchain-based product information encryption device; FIG. 14 is a block diagram of a blockchain-based product information encryption device provided in Example 7; FIG. 15 is a block chain-based product information encryption device provided in Example 8 A schematic structural diagram of a device for decrypting product information; FIG. 16 is a schematic structural diagram of an electronic device according to an embodiment of the present specification.

Claims (42)

一種基於區塊鏈的產品信息加密方法,所述方法應用於生產方,包括:   根據產品的唯一暗碼,單向產生生產加密密鑰;   根據所述生產加密密鑰,對所述產品的生產信息進行加密,產生生產信息加密資料;   根據所述生產加密密鑰,產生生產信息查詢標識;   將生產信息集合寫入區塊鏈,所述生產信息集合包含生產信息查詢標識、以及生產信息加密資料。A method of product information encryption based on blockchain. The method is applied to the manufacturer and includes: one-way production encryption key based on the product's unique password; according to the production encryption key, the production information of the product Encrypt to produce production information encrypted data; Generate production information query identifier based on the production encryption key; Write production information collection to the blockchain, the production information collection contains production information query identifier and production information encrypted data. 如申請專利範圍第1項所述的方法,其中根據產品的唯一暗碼,單向產生生產加密密鑰,具體包括:   接收生產方在生產所述產品時產生的生產隨機數;   根據所述唯一暗碼與所述生產隨機數的組合,單向產生生產加密密鑰。The method as described in item 1 of the patent application scope, in which the production encryption key is generated unidirectionally according to the unique password of the product, which specifically includes: receiving the production random number generated by the producer when producing the product; according to the unique password In combination with the production random number, a production encryption key is generated unidirectionally. 如申請專利範圍第2項所述的方法,所述方法還包括:   根據所述唯一暗碼,單向產生隨機數查詢標識;   在可信儲存庫中為所述產品創建唯一標識;   將所述隨機數查詢標識以及所述生產隨機數發送至所述可信儲存庫,並均與所述唯一標識關聯。According to the method described in item 2 of the patent application scope, the method further includes: One-way generation of a random number query identifier based on the unique password; Create a unique identifier for the product in a trusted repository; The number query identifier and the production random number are sent to the trusted repository and are all associated with the unique identifier. 如申請專利範圍第1項所述的方法,其中根據所述生產加密密鑰,產生生產信息查詢標識,具體包括:   根據所述生產加密密鑰,單向產生第1流通密鑰,再根據所述第1流通密鑰,單向產生生產信息查詢標識;則   將生產信息集合寫入區塊鏈,具體包括:   根據第1公鑰,對第1流通密鑰進行加密,產生第1流通密鑰加密資料,所述第1公鑰為第1次序流通方的流通公鑰;   根據第1公鑰,單向產生第1流通密鑰查詢標識;   將生產信息集合寫入區塊鏈,所述生產信息集合包含所述第1接收密鑰查詢標識、生產信息查詢標識、第1接收密鑰加密資料以及生產信息加密資料。The method as described in item 1 of the patent application scope, wherein the production information query identifier is generated according to the production encryption key, which specifically includes: according to the production encryption key, unidirectionally generating the first circulation key, and then according to the The first circulation key is described, and the production information query mark is generated unidirectionally; then the production information collection is written into the blockchain, including: According to the first public key, the first circulation key is encrypted to generate the first circulation key Encrypted data, the first public key is the circulation public key of the first order circulation party; One-way generation of the first circulation key query identifier based on the first public key; Write production information set to the blockchain, the production The information set includes the first received key query identifier, the production information query identifier, the first received key encrypted data, and the production information encrypted data. 如申請專利範圍第4項所述的方法,其中根據第1公鑰,對第1流通密鑰進行加密,產生第1流通密鑰加密資料,具體包括:   根據第1公鑰,對產品的公開明碼與第1流通密鑰的組合進行加密,產生第1流通密鑰加密資料。The method as described in item 4 of the patent application scope, in which the first circulation key is encrypted according to the first public key to generate the first circulation key encrypted data, which specifically includes: the disclosure of the product based on the first public key The combination of the clear code and the first circulation key is encrypted to generate the first circulation key encrypted data. 如申請專利範圍第4項所述的方法,其中將生產信息集合寫入區塊鏈,具體包括:   根據生產私鑰,對所述生產信息集合進行簽名,所述生產私鑰為生產方在生產所述產品時產生的私鑰;   將簽名後的生產信息集合寫入區塊鏈。The method as described in item 4 of the patent application scope, in which the production information set is written into the blockchain, specifically including: Signing the production information set according to the production private key, the production private key is produced by the producer The private key generated when the product is mentioned; Write the signed production information set into the blockchain. 一種基於區塊鏈的產品信息加密方法,所述方法應用於流通方,包括:   根據第n公鑰,單向產生第n流通密鑰查詢標識;   根據第n流通密鑰查詢標識,從區塊鏈中讀取第n接收密鑰加密資料;   根據第n私鑰,對所述第n流通密鑰加密資料進行解密,得到第n流通密鑰;   根據所述第n流通密鑰,單向產生第n加密密鑰;   根據第n加密密鑰,對第n流通信息進行加密,產生第n流通信息加密資料;   根據所述第n加密密鑰,產生第n流通信息查詢標識;   將第n信息集合寫入區塊鏈,所述第n信息集合包含第n流通信息查詢標識以及第n流通信息加密資料;   其中,n為大於0的自然數。A blockchain-based product information encryption method, which is applied to the circulation party, includes: One-way generation of the nth circulation key query mark based on the nth public key; Query identification based on the nth circulation key, from the block Read the nth received key encrypted data in the chain; Decrypt the nth circulation key encrypted data according to the nth private key to obtain the nth circulation key; According to the nth circulation key, generate unidirectionally The nth encryption key; According to the nth encryption key, encrypt the nth circulation information to generate the nth circulation information encrypted data; According to the nth encryption key, generate the nth circulation information query mark; The nth information The set is written into the blockchain, and the n-th information set includes the n-th circulation information query identifier and the n-th circulation information encrypted data;, where n is a natural number greater than 0. 如申請專利範圍第7項所述的方法,其中根據所述第n流通密鑰,單向產生第n加密密鑰,具體包括:   接收第n次序流通方在接收產品時產生的第n隨機數;   根據所述第n流通密鑰與所述第n隨機數的組合,單向產生第n加密密鑰。The method as described in item 7 of the patent application scope, wherein the nth encryption key is generated unidirectionally according to the nth circulation key, which specifically includes: receiving the nth random number generated by the nth order circulation party when receiving the product ; According to the combination of the nth circulation key and the nth random number, unidirectionally generate the nth encryption key. 如申請專利範圍第8項所述的方法,所述方法還包括:   將所述第n隨機數發送至可信儲存庫,並與所述產品的唯一標識關聯。As in the method described in item 8 of the patent application scope, the method further comprises: sending the nth random number to a trusted repository and associating it with the unique identifier of the product. 如申請專利範圍第9項所述的方法,其中根據所述第n加密密鑰,產生第n流通信息查詢標識,具體包括:   根據所述第n加密密鑰,單向產生第n+1流通密鑰,再根據第n+1流通密鑰,單向產生第n流通信息查詢標識;則   將第n信息集合寫入區塊鏈,具體包括:   根據第n+1公鑰,對第n+1流通密鑰進行加密,產生第n+1流通密鑰加密資料,所述第n+1公鑰為第n+1次序流通方的流通公鑰;   根據第n+1公鑰,單向產生第n+1流通密鑰查詢標識;   將第n信息集合寫入區塊鏈,所述第n信息集合包含所述第n+1接收密鑰查詢標識、第n流通信息查詢標識、第n+1接收密鑰加密資料以及第n流通信息加密資料。The method as described in item 9 of the patent application scope, wherein the nth circulation information query mark is generated based on the nth encryption key, specifically including: According to the nth encryption key, the n + 1th circulation is generated unidirectionally Key, and then generate the nth circulation information query mark unidirectionally according to the n + 1th circulation key; then write the nth information set into the blockchain, including: According to the n + 1th public key, the n + th 1. Encrypt the circulation key to generate the n + 1th circulation key encrypted data, the n + 1th public key is the circulation public key of the n + 1th circulation party; According to the n + 1th public key, it is generated unidirectionally The n + 1th circulation key query identifier; write the nth information set into the blockchain, the nth information set contains the n + 1th received key query identifier, the nth circulation information query identifier, the n + th 1 Receive key encryption data and nth circulation information encryption data. 如申請專利範圍第10項所述的方法,其中根據第n+1公鑰,對第n+1流通密鑰進行加密,產生第n+1流通密鑰加密資料,具體包括:   根據第n+1公鑰,對產品的公開明碼與第n+1流通密鑰的組合進行加密,產生第n+1流通密鑰加密資料。The method as described in item 10 of the patent application scope, wherein the n + 1th circulation key is encrypted according to the n + 1th public key to generate the n + 1th circulation key encrypted data, which specifically includes: according to the n + th 1 Public key, encrypt the combination of the product's public clear code and the n + 1th circulation key to generate the n + 1th circulation key encrypted data. 如申請專利範圍第10項所述的方法,其中將第n信息集合寫入區塊鏈,具體包括:   根據第n私鑰,對所述第n信息集合進行簽名;   將簽名後的第n信息集合寫入區塊鏈。The method as described in item 10 of the patent application scope, in which the nth information set is written into the blockchain, specifically including: sign the nth information set according to the nth private key; the signed nth information The collection is written to the blockchain. 如申請專利範圍第7項所述的方法,其中根據第n私鑰,對所述第n流通密鑰加密資料進行解密之前,所述方法還包括:   根據生產公鑰,對簽名後的生產信息集合進行簽名驗證;或   根據第n公鑰,對簽名後的第n信息集合進行簽名驗證。The method as described in item 7 of the patent application scope, wherein before decrypting the nth circulation key encrypted data according to the nth private key, the method further includes: according to the production public key, to the signed production information Perform signature verification on the collection; or perform signature verification on the signed nth information collection according to the nth public key. 一種基於區塊鏈的產品信息解密方法,所述方法應用於購買方,包括:   根據產品的唯一暗碼,單向產生生產加密密鑰;   根據所述生產加密密鑰,產生生產信息查詢標識;   根據所述生產信息查詢標識,從區塊鏈中讀取所述產品的生產信息加密資料;   根據所述生產加密密鑰,對所述生產信息加密資料進行解密,獲得生產信息。A method for decrypting product information based on blockchain. The method is applied to the purchaser and includes: One-way production encryption key is generated based on the product's unique password; Based on the production encryption key, production information query identifier is generated; according to The production information query identifier reads the production information encrypted material of the product from the blockchain; decrypts the production information encrypted material according to the production encryption key to obtain production information. 如申請專利範圍第14項所述的方法,所述方法還包括:   根據所述生產加密密鑰,單向產生第1流通密鑰,根據所述第n流通密鑰,單向產生第n加密密鑰,根據第n加密密鑰,單向產生第n+1流通密鑰;   根據所述第n流通信息查詢標識,從區塊鏈中讀取所述產品的第n流通信息加密資料;   根據所述第n加密密鑰,對所述第n流通信息加密資料進行解密,獲得第n流通信息;   其中,n為大於0的自然數。The method as described in item 14 of the patent application scope, the method further comprising: unidirectionally generating the first circulation key according to the production encryption key, and unidirectionally generating the nth encryption according to the nth circulation key Key, based on the nth encryption key, generate the n + 1th circulation key in one direction; According to the nth circulation information query mark, read the nth circulation information encrypted data of the product from the blockchain; based The nth encryption key decrypts the nth circulation information encrypted data to obtain the nth circulation information; where n is a natural number greater than 0. 如申請專利範圍第14項所述的方法,其中根據產品的唯一暗碼,單向產生生產加密密鑰,具體包括:   根據產品的唯一暗碼,單向產生隨機數查詢標識;   從可信儲存庫中獲取與所述隨機數查詢標識對應的生產隨機數;   根據所述唯一暗碼與所述生產隨機數的組合,單向產生生產加密密鑰。The method as described in item 14 of the patent application scope, in which the production encryption key is generated unidirectionally according to the unique password of the product, specifically including: Uniquely generated random number query identifier based on the product's unique password; From the trusted repository Obtain the production random number corresponding to the random number query identifier; According to the combination of the unique password and the production random number, unidirectionally generate a production encryption key. 如申請專利範圍第15項所述的方法,其中根據所述第n流通密鑰,單向產生第n加密密鑰,具體包括:   從可信儲存庫中獲取與所述隨機數查詢密鑰對應的第n隨機數;   根據所述第n流通密鑰與所述第n隨機數的組合,單向產生第n加密密鑰,   其中,n為大於0的自然數。The method according to item 15 of the patent application scope, wherein the nth encryption key is generated unidirectionally according to the nth circulation key, which specifically includes: acquiring the random number query key corresponding to the random number query key The nth random number; According to the combination of the nth circulation key and the nth random number, unidirectionally generate the nth encryption key,, where n is a natural number greater than 0. 如申請專利範圍第17項所述的方法,其中從區塊鏈中讀取所述產品的生產信息加密資料,具體包括:   根據所述唯一暗碼與所述生產隨機數的組合,單向產生生產加密密鑰,再單向產生第1流通密鑰,再單向產生生產信息查詢標識;   根據所述生產信息查詢標識,從區塊鏈中讀取生產信息集合中的生產信息加密資料;則   從區塊鏈中讀取所述產品的第n流通信息加密資料,具體包括:   根據所述第n流通密鑰與所述第n隨機數的組合,單向產生第n加密密鑰,再單向產生第n+1流通密鑰,再單向產生第n流通信息查詢標識;   根據所述第n流通信息查詢標識,從區塊鏈中讀取第n信息集合中的第n流通信息加密資料。The method as described in Item 17 of the patent application scope, in which the encrypted information of the production information of the product is read from the blockchain, specifically including: According to the combination of the unique password and the production random number, the production is generated unidirectionally Encryption key, then unidirectionally generate the first circulation key, and then unidirectionally generate the production information query mark; According to the production information query mark, read the production information encryption data in the production information set from the blockchain; then from Reading the encrypted information of the nth circulation information of the product in the blockchain, including: According to the combination of the nth circulation key and the nth random number, generate the nth encryption key unidirectionally, and then unidirectionally Generate the n + 1th circulation key, and then generate the nth circulation information query mark unidirectionally; According to the nth circulation information search mark, read the nth circulation information encrypted data in the nth information set from the blockchain. 一種基於區塊鏈的產品信息加密裝置,所述裝置應用於生產方,包括:密鑰產生單元、資料產生單元、標識產生單元、資料寫入單元,其中,   所述密鑰產生單元,根據產品的唯一暗碼,單向產生生產加密密鑰;   所述資料產生單元,根據所述生產加密密鑰,對所述產品的生產信息進行加密,產生生產信息加密資料;   所述標識產生單元,根據所述生產加密密鑰,產生生產信息查詢標識;   所述資料傳輸單元,將生產信息集合寫入區塊鏈,所述生產信息集合包含生產信息查詢標識、以及生產信息加密資料。A product information encryption device based on blockchain, the device is applied to the manufacturer and includes: a key generation unit, a data generation unit, an identification generation unit, and a data writing unit, wherein, the key generation unit, according to the product The unique password for one-way production encryption key; The data generation unit, according to the production encryption key, the production information of the product is encrypted to produce production information encryption data; The logo generation unit, according to the The production encryption key generates a production information query identifier; The data transmission unit writes the production information collection into the blockchain, and the production information collection includes the production information query identifier and production information encryption material. 如申請專利範圍第19項所述的裝置,其中所述密鑰產生單元,   接收生產方在生產所述產品時產生的生產隨機數;   根據所述唯一暗碼與所述生產隨機數的組合,單向產生生產加密密鑰。The device as described in item 19 of the patent application scope, wherein the key generation unit receives the production random number generated by the manufacturer when producing the product; according to the combination of the unique password and the production random number, single Generate production encryption keys. 如申請專利範圍第20項所述的裝置,其中:   所述標識產生單元,根據所述唯一暗碼,單向產生隨機數查詢標識;   所述資料傳輸單元,   在可信儲存庫中為所述產品創建唯一標識;   將所述隨機數查詢標識以及所述生產隨機數發送至所述可信儲存庫,並均與所述唯一標識關聯。The device as described in item 20 of the patent application scope, wherein: the identification generating unit, based on the unique password, generates a random number to query the identification in one direction; the data transmission unit, is the product in the trusted repository Create a unique identifier; Send the random number query identifier and the production random number to the trusted repository, and all are associated with the unique identifier. 如申請專利範圍第19項所述的裝置,其中所述標識產生單元,   根據所述生產加密密鑰,單向產生第1流通密鑰,再根據所述第1流通密鑰,單向產生生產信息查詢標識;則   所述資料產生單元,   根據第1公鑰,對第1流通密鑰進行加密,產生第1流通密鑰加密資料,所述第1公鑰為第1次序流通方的流通公鑰;   根據第1公鑰,單向產生第1流通密鑰查詢標識;   所述資料傳輸單元,   將生產信息集合寫入區塊鏈,所述生產信息集合包含所述第1接收密鑰查詢標識、生產信息查詢標識、第1接收密鑰加密資料以及生產信息加密資料。The device according to item 19 of the patent application scope, wherein the identification generating unit generates the first circulation key unidirectionally based on the production encryption key, and then generates the production unidirectionally based on the first circulation key Information query mark; then the data generating unit encrypts the first circulation key according to the first public key to generate the first circulation key encrypted data, and the first public key is the circulation company of the first order circulation party Key; Generate the first circulation key query identifier unidirectionally according to the first public key; The data transmission unit, Write production information set to the blockchain, the production information set contains the first received key query identifier , Production information query mark, the first receiving key encryption data and production information encryption data. 如申請專利範圍第22項所述的裝置,其中所述資料產生單元,   根據第1公鑰,對產品的公開明碼與第1流通密鑰的組合進行加密,產生第1流通密鑰加密資料。The device as described in item 22 of the patent application scope, wherein the data generating unit encrypts the combination of the product's public code and the first circulation key based on the first public key to generate the first circulation key encrypted data. 如申請專利範圍第22項所述的裝置,其中所述資料傳輸單元,   根據生產私鑰,對所述生產信息集合進行簽名,所述生產私鑰為生產方在生產所述產品時產生的私鑰;   將簽名後的生產信息集合寫入區塊鏈。The device as described in Item 22 of the patent application scope, wherein the data transmission unit, signs the production information set according to a production private key, which is a private key generated by the producer when producing the product Key; Write the signed production information set into the blockchain. 一種基於區塊鏈的產品信息加密裝置,所述裝置應用於流通方,包括:標識產生單元、資料讀取單元、資料解析單元、密鑰產生單元、資料加密單元、資料傳輸單元,其中,   所述標識產生單元,根據第n公鑰,單向產生第n流通密鑰查詢標識;   所述資料讀取單元,根據第n流通密鑰查詢標識,從區塊鏈中讀取第n接收密鑰加密資料;   所述資料解析單元,根據第n私鑰,對所述第n流通密鑰加密資料進行解密,得到第n流通密鑰;   所述密鑰產生單元,根據所述第n流通密鑰,單向產生第n加密密鑰;   所述資料加密單元,根據第n加密密鑰,對第n流通信息進行加密,產生第n流通信息加密資料;   根據所述第n加密密鑰,產生第n流通信息查詢標識;   所述資料傳輸單元,將第n信息集合寫入區塊鏈,所述第n信息集合包含第n流通信息查詢標識以及第n流通信息加密資料;   其中,n為大於0的自然數。A blockchain-based product information encryption device, which is applied to a circulation party, and includes: a logo generation unit, a data reading unit, a data analysis unit, a key generation unit, a data encryption unit, and a data transmission unit, wherein, 所The identification generating unit generates the nth circulation key query mark unidirectionally according to the nth public key; The data reading unit reads the nth reception key from the blockchain based on the nth circulation key query mark Encrypted data; The data analysis unit decrypts the nth circulation key encrypted data based on the nth private key to obtain the nth circulation key; The key generation unit based on the nth circulation key , Unidirectionally generate the nth encryption key; The data encryption unit encrypts the nth circulation information based on the nth encryption key to generate the nth circulation information encrypted data; generates the nth encryption key based on the nth encryption key n Circulation information query mark; The data transmission unit writes the nth information set to the blockchain, the nth information set contains the nth circulation information query mark and the nth circulation information encrypted data; where n is greater than 0 Natural number. 如申請專利範圍第25項所述的裝置,其中所述密鑰產生單元,   接收第n次序流通方在接收產品時產生的第n隨機數;   根據所述第n流通密鑰與所述第n隨機數的組合,單向產生第n加密密鑰。The device according to item 25 of the patent application scope, wherein the key generation unit receives the nth random number generated by the nth order distributor when receiving the product; according to the nth distribution key and the nth The combination of random numbers generates the n-th encryption key in one direction. 如申請專利範圍第26項所述的裝置,其中所述資料傳輸單元,   將所述第n隨機數發送至可信儲存庫,並與所述產品的唯一標識關聯。The device according to item 26 of the patent application scope, wherein the data transmission unit sends the n-th random number to a trusted repository and is associated with the unique identifier of the product. 如申請專利範圍第27項所述的裝置,其中所述標識產生單元,   根據所述第n加密密鑰,單向產生第n+1流通密鑰,再根據第n+1流通密鑰,單向產生第n流通信息查詢標識;則   所述密鑰產生單元,根據第n+1公鑰,對第n+1流通密鑰進行加密,產生第n+1流通密鑰加密資料,所述第n+1公鑰為第n+1次序流通方的流通公鑰;   所述標識產生單元,根據第n+1公鑰,單向產生第n+1流通密鑰查詢標識;   所述資料傳輸單元,將第n信息集合寫入區塊鏈,所述第n信息集合包含所述第n+1接收密鑰查詢標識、第n流通信息查詢標識、第n+1接收密鑰加密資料以及第n流通信息加密資料。The device according to item 27 of the patent application scope, wherein the identification generating unit generates the n + 1th circulation key unidirectionally according to the nth encryption key, and then Query the identification for generating the nth circulation information; then the key generation unit encrypts the n + 1th circulation key according to the n + 1th public key to generate the n + 1th circulation key encrypted data, the The n + 1 public key is the circulation public key of the n + 1th order circulation party; the identification generation unit, according to the n + 1 public key, unidirectionally generates the n + 1 circulation key query identification; the data transmission unit , Write the nth information set into the blockchain, the nth information set includes the n + 1th received key query identifier, the nth circulation information query identifier, the n + 1th received key encrypted data, and the nth Circulated information encrypted data. 如申請專利範圍第28項所述的裝置,其中所述資料加密單元,   根據第n+1公鑰,對產品的公開明碼與第n+1流通密鑰的組合進行加密,產生第n+1流通密鑰加密資料。The device as described in item 28 of the patent application scope, wherein the data encryption unit encrypts the combination of the product's public code and the n + 1th circulation key based on the n + 1th public key to generate the n + 1th Circulation key to encrypt data. 如申請專利範圍第28項所述的裝置,其中所述資料傳輸單元,   根據第n私鑰,對所述第n信息集合進行簽名;   將簽名後的第n信息集合寫入區塊鏈。The device of claim 28, wherein the data transmission unit signs the nth information set based on the nth private key; writes the signed nth information set into the blockchain. 如申請專利範圍第25項所述的裝置,其中所述資料解析單元,根據第n私鑰,對所述第n流通密鑰加密資料進行解密之前,   根據生產公鑰,對簽名後的生產信息集合進行簽名驗證;或   根據第n公鑰,對簽名後的第n信息集合進行簽名驗證。The device according to item 25 of the patent application scope, wherein the data analysis unit, based on the n-th private key, decrypts the n-th circulation key encrypted data, based on the production public key, the signed production information Perform signature verification on the collection; or perform signature verification on the signed nth information collection according to the nth public key. 一種基於區塊鏈的產品信息解密裝置,所述裝置應用於購買方,包括:密鑰產生單元、標識產生單元、資料讀取單元、以及資料解析單元,其中,   所述密鑰產生單元,根據產品的唯一暗碼,單向產生生產加密密鑰;   所述標識產生單元,根據所述生產加密密鑰,產生生產信息查詢標識;   所述資料讀取單元,根據所述生產信息查詢標識,從區塊鏈中讀取所述產品的生產信息加密資料;   所述資料解析單元,根據所述生產加密密鑰,對所述生產信息加密資料進行解密,獲得生產信息。A blockchain-based product information decryption device, which is applied to the purchaser and includes: a key generation unit, an identification generation unit, a data reading unit, and a data analysis unit, wherein, the key generation unit is based on The unique password of the product, which generates the production encryption key in one direction; The identification generation unit generates the production information query identification according to the production encryption key; The material reading unit queries the identification based on the production information Read the encrypted information of the production information of the product in the blockchain; The data analysis unit decrypts the encrypted information of the production information according to the production encryption key to obtain production information. 如申請專利範圍第32項所述的裝置,其中:   所述密鑰產生單元,根據所述生產加密密鑰,單向產生第1流通密鑰,根據所述第n流通密鑰,單向產生第n加密密鑰,根據第n加密密鑰,單向產生第n+1流通密鑰;   所述資料讀取單元,根據所述第n流通信息查詢標識,從區塊鏈中讀取所述產品的第n流通信息加密資料;   所述資料解析單元,根據所述第n加密密鑰,對所述第n流通信息加密資料進行解密,獲得第n流通信息;   其中,n為大於0的自然數。The device according to item 32 of the patent application scope, wherein: the key generation unit generates the first circulation key unidirectionally based on the production encryption key, and generates the unidirectional generation based on the nth circulation key The nth encryption key, based on the nth encryption key, generates the n + 1th circulation key in one direction; The data reading unit reads the block chain from the nth circulation information query mark The nth circulation information encrypted data of the product; The data analysis unit decrypts the nth circulation information encrypted data according to the nth encryption key to obtain the nth circulation information; where n is a natural value greater than 0 number. 如申請專利範圍第32項所述的裝置,其中:   所述密鑰產生單元,根據產品的唯一暗碼,單向產生隨機數查詢標識;   所述資料讀取單元,從可信儲存庫中獲取與所述隨機數查詢標識對應的生產隨機數;   所述密鑰產生單元,根據所述唯一暗碼與所述生產隨機數的組合,單向產生生產加密密鑰。The device as described in item 32 of the patent application scope, in which: the key generation unit generates a random number query identifier in one direction based on the unique password of the product; the data reading unit obtains and The random number query identifier corresponds to the production random number; The key generation unit generates a production encryption key unidirectionally according to the combination of the unique password and the production random number. 如申請專利範圍第33項所述的裝置,其中:   所述資料讀取單元,從可信儲存庫中獲取與所述隨機數查詢密鑰對應的第n隨機數;   所述密鑰產生單元,根據所述第n流通密鑰與所述第n隨機數的組合,單向產生第n加密密鑰,   其中,n為大於0的自然數。The device according to item 33 of the patent application scope, wherein: the data reading unit obtains the nth random number corresponding to the random number query key from a trusted storage; the key generation unit, Based on the combination of the nth circulation key and the nth random number, the nth encryption key is generated unidirectionally, where n is a natural number greater than 0. 如申請專利範圍第35項所述的裝置,其中:   所述密鑰產生單元,根據所述唯一暗碼與所述生產隨機數的組合,單向產生生產加密密鑰,再單向產生第1流通密鑰,再單向產生生產信息查詢標識;   所述資料讀取單元,根據所述生產信息查詢標識,從區塊鏈中讀取生產信息集合中的生產信息加密資料;則   所述密鑰產生單元,根據所述第n流通密鑰與所述第n隨機數的組合,單向產生第n加密密鑰,再單向產生第n+1流通密鑰,再單向產生第n流通信息查詢標識;   所述資料讀取單元,根據所述第n流通信息查詢標識,從區塊鏈中讀取第n信息集合中的第n流通信息加密資料。The device according to item 35 of the patent application scope, wherein: the key generation unit generates a production encryption key unidirectionally according to the combination of the unique password and the production random number, and then generates the first circulation unidirectionally The key, and then unidirectionally generate the production information query mark; The data reading unit reads the production information encrypted data in the production information set from the blockchain according to the production information query mark; then the key is generated Unit, according to the combination of the nth circulation key and the nth random number, generate the nth encryption key unidirectionally, then generate the n + 1th circulation key unidirectionally, then generate the nth circulation information query unidirectionally Mark; the data reading unit, according to the nth circulation information query mark, read the nth circulation information encrypted data in the nth information set from the blockchain. 一種電子設備,包括:   處理器;以及   被安排成儲存電腦可執行指令的記憶體,所述可執行指令在被執行時使所述處理器執行以下操作:   根據產品的唯一暗碼,單向產生生產加密密鑰;   根據所述生產加密密鑰,對所述產品的生產信息進行加密,產生生產信息加密資料;   根據所述生產加密密鑰,產生生產信息查詢標識;   將生產信息集合寫入區塊鏈,所述生產信息集合包含生產信息查詢標識、以及生產信息加密資料。An electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, the executable instructions, when executed, cause the processor to perform the following operations: one-way production based on the unique password of the product Encryption key; According to the production encryption key, encrypt the production information of the product to generate production information encryption data; According to the production encryption key, generate production information query identifier; Write production information set to the block Chain, the production information set includes production information query identifiers and production information encryption materials. 一種電子設備,包括:   處理器;以及   被安排成儲存電腦可執行指令的記憶體,所述可執行指令在被執行時使所述處理器執行以下操作:   根據第n公鑰,單向產生第n流通密鑰查詢標識;   根據第n流通密鑰查詢標識,從區塊鏈中讀取第n接收密鑰加密資料;   根據第n私鑰,對所述第n流通密鑰加密資料進行解密,得到第n流通密鑰;   根據所述第n流通密鑰,單向產生第n加密密鑰;   根據第n加密密鑰,對第n流通信息進行加密,產生第n流通信息加密資料;   根據所述第n加密密鑰,產生第n流通信息查詢標識;   將第n信息集合寫入區塊鏈,所述第n信息集合包含第n流通信息查詢標識以及第n流通信息加密資料;   其中,n為大於0的自然數。An electronic device comprising: a processor; and a memory arranged to store computer-executable instructions which, when executed, cause the processor to perform the following operations: according to the n-th public key n Circulation key query mark; According to the nth circulation key query mark, read the nth received key encrypted data from the blockchain; Decrypt the nth circulation key encrypted data based on the nth private key, Obtain the nth circulation key; According to the nth circulation key, unidirectionally generate the nth encryption key; According to the nth encryption key, encrypt the nth circulation information to generate the nth circulation information encrypted data; According to the Describe the nth encryption key to generate the nth circulation information query mark; write the nth information set into the blockchain, the nth information set contains the nth circulation information query mark and the nth circulation information encryption data; where, n It is a natural number greater than 0. 一種電子設備,包括:   處理器;以及   被安排成儲存電腦可執行指令的記憶體,所述可執行指令在被執行時使所述處理器執行以下操作:   根據產品的唯一暗碼,單向產生生產加密密鑰;   根據所述生產加密密鑰,產生生產信息查詢標識;   根據所述生產信息查詢標識,從區塊鏈中讀取所述產品的生產信息加密資料;   根據所述生產加密密鑰,對所述生產信息加密資料進行解密,獲得生產信息。An electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, the executable instructions, when executed, cause the processor to perform the following operations: one-way production based on the unique password of the product Encryption key; According to the production encryption key, generate production information query identifier; According to the production information query identifier, read the production information encryption data of the product from the blockchain; According to the production encryption key, Decrypt the production information encrypted data to obtain production information. 一種電腦可讀儲存媒體,所述電腦可讀儲存媒體儲存一個或多個程式,所述一個或多個程式當被包括多個應用程式的電子設備執行時,使得所述電子設備執行以下操作:   根據產品的唯一暗碼,單向產生生產加密密鑰;   根據所述生產加密密鑰,對所述產品的生產信息進行加密,產生生產信息加密資料;   根據所述生產加密密鑰,產生生產信息查詢標識;   將生產信息集合寫入區塊鏈,所述生產信息集合包含生產信息查詢標識、以及生產信息加密資料。A computer-readable storage medium storing one or more programs, which when executed by an electronic device including multiple application programs, causes the electronic device to perform the following operations: According to the unique password of the product, the production encryption key is generated unidirectionally; according to the production encryption key, encrypting the production information of the product to generate production information encryption data; according to the production encryption key to generate production information query Logo; Write the production information set into the blockchain, the production information set contains the production information query logo, and production information encryption data. 一種電腦可讀儲存媒體,所述電腦可讀儲存媒體儲存一個或多個程式,所述一個或多個程式當被包括多個應用程式的電子設備執行時,使得所述電子設備執行以下操作:   根據第n公鑰,單向產生第n流通密鑰查詢標識;   根據第n流通密鑰查詢標識,從區塊鏈中讀取第n接收密鑰加密資料;   根據第n私鑰,對所述第n流通密鑰加密資料進行解密,得到第n流通密鑰;   根據所述第n流通密鑰,單向產生第n加密密鑰;   根據第n加密密鑰,對第n流通信息進行加密,產生第n流通信息加密資料;   根據所述第n加密密鑰,產生第n流通信息查詢標識;   將第n信息集合寫入區塊鏈,所述第n信息集合包含第n流通信息查詢標識以及第n流通信息加密資料;   其中,n為大於0的自然數。A computer-readable storage medium storing one or more programs, which when executed by an electronic device including multiple application programs, causes the electronic device to perform the following operations: According to the nth public key, generate the nth circulation key query identifier unidirectionally; According to the nth circulation key query identifier, read the nth received key encryption data from the blockchain; According to the nth private key, Decrypt the encrypted data of the nth circulation key to obtain the nth circulation key; according to the nth circulation key, unidirectionally generate the nth encryption key; encrypt the nth circulation information according to the nth encryption key, Generate the nth circulation information encrypted data; According to the nth encryption key, generate the nth circulation information query mark; Write the nth information set into the blockchain, the nth information set contains the nth circulation information query mark and The nth circulation information encrypted data; Among them, n is a natural number greater than 0. 一種電腦可讀儲存媒體,所述電腦可讀儲存媒體儲存一個或多個程式,所述一個或多個程式當被包括多個應用程式的電子設備執行時,使得所述電子設備執行以下操作:   根據產品的唯一暗碼,單向產生生產加密密鑰;   根據所述生產加密密鑰,產生生產信息查詢標識;   根據所述生產信息查詢標識,從區塊鏈中讀取所述產品的生產信息加密資料;   根據所述生產加密密鑰,對所述生產信息加密資料進行解密,獲得生產信息。A computer-readable storage medium storing one or more programs, which when executed by an electronic device including multiple application programs, causes the electronic device to perform the following operations: Generate the production encryption key unidirectionally according to the unique password of the product; Generate the production information query identifier according to the production encryption key; Acquire the production information encryption of the product from the blockchain according to the production information query identifier Materials; Decrypt the production information encrypted materials according to the production encryption key to obtain production information.
TW107132970A 2017-11-23 2018-09-19 Encryption and decryption method and device for product information and its electronic equipment and computer readable storage medium TWI712916B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711183121.4A CN108055125B (en) 2017-11-23 2017-11-23 Method and device for encrypting and decrypting product information
CN201711183121.4 2017-11-23

Publications (2)

Publication Number Publication Date
TW201926111A true TW201926111A (en) 2019-07-01
TWI712916B TWI712916B (en) 2020-12-11

Family

ID=62120399

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107132970A TWI712916B (en) 2017-11-23 2018-09-19 Encryption and decryption method and device for product information and its electronic equipment and computer readable storage medium

Country Status (6)

Country Link
US (1) US10778427B2 (en)
EP (2) EP3917075B1 (en)
CN (2) CN111865586B (en)
SG (1) SG11202002360RA (en)
TW (1) TWI712916B (en)
WO (1) WO2019100872A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI707571B (en) * 2019-02-27 2020-10-11 香港商阿里巴巴集團服務有限公司 Method and device for storing and calling private key of blockchain account
TWI721840B (en) * 2019-07-02 2021-03-11 開曼群島商創新先進技術有限公司 System and method for implementing a resolver service for decentralized identifiers
US11159526B2 (en) 2019-07-02 2021-10-26 Advanced New Technologies Co., Ltd. System and method for decentralized-identifier authentication
US11165576B2 (en) 2019-07-02 2021-11-02 Advanced New Technologies Co., Ltd. System and method for creating decentralized identifiers
US11277268B2 (en) 2019-07-02 2022-03-15 Advanced New Technologies Co., Ltd. System and method for verifying verifiable claims
US11533164B2 (en) 2019-07-02 2022-12-20 Advanced New Technologies Co., Ltd. System and method for blockchain-based cross-entity authentication

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111865586B (en) 2017-11-23 2023-01-10 创新先进技术有限公司 Method and device for encrypting product information
CN108764695A (en) * 2018-05-23 2018-11-06 江苏涞哲信息科技有限公司 A kind of food security traceability system and method based on block chain technology
CN110796414B (en) * 2018-05-31 2021-04-16 腾讯科技(深圳)有限公司 Circulation information inquiry method, device, equipment, system and storage medium
CN108922012B (en) * 2018-07-11 2020-05-19 北京大账房网络科技股份有限公司 Invoice checking method without leakage of original information based on block chain technology
CN109299757A (en) * 2018-07-20 2019-02-01 深圳市易恒信科技有限公司 Two dimensional code setting method, setting system and its two dimensional code based on block chain
CN110493039B (en) * 2018-08-06 2021-06-04 腾讯科技(深圳)有限公司 Block chain-based equipment management method and equipment management system
CN109150532A (en) * 2018-08-23 2019-01-04 海南新软软件有限公司 A kind of encryption and decryption approaches, device and the client framework of Onchain wallet private key
CN108681768A (en) * 2018-08-27 2018-10-19 黄幼毅 Commodity code method and system
CN109271801A (en) * 2018-09-25 2019-01-25 宁波弘讯科技股份有限公司 Injecting products approaches to IM, server, injection molding machine based on block chain
CN109669943A (en) * 2018-11-30 2019-04-23 深圳灵图慧视科技有限公司 Date storage method, data query method and device
CN109729092A (en) * 2019-01-09 2019-05-07 山东浪潮质量链科技有限公司 A kind of method and apparatus of business platform access
CN109816401A (en) * 2019-01-17 2019-05-28 柳州康云互联科技有限公司 A kind of product traceability and anti-counterfeiting system and method based on two dimensional code
CN109902494A (en) * 2019-01-24 2019-06-18 北京融链科技有限公司 Data encryption storage method, device and document storage system
CA3058239C (en) * 2019-03-26 2021-01-05 Alibaba Group Holding Limited Field-programmable gate array based trusted execution environment for use in a blockchain network
CN110096901B (en) * 2019-05-08 2021-04-02 北京智签科技有限公司 Electronic contract data encryption storage method and signing client
US10585882B1 (en) 2019-09-23 2020-03-10 Trace, LLC Systems and methods for writing updates to and/or reading previously stored updates of assets implemented as smart contracts on a decentralized database
CN110765488B (en) * 2019-10-28 2021-11-16 联想(北京)有限公司 Data storage and reading method and electronic equipment
CN111314066B (en) * 2020-01-23 2022-02-11 腾讯科技(深圳)有限公司 Block chain-based data transfer method, terminal and computer-readable storage medium
US20230351410A1 (en) * 2020-10-27 2023-11-02 Sai Kumar Jamalpur System and method for recognition of an authentic product
US11621963B2 (en) * 2021-05-27 2023-04-04 Western Digital Technologies, Inc. Fleet health management corrective action communication exchange

Family Cites Families (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030037237A1 (en) 2001-04-09 2003-02-20 Jean-Paul Abgrall Systems and methods for computer device authentication
EP1866803A2 (en) 2005-03-07 2007-12-19 Haven Networks Inc. Web-based marketing system
US20130227653A1 (en) 2008-11-29 2013-08-29 Yu Yung Choi System and method for streamlined registration of products over a communication network and for verification and management of information related thereto
US8934630B2 (en) * 2009-11-02 2015-01-13 International Business Machines Corporation Compressing block-cipher encrypted data
US9569771B2 (en) 2011-04-29 2017-02-14 Stephen Lesavich Method and system for storage and retrieval of blockchain blocks using galois fields
US8688525B2 (en) 2011-12-22 2014-04-01 Telefonaktiebolaget L M Ericsson (Publ) System and method for implementing a context based payment system
TWI419064B (en) * 2012-11-16 2013-12-11 Chia Ming Kang Merchandise counterfeit-proof system
US10102510B2 (en) 2012-11-28 2018-10-16 Hoverkey Ltd. Method and system of conducting a cryptocurrency payment via a mobile device using a contactless token to store and protect a user's secret key
US20140172630A1 (en) 2012-12-14 2014-06-19 Mastercard International Incorporated Social media interface for use with a global shopping cart
US10319022B2 (en) * 2013-02-28 2019-06-11 Lg Electronics Inc. Apparatus and method for processing a multimedia commerce service
WO2014190323A1 (en) 2013-05-24 2014-11-27 Degaugue Fabien Ghislain System and method for facilitating transactions as conversations between participants
US20150058168A1 (en) 2013-08-26 2015-02-26 Fon Wireless Limited Method and system for providing a product identifier enabling smart devices to make a purchase into a third party payment platform
US9858569B2 (en) * 2014-03-21 2018-01-02 Ramanan Navaratnam Systems and methods in support of authentication of an item
US9704143B2 (en) 2014-05-16 2017-07-11 Goldman Sachs & Co. LLC Cryptographic currency for securities settlement
US9818092B2 (en) 2014-06-04 2017-11-14 Antti Pennanen System and method for executing financial transactions
US9608829B2 (en) 2014-07-25 2017-03-28 Blockchain Technologies Corporation System and method for creating a multi-branched blockchain with configurable protocol rules
US20160098723A1 (en) 2014-10-01 2016-04-07 The Filing Cabinet, LLC System and method for block-chain verification of goods
US20160098730A1 (en) * 2014-10-01 2016-04-07 The Filing Cabinet, LLC System and Method for Block-Chain Verification of Goods
US20160164884A1 (en) * 2014-12-05 2016-06-09 Skuchain, Inc. Cryptographic verification of provenance in a supply chain
US10535063B2 (en) 2015-03-13 2020-01-14 First Data Corporation Systems and methods for securing digital gift cards with a public ledger
CN108432176B (en) * 2015-08-11 2022-02-11 J·斯托曼 System and method for ensuring asset and supply chain integrity
CN105608146A (en) * 2015-12-17 2016-05-25 布比(北京)网络技术有限公司 Block chain tracing method
US10108812B2 (en) * 2016-01-28 2018-10-23 Nasdaq, Inc. Systems and methods for securing and disseminating time sensitive information using a blockchain
CN106209877A (en) * 2016-07-19 2016-12-07 井创(北京)科技有限公司 A kind of be certification core with block chain backstage false-proof authentication system
CN106529969B (en) * 2016-10-08 2020-11-13 惠州Tcl移动通信有限公司 Method and system for checking fake source by NFC
CN106570710A (en) * 2016-10-27 2017-04-19 纸飞机(北京)科技有限公司 Commodity anti-counterfeiting method and device
CN106779742A (en) * 2016-12-05 2017-05-31 华迪计算机集团有限公司 A kind of method and system for carrying out complete monitoring safely to drug quality based on block chain
CN107122938A (en) * 2017-04-27 2017-09-01 电子科技大学 A kind of freight logistics scheduling and tracking based on block chain
CN107169776A (en) * 2017-05-10 2017-09-15 无锡井通网络科技有限公司 Product certification method for anti-counterfeit based on block chain technology
CN107133532A (en) * 2017-05-31 2017-09-05 无锡井通网络科技有限公司 A kind of block chain logistics based on NFC is traced to the source tracking method for anti-counterfeit
CN107346491A (en) * 2017-06-22 2017-11-14 物链(北京)科技有限公司 A kind of commodity circulation information tracking and system
CN107341676A (en) * 2017-07-17 2017-11-10 深圳天净喔溯源科技有限公司 False proof mark and the method for tracing to the source
CN111865586B (en) * 2017-11-23 2023-01-10 创新先进技术有限公司 Method and device for encrypting product information

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI707571B (en) * 2019-02-27 2020-10-11 香港商阿里巴巴集團服務有限公司 Method and device for storing and calling private key of blockchain account
US11251961B2 (en) 2019-02-27 2022-02-15 Advanced New Technologies Co., Ltd. Methods and apparatuses for storing or invoking blockchain account private keys
TWI721840B (en) * 2019-07-02 2021-03-11 開曼群島商創新先進技術有限公司 System and method for implementing a resolver service for decentralized identifiers
US11159526B2 (en) 2019-07-02 2021-10-26 Advanced New Technologies Co., Ltd. System and method for decentralized-identifier authentication
US11165576B2 (en) 2019-07-02 2021-11-02 Advanced New Technologies Co., Ltd. System and method for creating decentralized identifiers
US11171789B2 (en) 2019-07-02 2021-11-09 Advanced New Technologies Co., Ltd. System and method for implementing a resolver service for decentralized identifiers
US11277268B2 (en) 2019-07-02 2022-03-15 Advanced New Technologies Co., Ltd. System and method for verifying verifiable claims
US11316697B2 (en) 2019-07-02 2022-04-26 Advanced New Technologies Co., Ltd. System and method for issuing verifiable claims
US11477032B2 (en) 2019-07-02 2022-10-18 Advanced New Technologies Co., Ltd. System and method for decentralized-identifier creation
US11533164B2 (en) 2019-07-02 2022-12-20 Advanced New Technologies Co., Ltd. System and method for blockchain-based cross-entity authentication

Also Published As

Publication number Publication date
EP3678324B1 (en) 2021-07-21
US20200162244A1 (en) 2020-05-21
US10778427B2 (en) 2020-09-15
TWI712916B (en) 2020-12-11
CN111865586A (en) 2020-10-30
WO2019100872A1 (en) 2019-05-31
EP3678324A1 (en) 2020-07-08
EP3917075C0 (en) 2023-09-13
CN108055125B (en) 2020-06-30
EP3678324A4 (en) 2020-09-09
EP3917075A1 (en) 2021-12-01
CN108055125A (en) 2018-05-18
EP3917075B1 (en) 2023-09-13
CN111865586B (en) 2023-01-10
SG11202002360RA (en) 2020-04-29

Similar Documents

Publication Publication Date Title
TWI712916B (en) Encryption and decryption method and device for product information and its electronic equipment and computer readable storage medium
CN110032884B (en) Method for realizing privacy protection in block chain, node and storage medium
CN102138300B (en) Message authentication code pre-computation with applications to secure memory
CN102402664B (en) Data access control device and data access control method
US8548172B2 (en) Secure dissemination of events in a publish/subscribe network
US20210318996A1 (en) Methods, apparatuses, and devices for transferring data assets based on blockchain
WO2021174927A1 (en) Blockchain-based identity verification method and apparatus, device, and storage medium
WO2020233615A1 (en) Receipt storage method combining user type and event function type and node
CN108599930A (en) Firmware encrypting and deciphering system and method
WO2020233635A1 (en) Receipt storage method combining conditional restrictions of multiple types of dimensions and node
CN103378971B (en) A kind of data encryption system and method
WO2021088728A1 (en) Data encryption method, data decryption method, data sharing method, device, system, and storage medium
US20200204360A1 (en) Method and Devices for Communicating Securely Between Devices
WO2020233624A1 (en) Receipt storage method and node employing transaction type in combination with event function type
CN111464499A (en) Electronic warehouse receipt tracing method and device, computer equipment and storage medium
WO2020233632A1 (en) Receipt storage method and node based on event function type
WO2020233627A1 (en) Receipt storage method and node based on multiple types of dimensions
WO2019127265A1 (en) Blockchain smart contract-based data writing method, device and storage medium
WO2021057124A1 (en) Fpga-based privacy block chain implementing method and device
CN112104446A (en) Multi-party combined machine learning method and system based on homomorphic encryption
CN112884485A (en) Symmetric encryption traceability transaction method, system and storage medium based on block chain network
CN116361849A (en) Backup data encryption and decryption method and device for encrypted database
CN104318168A (en) Encryption and decryption method and encryption and decryption system for virtual machine image file
CN110798321B (en) Article information service method based on block chain
CN103559434A (en) Generation method for electronic attached sheets in circulation domain