encryption - Is authentication required/recommended with a stream cipher? -


I want to secure the transmission of a TCP-based program by using a shared passphrase / key. The easiest way to do this is to use a straight one without handling the block size, padding ... In this way, the amount of data is not changed between clear and encrypted data and the modification is trivial.

Using only one stream cipher means that there is no authentication and I have always considered / heard about that encryption authentication is not secure enough and should not be used.

If it is compulsory to add authentication to a stream cipher, then we lose the simplicity that the stream cipher has been added because we need to add an HMAC or use an authenticated encryption method (eg From NaCl), there is a minimum message length, we have to handle padding ...

What would you recommend? Is it safe to use only stream ciphers without certification in certain cases?

Using any type of message authenticator Important with stream cipher Important , because changes in ciphertext and changes in plain text are so simple.

Remember the most important rule of stream cipher:

Remember to be the most important rule of the stream cipher:

Do not reuse the same keystream, just blindly, without adding any additional information to the Stream Cipher stream. Do

so long as you are not just encrypting an single connection, and then throwing a passphrase, you create a session key for each connection from shared secret would be required. This means that you will need to send some additional information at the beginning of the connection, and since you are sending it anyway, there should not be a big deal after every message.

Using a stream cipher as it seems simple is usually a mistake, anyway. You mentioned crypto_secretbox from NaCl - I recommend using it, it will take care of authentication and padding problems for you.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -