In cipher.rs
psa_crypto_sys::psa_cipher_set_iv is called without checking if the operation requires setting IV or not.
In case ECB operations this function psa_crypto_sys::psa_cipher_set_iv should not be called.
Available approaches:
- Check operation mode and call the function if iv is required.
- Pass the IV as an Option and here the responsibility of the caller is to determine if the iv is required or not.
if the user misused it then the function will propagate the error.