This is my scenario:
- A small structured text message (1-2kB) is to be sent over an insecure channel.
- Everything except for the header portion (which contains a title, timestamp, category and tags) is confidential.
- The message as a whole has integrity and non-repudiation as additional requirements.
This is how I intend to go about it after having done some crypto-related research:
- Encrypt the message with AES-CBC/OFB/CTR (key is pre-shared). The IV is added to the front of the ciphertext.
- Add the non-confidential portions to the output from (1).
- Make a digest-hash(SHA512 or RIPEMD160) of the output from (2) and encrypt it with the message author's private key (public key is pre-shared). Add that to the output from (2).
Send it over the insecure channel.
I know that MAC algorithms and digest algorithms were designed for different purposes, but in this case, my digest is not merely slapped onto the payload, it is asymmetrically encrypted.
So, would the choice of AES-GCM/CCM/EAX have added any additional security? Does my scheme have any obvious vulnerability that I overlooked?
Any help is greatly appreciated.
- Fixed a typo. OBC $\rightarrow$ OFB.
- I did not realize that the hashing algorithms are already built into all the major signing algorithms; I thought you had to do it yourself. Thanks for clearing that up.
NOTE: I would have chosen Ricky D.'s advice, but comments cannot be chosen as answers.