I am just wondering if IPPAESInit works the same way in the enclave (compiled with sgx_tcrypto) as with the traditional IPP library? I am using this function to initialize the context pointer in order to do AES-CBC encryption (using ippsAESEncryptCBC). Both Enclave and the client program share a key. It seems it is not working properly on the enclave side.
I tried to print the content of the pCtx as an integer in both sides. On the client side (traditional IPP), it gives me a long integer (which is reasonable) and on the enclave it is giving me always 0. I am suspecting that it is not working properly.
I tried to set the key again using ippsAESSetKey, but pCtx (context) is still giving 0.
The project is compiled successfully and IPPAESInit is returning ippStsNoErr on both sides. This is a linux project.
There is nothing wrong with the IPPAESInit function inside and outside the enclave. If you have a problem like mine, please make sure that you don't by accident, for any reason, change the encrypted buffer when passed to the enclave (like my situation). It is working fine.