相关疑难解决方法(0)

加密/解密在两个不同的openssl版本之间不能很好地工作

我已经下载并编译了openssl-1.1.0.

我可以加密,并使用相同的exe解密openssl(如这里)

me@ubuntu:~/openssl-1.1.0$ LD_LIBRARY_PATH=. ./apps/openssl aes-256-cbc -a -salt -in file.txt -out file.txt.enc
enter aes-256-cbc encryption password: 123
Verifying - enter aes-256-cbc encryption password:
me@ubuntu:~/openssl-1.1.0$ LD_LIBRARY_PATH=. apps/openssl aes-256-cbc -a -d -in file.txt.enc -out file.txt.dec
enter aes-256-cbc decryption password: 123
Run Code Online (Sandbox Code Playgroud)

openssl用于:libcrypto.so.1.1, libssl.so.1.1

当我尝试openssl使用我的ubuntu上安装的解密时,它使用: /lib/x86_64-linux-gnu/libssl.so.1.0.0, /lib/x86_64-linux-gnu/libcrypto.so.1.0.0

我收到一个错误:

me@ubuntu:~/openssl-1.1.0$ openssl aes-256-cbc -a -d -in file.txt.enc -out file.txt.dec2
enter aes-256-cbc decryption password: 123
bad decrypt
140456117421728:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:539:
Run Code Online (Sandbox Code Playgroud)

可能是什么原因导致的 谢谢

linux encryption openssl cryptography libssl

30
推荐指数
1
解决办法
1万
查看次数

标签 统计

cryptography ×1

encryption ×1

libssl ×1

linux ×1

openssl ×1