Orthogonal frequency division multiplexing (OFDM) has been established as the preferred modulation choice for highrate data transmission over dispersive channels, as it allows rejection of inter-symbol interference (ISI) and efficient utilization of the available spectrum. We address the issues of determining achievable secrecy rates and secrecy capacity for OFDM transmission in the presence of a generic eavesdropper. In doing so, we refrain from making the restrictive assumption made in previous works that the eavesdropper uses a standard fast Fourier transform (FFT)-based demodulator. First, the high SNR secrecy capacity under a total input power constraint is evaluated for both cyclic prefix and zero-padding suffix OFDM systems. It is shown that in both cases the result is sensibly lower than what we would get if the eavesdropper used an OFDM receiver. Then, optimal power allocation schemes are proposed for both types of OFDM systems and the secrecy rates are compared with results obtained by using existing power allocation methods described in the literature for parallel Gaussian wiretap channels and multiple-input multiple-output (MIMO) Gaussian wiretap channels.