Disclosed is a system and method for optimizing error detection to detect
unauthorized modification of transmitted data. The system includes an
encrypting device and a decrypting device operatively coupled to the
first encrypting device. The encrypting device is configured to re-order
and encrypt a first data stream to form a second data stream, and the
decrypting device is configured to re-order and decrypt the second data
stream to form a third data stream substantially identical to the first
data stream. Each of the encrypting and decrypting devices includes at
least one pseudo-random number generator, a reversible function device
responsive to a first pseudo-random number generator to cause data stream
bits to be re-ordered, and a XOR function responsive to a second or the
first pseudo-random number generator to cause either consecutive portions
of the data stream bits to be encrypted or decrypted.