A method for generating a shared secret between a first user and a second user of a network is provided. The first user receives from the second user a first training sequence via a communication link between the first user and the second user. The first user ascertains at least one first value for at least one physical property of the communication link, and determines a portion of the shared secret as a function of the first value. A comparison of the first value to at least one threshold takes place for determining the portion of the shared secret. The first user transmits the first training sequence to the second user via the communication link, and adapts the transmission parameters of the first training sequence as a function of the position of the first value relative to the threshold.