Hi @lukaszadrapa ,
I used the keyderiveCopyKeyReq struct to get the key for my AES encryption. I am sure that my key catalog is correct. My keyhandle points to the Shared key that i derived using the keyderiveReq and which I stored in the RAM key handle with group index as 3. The targethandle to the new RAM catalog for the AES. After all these still i get the invalid_params. Please help me in finding out the issue
已解决! 转到解答。
Hi @kerti1
This is original function from HSE Demo Examples:
The key point - whole descriptor is erased before next use. This is not implemented in your code, so there are some leftovers from previous operations. Let's compare parameters in your original version:
... with version when the descriptor was cleared at the beginning (I did that manually in my debugger):
As you can see, I got HSE_SRV_RSP_OK when the descriptor is erased before setting of parameters. Obviously HSE could not accept those messed parameters.
Regards,
Lukas
Hi @kerti1
This is original function from HSE Demo Examples:
The key point - whole descriptor is erased before next use. This is not implemented in your code, so there are some leftovers from previous operations. Let's compare parameters in your original version:
... with version when the descriptor was cleared at the beginning (I did that manually in my debugger):
As you can see, I got HSE_SRV_RSP_OK when the descriptor is erased before setting of parameters. Obviously HSE could not accept those messed parameters.
Regards,
Lukas