TEE_Attribute attr;
TEE_Result ret = TEE_SUCCESS;
- // TODO According to tef-simulator, here we should provide size in bits,
- // not bytes. Is it the same on other TEF implementations?
- TEE_InitRefAttribute(&attr, TEE_ATTR_SECRET_VALUE, key, key_bits_size);
+ TEE_InitRefAttribute(&attr, TEE_ATTR_SECRET_VALUE, key, (key_bits_size + 7)/8);
ret = TEE_AllocateTransientObject(tee_key_type, key_bits_size, hndl);
if (TEE_SUCCESS != ret) {
LOG("TEE_AllocateTransientObject has failed with=%x. Arguments=(tee_key_type=%X, "