  A Gaussian multiple-input multiple-output wiretap channel in which the
eavesdropper and legitimate receiver are equipped with arbitrary numbers of
antennas and the transmitter has two antennas is studied in this paper. Under
an average power constraint, the optimal input covariance to obtain the secrecy
capacity of this channel is unknown, in general. In this paper, the input
covariance matrix required to achieve the capacity is determined. It is shown
that the secrecy capacity of this channel can be achieved by linear precoding.
The optimal precoding and power allocation schemes that maximize the achievable
secrecy rate, and thus achieve the capacity, are developed subsequently. The
secrecy capacity is then compared with the achievable secrecy rate of
generalized singular value decomposition (GSVD)-based precoding, which is the
best previously proposed technique for this problem. Numerical results
demonstrate that substantial gain can be obtained in secrecy rate between the
proposed and GSVD-based precodings.
