This paper presents a new joint radar and communication technique based on the classical stepped frequency radar waveform. The randomization in the waveform, which is achieved by using permutations of the sequence of frequency tones, is utilized for data transmission. A new signaling scheme is proposed in which the mapping between incoming data and waveforms is performed based on an efficient combinatorial transform called the Lehmer code. Considering the optimum maximum likelihood (ML) detection, the union bound and the nearest neighbour approximation on the communication block error probability is derived for communication in an additive white Gaussian noise (AWGN) channel. The results are further extended to incorporate the Rician fading channel model, of which the Rayleigh fading channel model is presented as a special case. Furthermore, an efficient communication receiver implementation is discussed based on the Hungarian algorithm which achieves optimum performance with much less operational complexity when compared to an exhaustive search. From the radar perspective, two key analytical tools, namely, the ambiguity function (AF) and the Fisher information matrix are derived. Furthermore, accurate approximations to the Cramer-Rao lower bounds (CRLBs) on the delay and Doppler estimation errors are derived based on which the range and velocity estimation accuracy of the waveform is analysed. Numerical examples are used to highlight the accuracy of the analysis and to illustrate the performance of the proposed waveform.