I'm looking at using HMAC + CBC. The combination looks like this:
ciphertext = AES256(text, k1)
data = HMAC-SHA256(iv | ciphertext, k2) | iv | ciphertext
Where:
k1 = 32 byte key - Randomly generated, once
k2 = 32 byte key - Randomly generated, once
iv = 16 bytes - Randomly generated, for every message
The purpose is for storing sensitive information in a database.
Is the above approach cryptographically secure for sensitive information? Would there be any reason to consider a stream-cipher mode verses a block-cipher mode like CBC?
Would an AEAD mode like OCB or CCM be more appropriate?
If an AEAD mode is not available for the platform we are using (specifically Go), is it worth the effort trying to implement these modes?