Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ms-access/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
i.MX6 CAAM上使用cryptodev的OpenSSL加速_Openssl_Cryptoapi_Hardware Acceleration_Imx6 - Fatal编程技术网

i.MX6 CAAM上使用cryptodev的OpenSSL加速

i.MX6 CAAM上使用cryptodev的OpenSSL加速,openssl,cryptoapi,hardware-acceleration,imx6,Openssl,Cryptoapi,Hardware Acceleration,Imx6,我正试图通过cryptodev利用I.MX6上的CAAM硬件。在openssl速度基准测试中,加速效果看起来不错。例如,在运行时: openssl speed -evp aes-256-cbc -engine cryptodev 我得到了很好的加速,我可以看到CAAM的中断在/proc/interrupts中迅速增加。 但是,我需要在应用程序中使用加密,因此我使用OpenSSL API函数进行信封加密: int EVP_SealInit(EVP_CIPHER_CTX *ctx, const

我正试图通过cryptodev利用I.MX6上的CAAM硬件。在openssl速度基准测试中,加速效果看起来不错。例如,在运行时:

openssl speed -evp aes-256-cbc -engine cryptodev
我得到了很好的加速,我可以看到CAAM的中断在/proc/interrupts中迅速增加。 但是,我需要在应用程序中使用加密,因此我使用OpenSSL API函数进行信封加密:

 int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char **ek, int *ekl, unsigned char *iv, EVP_PKEY **pubk, int npubk);

 int EVP_SealUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, unsigned char *in, int inl);

 int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out,
             int *outl);
将EVP_aes_256_cbc()作为常量EVP_CIPHER*类型传递。
这里我没有得到任何加速,我也没有看到CAAM的中断在/proc/interrupts中增加。有人能告诉我这个场景中的错误吗?“openssl速度”基准运行正常时,为什么API调用没有使用CAAM引擎?

您是否将密码的引擎实现注册为默认值?CAAM引擎的优先级最高(3000),因此我希望默认情况下使用它。但这是我第一次使用openssl,所以我很可能是错的。您能告诉我如何注册引擎实现吗?是否可以通过以下方式实现:链接不起作用,但是的,我会在这里寻找解决方案。似乎您需要初始化引擎,然后调用engine\u set\u default.*。这对我很有用!我现在可以使用CAAM引擎了。谢谢您是否将密码的引擎实现注册为默认值?caam引擎的优先级最高(3000),因此我希望它在默认情况下使用。但这是我第一次使用openssl,所以我很可能是错的。您能告诉我如何注册引擎实现吗?是否可以通过以下方式实现:链接不起作用,但是的,我会在这里寻找解决方案。似乎您需要初始化引擎,然后调用engine\u set\u default.*。这对我很有用!我现在可以使用CAAM引擎了。谢谢