Fix AES GCM IV setting in KeyProvider
The proper order of setting an IV of custom length in GCM is to firstly
pass the length and then the IV during both encryption and decryption.
The KeyProvider code was doing the opposite which resulted in
truncating the IV to 12B. In openssl3.0 The effect is somewhat
diffferent but the output is also invalid.
Openssl silently ignores this issue allowing to call the API in wrong
order and get invalid encryption/decryption results.
The issue was not detected until now because the IV truncation was
working the same way during encryption and decryption and no other
module beside key-manager was accessing the encrypted keys.
This commit modifies KeyProvider code in 2 ways:
* Modify encryption and decryption to set the IV length properly.
* If decryption fails retry it with IV truncated to 12B to handle data
encrypted the old way.
Change-Id: I72e237b0842234d80579f3e93b5e1012a0613140