This paper proposes a novel matched filter optimization based approach to improve secrecy in a communication among two legitimate users. The presented optimization scheme, named as QoS-based filter design, minimizes the stop-band attenuation and uses quality-of-service constraints on the legitimate receiver and an eavesdropper. The resulting problem is relaxed to a convex problem. The filter coefficients are optimal regarding the legitimate receiver's matched filter auto-correlation function, however, it results in a sub-optimal filter for the eavesdropper secrecy constraints. Therefore, an additional post-processing is developed to match the secrecy constraints.