新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
詳解LinuxGPG加密
GPG 可以用來簽署和加密數(shù)據(jù)。方便發(fā)送和接收方進行數(shù)據(jù)加密和對方身份的確認。GPG 使用對稱加密技術(shù)來加密大段內(nèi)容,而采用非對稱加密技術(shù)來交換對稱加密的秘鑰。

創(chuàng)新互聯(lián)公司作為成都網(wǎng)站建設(shè)公司,專注網(wǎng)站建設(shè)、網(wǎng)站設(shè)計,有關(guān)企業(yè)網(wǎng)站建設(shè)方案、改版、費用等問題,行業(yè)涉及門窗定制等多個領(lǐng)域,已為上千家企業(yè)服務(wù),得到了客戶的尊重與認可。
在Ubuntu下,用GPG命令可以實現(xiàn)文件的加密和解密,而且GPG基本上每個發(fā)行版都會預(yù)裝。
gpg -c file # 加密一個文件,會生成file.gpg
gpg file.gpg # 解密file.gpg 還原成file文件
常用基本命令
gpg --gen-key # 生成秘鑰對
gpg --list-keys # 查看已有的秘鑰
gpg --delete-secret-keys <...> # 刪除私鑰
gpg --delete-key <...> # 刪除公鑰
gpg --armor --output public.key --export
# 導(dǎo)出私鑰 gpg --armor --output private.key --
export-secret-keys
# 導(dǎo)出公鑰 gpg --keyserver hkp://keyserver.ubuntu.com:11371 --send-keys
# 將公鑰上傳服務(wù)器
生成秘鑰時候如果出現(xiàn)下面的提示后卡住
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
手動安裝一下面的軟件即可解決問題!
sudo apt install rng-tools
下面是我在本地生成秘鑰對并將公鑰發(fā)到了服務(wù)器
公鑰服務(wù)器:http://keys.gnupg.net/、http://keyserver.ubuntu.com:11371/
分享標(biāo)題:詳解LinuxGPG加密
文章路徑:http://www.fisionsoft.com.cn/article/dhiscop.html


咨詢
建站咨詢
