A communication system including a master device having wireless communication functionality and a plurality of slave devices (302, 303) each having wireless communication functionality, wherein the master device comprises: generation means for generating a session key; means for receiving public keys from the plurality of slave devices, encrypting the session key using the public keys of the plurality of slave devices and transmitting the respectively encrypted session key to the respective slave devices; reception means for receiving decryption completion notifications from the plurality of slave devices for notifying completion of decryption of the session key; and data transmission means for encrypting communication parameters using the session key and transmitting the encrypted communication parameters to the plurality of slave devices, based on the reception of the decryption completion notifications by the reception means, wherein the master device is further configured to receive, from the plurality of slave devices, information indicating that retrieving the communication parameters by the respective slave device is finished in a case where decryption of the communication parameters using the session key is completed; and to set the communication parameters to form the wireless network for data communication after the information, indicating that retrieving the communication parameters by the respective slave device is finished, has been received from all of the plurality of slave devices; and each slave device comprises: decryption means for transmitting the public key to the master device, receiving the session key encrypted using the public key and decrypting it; notification means for transmitting the decryption completion notification to the master device in a case where decryption of the session key is completed by the decryption means; and communication parameters decryption means for receiving the communication parameters encrypted using the session key from the master device and decrypting it using the decrypted session key, wherein each of the plurality of slave devices is further configured to transmit information indicating that retrieving the communication parameters is finished to the master device in a case where decryption of the communication parameters using the session key is completed by the communication parameters decryption means. generation means for generating a session key; means for receiving public keys from the plurality of slave devices, encrypting the session key using the public keys of the plurality of slave devices and transmitting the respectively encrypted session key to the respective slave devices; reception means for receiving decryption completion notifications from the plurality of slave devices for notifying completion of decryption of the session key; and data transmission means for encrypting communication parameters using the session key and transmitting the encrypted communication parameters to the plurality of slave devices, based on the reception of the decryption completion notifications by the reception means, wherein the master device is further configured to receive, from the plurality of slave devices, information indicating that retrieving the communication parameters by the respective slave device is finished in a case where decryption of the communication parameters using the session key is completed; and to set the communication parameters to form the wireless network for data communication after the information, indicating that retrieving the communication parameters by the respective slave device is finished, has been received from all of the plurality of slave devices; and decryption means for transmitting the public key to the master device, receiving the session key encrypted using the public key and decrypting it; notification means for transmitting the decryption completion notification to the master device in a case where decryption of the session key is completed by the decryption means; and communication parameters decryption means for receiving the communication parameters encrypted using the session key from the master device and decrypting it using the decrypted session key,