Phase diversity is a phase-retrieval algorithm that uses a pair of intensity images taken symmetrically about the wave front to be determined. If these images are taken about the system input pupil this is equivalent to a curvature-sensing algorithm. Traditionally a defocus aberration kernel is used to produce the phase-diverse data. We present a generalization of this method to allow the use of other functions as the diversity kernel. We discuss the necessary and sufficient conditions that such a function must satisfy for use in a null wave-front sensor. Computer simulations were used to validate these results.