The embodiment of the invention provides a private transaction method and device, which are applied to the technical field of block chain application, and for
reinforcement learning of any round, the method comprises the following steps: obtaining a transaction
record and a transaction proof sent by a transaction initiator, the transaction
record being determined by the transaction initiator based on a private transaction, and the transaction proof being determined by the transaction initiator based on the private transaction; the transaction
record comprises transaction amount information, first proof information pointing to a transaction initiator and second proof information pointing to a transaction
receiver; the address of at least one of the transaction initiator and the transaction
receiver participating in the transaction is a
private address; performing zero-knowledge proof
verification on the transaction proof by calling the private transaction contract; and if the
verification is passed, storing the transaction record in a transaction record set of the block chain and updating the total account amount of the private transaction contract. According to the method, all privacy transaction information is selectively hidden by utilizing a zero-knowledge proof technology, sensitive transaction details are ensured not to be leaked, and the privacy of the user is effectively protected while the legality of the privacy transaction is ensured.