GBase 8a
其他
文章
linux通过 gpg -d 解密时报gpg: WARNING: message was not integrity protected的解决方法
GBase社区管理员发表于2022-02-16 14:14:3818次浏览0个评论
gpg加密时,建议指定高强度的算法,来达到足够的安全性,比如AES256,由此来避免解密时的警告信息 gpg: WARNING: message was not integrity protected
报错现象
通过gpg -d 对加密后的文件进行解密时,出现警告信息:gpg: WARNING: message was not integrity protected
[root@gbase_rh7_001 ~]# gpg -c p.txt
[root@gbase_rh7_001 ~]#
[root@gbase_rh7_001 ~]# gpg -d -q p.txt.gpg
111111
gpg: WARNING: message was not integrity protected
原因
加密的算法保密力度不够,建议用AES256。
解决方案
加密时,增加参数 --cipher-algo AES256 ,解密时就不在出现警告信息
[root@gbase_rh7_001 ~]# gpg --cipher-algo AES256 -c p.txt
File `p.txt.gpg' exists. Overwrite? (y/N) y
[root@gbase_rh7_001 ~]#
[root@gbase_rh7_001 ~]#
[root@gbase_rh7_001 ~]# gpg -d -q p.txt.gpg
111111
[root@gbase_rh7_001 ~]#
评论已关闭
热门帖子
- 12025-12-01浏览数:182764
- 22023-05-09浏览数:25062
- 42023-09-25浏览数:18526
- 52020-05-11浏览数:17529