Please, do not do that. Encryption without authentication is pointless as attacker can manipulate the plaintext without any problems (without knowing the plaintext):
iex> key = :crypto.strong_rand_bytes(32)
iex> <<a, rest::binary>> = iv = :crypto.strong_rand_bytes(16)
iex> plaintext = "Abba"
iex(46)> iv1 = Bitwise.bxor(a, 3) <> rest
iex(47)> ct = :crypto.crypto_one_time(:aes_256_cbc, key, iv, plaintext, encrypt: true, padding: :pkcs_padding)
iex(48)> :crypto.crypto_one_time(:aes_256_cbc, key, iv1, ct, encrypt: false, padding: :pkcs_padding)
"Bbba"
So as you can see, I can change first letter from A to B without any problems. This is huge problem as you no longer can trust the cipher text.
In short - do not use non-AEAD ciphers, never.






















