Hi,
In the CAAM sample code, it uses buffer allocated with kzalloc() when doing crypto calculation:
input = kzalloc(block_size, GFP_KERNEL | GFP_DMA);
memcpy(input, text, block_size);
sg_init_one(sg, input, block_size);
iv_len = crypto_ablkcipher_ivsize(tfm);
if (iv_len)
memset(&iv, 0xff, iv_len);
ablkcipher_request_set_crypt(req, sg, sg, block_size, iv);
Is is possible to use the memory from keystore to do the ciphering?
Something like:
We need this when we're doing the key variant calculation.
We want the calculated result is located in the secure memory as it will be used as a cipher key.
Regards,
Ethan
Hello,
“CAAM implements operations that convert between blob encapsulation
and black-key encapsulation without exposing the key in plaintext.”
But we do not have such example for publishing, sorry.
You may apply to Professional Services:
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------