Based on a stream encryption scheme with avalanche effect (SESAE), a stream encryption scheme with both key avalanche effect and plaintext avalanche effect (SESKPAE) is introduced. Using this scheme and an ideal 2d-word (d-segment) pseudorandom number generator (PRNG), a plaintext can be encrypted such that each bit of the ciphertext block has a change with the probable probability of (2d−1)/2d when any word of the key is changed or any bit of the plaintext is changed. To that end, a novel four-dimensional discrete chaotic system (4DDCS) is proposed. Combining the 4DDCS with a generalized synchronization (GS) theorem, a novel eight-dimensional discrete GS chaotic system (8DDGSCS) is constructed. Using the 8DDGSCS, a 216-word chaotic pseudorandom number generator (CPRNG) is designed. The keyspace of the 216-word CPRNG is larger than 21195. Then, the FIPS 140-2 test suit/generalized FIPS 140-2 test suit is used to test the randomness of the 1000-key streams consisting of 20000 bits generated by the 216-word CPRNG, the RC4 algorithm PRNG and the ZUC algorithm PRNG, respectively. The test results show that for the three PRNGs, there are 100%/98.9%, 99.9%/98.8%, 100%/97.9% key streams passing the tests, respectively. Furthermore, the SP800-22 test suite is used to test the randomness of four 100-key streams consisting of 1000000 bits generated by four PRNGs, respectively. The numerical results show that the randomness performances of the 216-word CPRNG is promising, showing that there are no significant correlations between the key streams and the perturbed key streams generated via the 216-word CPRNG. Finally, using the 216-word CPRNG and the SESKPAE to encrypt two gray-scale images, test results demonstrate that the 216-word CPRNG is able to generate both key avalanche effect and plaintext avalanche effect, which are similar to those generated via an ideal CPRNG, and performs better than other comparable schemes.