A method and system for allowing communication devices to synchronously
manage shared information are provided. A sender sends single-photon
pulses modulated with original random numbers to a receiver and also
sends frame pulses by using ordinary optical pulses. Bit comparison and
basis reconciliation are performed by the frame which is defined by the
frame pulses, whereby sifted keys, which are aggregated as a file, are
generated by the sender and the receiver individually. The sifted keys
are subjected to error correction, privacy amplification, and file
sharing processing by the file, whereby common cryptographic keys are
synchronously stored in the sender and the receiver individually. The
generated cryptographic keys are managed as encryption keys and
decryption keys separately. A newly generated key is preferentially
placed in the encryption keys or decryption keys that have a smaller
stored amount.