Closed cezane closed 6 years ago
It sounds like you want to pass in clear
, but you're actually passing in ciph
in cipher_buffer(&ctx, ciph, temp, AES_TEST_BUFFER_SIZE);
. Try cipher_buffer(&ctx, clear, ciph, AES_TEST_BUFFER_SIZE);
instead.
Yes, @vchong . I just noticed few minutes after opening this issue. The code was correct, but I was just seeing the print of the "decrypt" part, when ciph
is passed (few lines before it is possible to see the clear
string printed correctly). Thank you.
I am changing the AES example in order to encrypt/decrypt some data received from the user. In the host main.c file, I am using:
In the TA side, I put the following in the
cipher_buffer
function:And I am getting the following output:
I would like to know if I am missing something because
(char *) params[0].memref.buffer
is not printing the string I am passing. I knowTEE_PARAM_TYPE_MEMREF_INPUT
has two attributes: a buffer (void *
) and a size (size_t
). So, why this cast is not working properly?Thank you.