什么是OpenSSL中的API,比如JavaDES/CBC/PKCS5P?

什么是OpenSSL中的API,比如JavaDES/CBC/PKCS5P?,java,c,openssl,password-encryption,encryption-symmetric,Java,C,Openssl,Password Encryption,Encryption Symmetric,我想解密由javax.crypto.Cipher的“DES/CBC/PKCS5Padding”加密的密码。我必须使用OpenSSL来解密密码。我应该使用OpenSSL中的哪个API 我知道DES3的API是DES\u ede3\u cbc\u encrypt,我想知道DES。你也应该使用EVP.*函数;而不是像DES_ede3\u cbc\u encrypt(和朋友)这样的功能。请参见OpenSSL wiki上的 要回答有关DES符号的问题,您需要使用EVP_DES_XXX,其中XXX是一种感兴

我想解密由javax.crypto.Cipher的“DES/CBC/PKCS5Padding”加密的密码。我必须使用OpenSSL来解密密码。我应该使用OpenSSL中的哪个API


我知道DES3的API是
DES\u ede3\u cbc\u encrypt
,我想知道DES。

你也应该使用
EVP.*
函数;而不是像
DES_ede3\u cbc\u encrypt
(和朋友)这样的功能。请参见OpenSSL wiki上的

要回答有关DES符号的问题,您需要使用
EVP_DES_XXX
,其中
XXX
是一种感兴趣的模式。我猜你想要的是
EVP\u des\u cbc

如果您在CentOS机器上使用FIPS版本的OpenSSL,并且FIPS模式处于活动状态,则您可能无法访问任何DES或2键3DES算法(3键3DES应可用)


以下是我为OpenSSL和Java互操作保留的一些参考资料。通常会引起一些问题


我使用了
DES\u ncbc\u encrypt
,它可以很好地解密由Java的DES/CBC/pkcs5p加密的密码。
$ cd openssl
$ grep EVP_des include/openssl/evp.h
const EVP_CIPHER *EVP_des_ecb(void);
const EVP_CIPHER *EVP_des_ede(void);
const EVP_CIPHER *EVP_des_ede3(void);
const EVP_CIPHER *EVP_des_ede_ecb(void);
const EVP_CIPHER *EVP_des_ede3_ecb(void);
const EVP_CIPHER *EVP_des_cfb64(void);
const EVP_CIPHER *EVP_des_cfb1(void);
const EVP_CIPHER *EVP_des_cfb8(void);
const EVP_CIPHER *EVP_des_ede_cfb64(void);
const EVP_CIPHER *EVP_des_ede3_cfb64(void);
const EVP_CIPHER *EVP_des_ede3_cfb1(void);
const EVP_CIPHER *EVP_des_ede3_cfb8(void);
const EVP_CIPHER *EVP_des_ofb(void);
const EVP_CIPHER *EVP_des_ede_ofb(void);
const EVP_CIPHER *EVP_des_ede3_ofb(void);
const EVP_CIPHER *EVP_des_cbc(void);
const EVP_CIPHER *EVP_des_ede_cbc(void);
const EVP_CIPHER *EVP_des_ede3_cbc(void);
const EVP_CIPHER *EVP_desx_cbc(void);
const EVP_CIPHER *EVP_des_ede3_wrap(void);