Common-signal-induced synchronization in photonic integrated circuits and its application to secure key distribution