I am trying to achieve AWS KMS envelope encryption on both iOS and Android. From the KMS API I get a 256 bit data key in both plaintext and encrypted forms (encrypted by a master key held only on KMS HSMs).
Right now, I am using iOS CommonCrypto and Android's built-in Cryptography library to encrypt sensitive data fields with AES-256-CBC.
This data is then sent over TLS to the server. Eventually, the events containing the encrypted fields are read out into into a secure ETL process where the fields are decrypted for analysis.
The reason I am encrypting on-device is so that the events may flow through existing data analytics infrastructure that isn't built to handle sensitive data. I want to do this without including additional dependencies to my client-side code.
Is CBC an appropriate choice for this? It is unclear to me if I need GCM for this. I can't find a good way to implement AES-GCM on any version of iOS except the latest one, v13.
Am I missing a more obvious design here to meet my needs?