  Bell's theorem states that no local realistic explanation of quantum
mechanical predictions is possible, in which the experimenter has a freedom to
choose between different measurement settings. Within a local realistic picture
the violation of Bell's inequalities can only be understood if this freedom is
denied. We determine the minimal degree to which the experimenter's freedom has
to be abandoned, if one wants to keep such a picture and be in agreement with
the experiment. Furthermore, the freedom in choosing experimental arrangements
may be considered as a resource, since its lacking can be used by an
eavesdropper to harm the security of quantum communication. We analyze the
security of quantum key distribution as a function of the (partial) knowledge
the eavesdropper has about the future choices of measurement settings which are
made by the authorized parties (e.g. on the basis of some quasi-random
generator). We show that the equivalence between the violation of Bell's
inequality and the efficient extraction of a secure key - which exists for the
case of complete freedom (no setting knowledge) - is lost unless one adapts the
bound of the inequality according to this lack of freedom.
