I'm thinking about using a cipher, which uses AES CTR+SHA-3. My basic idea is this:
So, basically, the encrypted data contains the following:
- IV for AES-CTR
- AES-CTR encrypted of the following:
- size of plaintext in 64-bit little endian encoding
- Keyed SHA-3 of 1. and 2.
Is there a standard/recommendation, which is like this? I don't want to design the system from scratch, as I certainly will make mistakes, so I'd like to follow some standard designed by experts.
I'd like to use SHA-3 in way I written (if possible), not like as RFC2104 uses it (
H(K XOR opad, H(K XOR ipad, text)))
But, if SHA-3 is better if it is used in a Encrypt-then-MAC way, I'll accept it.