In this paper, a design of a chaos-based keystream generator (KSG) using a novel permutation technique with various two-dimensional patterns and a substitution technique with <em>Z</em><sub>4</sub> mapping is proposed. Initially, a chaotic function such as a logistic map is used to generate a pseudo-random number. Then these numbers are converted into binary sequences using binary mapping. In order to achieve statistical properties of the resultant binary sequences, a novel method of KSG is developed by considering parameters such as initial value “x<sub>0</sub>”, system parameter “<em>r</em>”, novel permutation techniques defined by 2-dimensional patterns, and substitution technique defined over Z<sub>4</sub> transformation. The binary sequences so obtained are subjected to randomness tests by applying the National Institute of Standards and Technology (NIST) SP-800-22 (Revision 1a) test suite for investigation of its randomness properties to obtain suitable sequences which can be used as a key for cryptographic applications. From the results obtained, it is found that the binary sequences exhibit better randomness properties as per the cryptographic requirements.