Patent attributes
This application discloses a key generation method and apparatus, a device, and a medium. The method includes transmitting a key negotiation request to a consensus node in a blockchain network, to request a key verification parameter; negotiating a collaboration key pair with a second device to obtain a first private key component and a shared public key in the collaboration key pair; signing the key verification parameter by using the first private key component, to obtain a first signature component; generating transaction data according to the first signature component and the key verification parameter; transmitting the transaction data to the second device. The consensus node performs a consensus on the negotiation result data, and after the negotiation result data passes the consensus, submits the negotiation result data to a blockchain of the blockchain network.