Research Article
Design of a Blockchain-Based Traceability System with a Privacy-Preserving Scheme of Zero-Knowledge Proof
Algorithm 1 Authentication algorithm.
| Input: ID, PKt, SKte, Tx | | Output: AuthResult | (1) | ProductData = PID|TxTS|TxHash|random(r) | (2) | ProductSign = sign(sign(ProductData,SKp),PKa)|TxHash | (3) | TDP.send(ProductSign) | (4) | recvData = TDA.recv() | (5) | ProductData = decrypt(recvData,SKa).decrypt(recvData,PKp) | (6) | if verify(PID): | (7) | authToken = hash(ProductData) | (8) | else: | (9) | deny() | (10) | TDA.send(authToken|PID) | (11) | authToken = TDP.recv() | (12) | if authToken = = hash(ProductData) | (13) | IndentityConfirmed() | (14) | Else | (15) | deny |
|