Intel® TinyCrypt: AES-128/CTR to encryption/decryption of 2D arrays
I find your code a bit dense and hard to read overall.

Your identifier names are compound words but all lower case.

plaintext


I prefer plainText others would prefer plain_text (and a lot of the code uses this second C like style). But either is preferable to your current style.

This seems redundant.

uint32_t result = TC_CRYPTO_SUCCESS;
result = tc_aes128_set_encrypt_key(&amp;sched, params.key);


Just use one line:

uint32_t result = tc_aes128_set_encrypt_key(&amp;sched, params.key);


Technically both functions exhibit undefined behavior (in C++ not sure about C). There is no return on successful completion.

    if (result != TC_CRYPTO_SUCCESS)
      return result;
  }
  // Add the following line
  return result;
}