An apparatus for time-bin phase encoding in quantum key distribution, comprising: a signal light source , configured to provide signal light; an intensity modulator , comprising a Sagnac interferometer and a first phase modulator ; a first optical transmission unit ; and a beam combining unit ; wherein the Sagnac interferometer comprises a Sagnac loop and a first beam splitting unit , and the first beam splitting unit and the first phase modulator are arranged in the Sagnac loop ; wherein the intensity modulator is configured to receive the signal light, split the signal light into two beams of coherent light travelling in the Sagnac loop in opposite directions, and generate and output a first beam of interference light and a second beam of interference light; wherein the first beam of interference light is transmitted to the beam combining unit via a first optical path, and the second beam of interference light is transmitted to the beam combining unit via a second optical path; wherein the first optical path and the second optical path are of different optical lengths for the first beam of interference light and the second beam of interference light, respectively; wherein the first optical transmission unit is configured to: transmit the signal light to the intensity modulator , and transmit the first beam of interference light outputted from the intensity modulator to the beam combining unit via the first optical path; and wherein the beam combining unit is configured to receive the first beam of interference light and the second beam of interference light, combine the first beam of interference light and the second beam of interference light into one beam, and output the one beam. a signal light source , configured to provide signal light; an intensity modulator , comprising a Sagnac interferometer and a first phase modulator ; a first optical transmission unit ; and a beam combining unit ; wherein the Sagnac interferometer comprises a Sagnac loop and a first beam splitting unit , and the first beam splitting unit and the first phase modulator are arranged in the Sagnac loop ; wherein the intensity modulator is configured to receive the signal light, split the signal light into two beams of coherent light travelling in the Sagnac loop in opposite directions, and generate and output a first beam of interference light and a second beam of interference light; wherein the first beam of interference light is transmitted to the beam combining unit via a first optical path, and the second beam of interference light is transmitted to the beam combining unit via a second optical path; wherein the first optical path and the second optical path are of different optical lengths for the first beam of interference light and the second beam of interference light, respectively; wherein the first optical transmission unit is configured to: transmit the signal light to the intensity modulator , and transmit the first beam of interference light outputted from the intensity modulator to the beam combining unit via the first optical path; and wherein the beam combining unit is configured to receive the first beam of interference light and the second beam of interference light, combine the first beam of interference light and the second beam of interference light into one beam, and output the one beam. <EOS>