在OpenSSL中澄清EVP_BytesToKey()函数 [英] Clarifying the EVP_BytesToKey() function in OpenSSL

查看:1442
本文介绍了在OpenSSL中澄清EVP_BytesToKey()函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在查看此网页: http://www.openssl.org/ docs / crypto / EVP_BytesToKey.html



在这里,它显示以下内容:



>如果总密钥和IV长度小于摘要长度并且使用MD5,则导出算法与PKCS#5 v1.5兼容,否则使用非标准扩展来导出额外数据。 p>

我使用AES-256-CBC密码和MD5。从上面的摘录中可以看出什么?这是否意味着我与PKCS#5 v1.5兼容,还是意味着它使用了一些非标准的东西?

解决方案

这是它的意思。 PKCS5版本1.5假定密钥字节数加上IV字节数小于或等于散列函数输出的大小。 PKCS5版本2 修复了这些问题,但在定义EVP_BytesToKey函数后出现,因此EVP_BytesToKey生成密钥字节,用于以非标准方式更大的密钥大小。


I'm looking at this page: http://www.openssl.org/docs/crypto/EVP_BytesToKey.html

There, it says the following:

If the total key and IV length is less than the digest length and MD5 is used then the derivation algorithm is compatible with PKCS#5 v1.5 otherwise a non standard extension is used to derive the extra data.

I'm using the AES-256-CBC cipher and MD5. What does that tell me judging from the above excerpt? Does it mean that I'm compatible with PKCS#5 v1.5, or does it mean that it's using some non-standard things?

解决方案

It means what it says. PKCS5 version 1.5 assumes that the number of key bytes plus the number of IV bytes is less than or equal to the size of the hash function output. PKCS5 version version 2 fixes these issues but it came out after the EVP_BytesToKey function was defined, so EVP_BytesToKey generates key bytes for larger key size in a non-standard way.

这篇关于在OpenSSL中澄清EVP_BytesToKey()函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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