The homomorphic encryption/decryption solutions in the present specification can be applied to many application scenarios. The following provides description by using examples.
The homomorphic encryption/decryption solutions can be applied to a blockchain transaction, to implement a confidential transaction in a blockchain network. For example, the target user can create a blockchain transaction between the target user and transaction objects Q_0 to Q_t based on transfer amounts m0 to mt respectively corresponding to transaction objects Q_0 to Q_t. The blockchain transaction includes homomorphic ciphertext c0 to ct respectively corresponding to transfer amounts m0 to mt, where t≥0, and account balances of the target user and transaction objects Q_0 to Q_t are respectively recorded as corresponding homomorphic ciphertext d and d_0 to d_t in a blockchain ledger. Then, the target user can submit the blockchain transaction to the blockchain network. After the blockchain transaction is completed, for homomorphic ciphertext d and d_0, . . . , and d_t recorded in the blockchain ledger, d is decreased by (c0+ . . . +ct), d_0 is decreased by c0, . . . , and d_t is decreased by ct.