Research Article
Design of a Blockchain-Based Traceability System with a Privacy-Preserving Scheme of Zero-Knowledge Proof
Algorithm 4 Proof and contract generation algorithm.
| Input: verifyKey, PID, TF | | Output: Proof, contractAddr | (1) | TA.compile(verifyKey) | (2) | TA.setup() | (3) | SC = TA.genContract() | (4) | verifyKey,TF,PID = TDP.recv() | (5) | rawData = TDP.getRawDataByID() | (6) | witness = ZK.genWitness(rawData, verificationKey) | (7) | proof = Verify.genProof(Witness) | (8) | TDP.send(proof,TA) | (9) | TA.publish(proof|contractAddr) |
|