During medieval times, most people could neither read nor write.
Even those who could sign their names were required to follow it with an X, symbolizing the cross of St. Andrew, or the contract would be invalid.
Those who couldn’t write their names still had to end the contract with the X to make it legal.
To prove their intention, all were required to kiss the cross, which through time is how the X became associated with a lover’s kiss.