A method for secure communication of a seed parameter for generating an offline payment code; wherein the method is applicable in a client and comprises: generating, using a random number, an asymmetrical key pair comprising a first public key and a first private key for a data request, and sending the data request carrying the first public key to a server, wherein the first public key is made different from one or more other public keys carried by one or more prior data requests sent by the client, by using a different random number for each of the one or more data requests sent by the client to generate a different asymmetrical key pair for each of the one or more data requests sent by the client; then receiving a ciphertext and a second public key sent by the server, wherein the second public key is a public key in an asymmetrical key pair obtained by the server in response to the data request sent by the client; wherein the asymmetrical key pair obtained by the server in response to the data request sent by the client, is also different for each of the one or more data requests sent by the client, and further comprises a second private key; and wherein the ciphertext is information obtained by encrypting the seed parameter for generating an offline payment code using a shared key; the shared key is a symmetric key generated based on the second private key and the first public key using a preset key-agreement algorithm; then generating a shared key based on the first private key and the second public key using the key-agreement algorithm, and using the shared key based on the first private key and the second public key using the key-agreement algorithm to decrypt the ciphertext to obtain the seed parameter; wherein the shared key generated based on the second private key and the first public key using the preset key-agreement algorithm is identical to the shared key generated based on the first private key and the second public key using the key-agreement algorithm and is different for each of the one or more data requests sent by the client. generating, using a random number, an asymmetrical key pair comprising a first public key and a first private key for a data request, and sending the data request carrying the first public key to a server, wherein the first public key is made different from one or more other public keys carried by one or more prior data requests sent by the client, by using a different random number for each of the one or more data requests sent by the client to generate a different asymmetrical key pair for each of the one or more data requests sent by the client; then receiving a ciphertext and a second public key sent by the server, wherein the second public key is a public key in an asymmetrical key pair obtained by the server in response to the data request sent by the client; wherein the asymmetrical key pair obtained by the server in response to the data request sent by the client, is also different for each of the one or more data requests sent by the client, and further comprises a second private key; and wherein the ciphertext is information obtained by encrypting the seed parameter for generating an offline payment code using a shared key; the shared key is a symmetric key generated based on the second private key and the first public key using a preset key-agreement algorithm; then generating a shared key based on the first private key and the second public key using the key-agreement algorithm, and using the shared key based on the first private key and the second public key using the key-agreement algorithm to decrypt the ciphertext to obtain the seed parameter; wherein the shared key generated based on the second private key and the first public key using the preset key-agreement algorithm is identical to the shared key generated based on the first private key and the second public key using the key-agreement algorithm and is different for each of the one or more data requests sent by the client.