信息安全原理
作业3
将自己公钥发给助教,助教传回一份本人公钥加密的文件和公钥文件。
首先,用自己的私钥解密文件
gpg -d Homework3.txt.gpg
您需要输入密码,才能解开这个用户的私钥:“amrzs (rsa for information security course) <myemail@gmail.com>”
2048 位的 RSA 密钥,钥匙号 13F9301C,建立于 2014-03-18 (主钥匙号 340E02B6)
gpg: 由 2048 位的 RSA 密钥加密,钥匙号为 13F9301C、生成于 2014-03-18
“amrzs (rsa for information security course) <myemail@gmail.com>”
Hello,Buddy~
This is the Course of "Introduction to Information Security".
Congratulations! You have decrypted the file successfully!
导入对方公钥
gpg --import public_key
gpg: 密钥 FD07E1F5:公钥“×× <××@gmail.com>”已导入
gpg: 合计被处理的数量:1
gpg: 已导入:1 (RSA: 1)
现在可以用 $ gpg --list-keys 查看已有的密钥
用对方密钥加密文件