OpenSSL:修订间差异

来自Gea-Suan Lin's Wiki
跳到导航 跳到搜索
此页面具有访问限制。如果您看见此消息,则说明您没有权限访问此页面。
第6行: 第6行:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
openssl enc -bf-cbc -pbkdf2 -in a.tgz -out a.tgz.bf-cbc
openssl enc -bf-cbc -pbkdf2 -in a.tgz -out a.tgz.pbkdf2.bf-cbc
openssl enc -d -bf-cbc -pbkdf2 -in a.tgz.bf-cbc -out a.tgz
openssl enc -d -bf-cbc -pbkdf2 -in a.tgz.pbkdf2.bf-cbc -out a.tgz
</syntaxhighlight>
</syntaxhighlight>



2023年2月17日 (五) 04:35的版本

OpenSSL是一套综合各种密码学算法的软件。

范例

加密与解密,这边使用了PDKDF2:

openssl enc -bf-cbc -pbkdf2 -in a.tgz -out a.tgz.pbkdf2.bf-cbc
openssl enc -d -bf-cbc -pbkdf2 -in a.tgz.pbkdf2.bf-cbc -out a.tgz

值得注意的是,OpenSSL在1.1.0后(差不多是Ubuntu 14.04到16.04的时期)修改了digest算法(从md5变成sha-256),所以处理旧的档案时需要指定md5[1]

openssl enc -d -bf-cbc -md md5 -in a.tgz.bf-cbc -out a.tgz

参考文献

外部链接