If we do not encrypt a message, we can use a checksum to check data integrity. For authenticated encryption, we no longer need the checksum because we use the authentication tag to verify data integrity.
The above is about error-checking. Now, for error correcting (like Hamming code), is there an encryption scheme that
- Can check for integrity,
- Can correct one or two bit flips of the ciphered text, and
- The encrypted message is a random byte string statistically?
The authenticated encryption scheme has 1,3 but not 2. Of course, we can add a layer of ECC after encryption. But then 3 does not hold as ECC makes the encrypted stream not entirely random.
We know it is better to use authentication tags instead of just adding a sha256 checksum to the message for verification. I wonder if we follow this way of reasoning, can we merge encryption, authentication, and ECC together in a nice way.