An apparatus for insertion in a communications line for providing both message integrity and message secrecy within a significant portion of existing communications networks. At the transmitter end, the apparatus receives messages from the communications line, enciphers them on a bit-by-bit basis and retransmits them onto the communications line. At the receiver end, the apparatus receives messages from the communications line, deciphers them on a bit-by-bit basis and retransmits them onto the communications line. The apparatus contains both a transmitter and receiver and is capable of full duplex operation in a bidirectional communications line. According to the invention, data is enciphered by combining the data received with the output of an algorithm, the algorithm output being responsive to data previously received and a unique key entered by the user. As a data bit is received, it is combined with the output of the algorithm, transmitted, and using cipher feedback techniques fed back as an input to the algorithm to be used to encipher subsequently received data bits. Data is deciphered using equivalent elements as used for enciphering, the basic difference in the apparatus operation being the point from which data fed back into the algorithm is taken.