A printer generates a public key with a passphrase containing at least
printer position information and a random number by a public key
cryptography, and holds this random number. A print client previously
acquires the public key from the printer. When transmitting print data to
the printer, the print client encrypts the print data in advance with the
acquired public key and transmits the encrypted print data as print
transmitting data. The printer which has received the print transmitting
data generates a private key with a passphrase containing at least
printer position information and the held random number by the public key
cryptography. The printer then decrypts the received print transmitting
data with the private key. Consequently, the security of the print data
transmitted from the print client to the printer via a network is
ensured.