In a PON system transmitting a variable length packet, the time is synchronized in advance between a subscriber side device (13) and a station side device (15). A new encryption key generated by one of them is transmitted to the other and each of them stores the new encryption key. One of them transmits an encryption key switching time and each of them switches the encryption to the new encryption key at the encryption key switching time. Accordingly, even in a PON system transmitting a variable length packet, it is possible to synchronize the encryption key switching timing between the subscriber side device (13) and the station side device(15). |