使用EVP API可以使用AES CTR模式加密吗? [英] Is it possible to use AES CTR mode encryption using the EVP API?

查看:234
本文介绍了使用EVP API可以使用AES CTR模式加密吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是OpenSSL的新手。我明白加密应该使用作为所有密码的通用接口的EVP API执行。 AES CTR模式似乎存在于我拥有的OpenSSL版本中,但EVP_aes_128_ctr的定义在evp.h中被禁用:

I'm new to OpenSSL. I understand that encryption should be performed using the EVP API which acts as a common interface to all the ciphers. AES CTR mode seems to be present in the version of OpenSSL that I have, but the definition for EVP_aes_128_ctr is disabled in evp.h:

#if 0
const EVP_CIPHER *EVP_aes_128_ctr(void);
#endif

任何想法为什么会这样?我可以删除#if 0吗?要获取128位AES CTR模式加密在OpenSSL中工作的任何其他指针将不胜感激!

Any idea why this is? Can I just remove the #if 0? Any other pointers on getting 128 bit AES CTR mode encryption to work in OpenSSL would be appreciated!

谢谢!

推荐答案

Btw,看起来像这样的答案是没有,还没有。但也许很快我发现这个电子邮件主题表明,解决此问题的修补程序可能已于2010年6月提交:

Btw, it looks like the answer to this is no, not yet. But maybe soon. I found this email thread indicating that a patch to address this issue may have been submitted in June 2010:

http://www.mail-archive.com/libssh2-devel@cool.haxx.se/msg01972.html

但是当我从SVN下载最新的开发分支机构时,执行副总裁仍然没有启用AES点击率。我最终只是直接实现它,我发现这个链接有帮助:

But when I downloaded the latest development branch from SVN, AES CTR was still not enabled in EVP. I ended up just implementing it directly, for which I found this link helpful:

AES CTR 256 Encryption Mode of operation on OpenSSL

这篇关于使用EVP API可以使用AES CTR模式加密吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆