  Underutilized wireless channel is a waste of spectral resource. Eavesdropping
compromises data secrecy. How to overcome the two problems with one solution?
In this paper, we propose a spectrum sharing model that defends against
eavesdropping. Consider a source-destination channel that is being
eavesdropped. Cognitive radio can help jamming the eavesdropper. Friendly
jamming is a physical layer security method of protecting data secrecy based on
radio propagation characteristic. In return, the helper is allowed to access
the unused channel of the source. The desirable characteristic of cognitive
radio is its capability of sensing the occupancy or vacancy of the channel.
This work investigates the secrecy capacity $C_S$ and energy efficiency $\mu$
of such a spectrum sharing network that deploys physical layer security method.
The main factors that affect $C_S$ and $\mu$ are the transmit powers of the
source and cognitive radio. We present a novel expression that permits finding
the sensing duration $t$ that optimizes $\mu$.
