  We analyze theoretically optimal operation of an optical key distribution
(OKD) link based on fine intensity modulation of an optical signal transmitted
over an attenuating channel to a direct detection receiver. With suitable
digital postprocessing, the users may generate a secret key that will be
unknown to an unauthorized party collecting passively a fraction of the signal
that escapes detection by the legitimate recipient. The security is ensured by
the presence of the shot noise that inevitably accompanies eavesdropper's
attempt to detect the collected signal. It is shown that the key amount depends
on a ratio that compares legitimate recipient's and eavesdropper's capabilities
to detect the signal, including noise contributed by their respective
detectors. A simple proportionality relation is derived in the strong
eavesdropping regime and closed expressions for the optimal depth of binary
intensity modulation as well as the discrimination thresholds for hard-decoded
direct detection are given. The presented results substantially simplify design
of practical OKD systems operating under changing external conditions, e.g.
variable atmospheric absorption in the case of free-space optical links.
