I want to encrypt a list of unique values and I want the property of when I encrypt the same value I get the same ciphertext (determinism). The adversary only observes the ciphertexts of a unique set of plaintext values. In this context would the following encryption algorithm be secure:
- I generate the sha256 hash of the plaintext value
- I use the hash as the IV to AES-GCM to encrypt the plaintext value
Is the resulting ciphertext which includes the hash of the plaintext value secure?