GnuPG高级指导(6)在其他电脑上启用“我的密钥”

1 其他电脑上的密钥

[email protected]:~# gpg -K

/root/.gnupg/secring.gpg

------------------------

sec  1024D/D04D1A0B 2016-11-25 [expires: 2016-12-09]

uid                  debian8

ssb   2048g/C1845DA4 2016-11-25

sec  4096R/276856F7 2016-11-25 [expires: 2017-04-24]

uid                  FranklinYang (Encrypt RSA 4096) <[email protected]>

ssb   4096R/0A09DAC9 2016-11-25

[email protected]:~#

[email protected]:~#

可以删掉“临时”密钥 ------ debian8(或者不删也可以)

[email protected]:~# gpg --delete-secret-key D04D1A0B

gpg (GnuPG) 1.4.18; Copyright (C) 2014 Free Software Foundation, Inc.

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.

sec  1024D/D04D1A0B 2016-11-25 debian8

Delete this key from the keyring? (y/N) y

This is a secret key! - really delete? (y/N) y

[email protected]:~#

[email protected]:~# gpg --delete-key D04D1A0B

gpg (GnuPG) 1.4.18; Copyright (C) 2014 Free Software Foundation, Inc.

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.

pub  1024D/D04D1A0B 2016-11-25 debian8

Delete this key from the keyring? (y/N) y

[email protected]:~#

[email protected]:~# gpg -k

/root/.gnupg/pubring.gpg

------------------------

pub   4096R/276856F7 2016-11-25 [expires: 2017-04-24]

uid                  FranklinYang (Encrypt RSA 4096) <[email protected]>

sub   4096R/0A09DAC9 2016-11-25 [expires: 2017-04-24]

[email protected]:~# gpg -K

/root/.gnupg/secring.gpg

------------------------

sec# 4096R/276856F7 2016-11-25 [expires: 2017-04-24]

uid                  FranklinYang (Encrypt RSA 4096) <[email protected]>

ssb   4096R/0A09DAC9 2016-11-25

[email protected]:~#

[[email protected] ~]#

[[email protected] ~]# gpg -K

/root/.gnupg/secring.gpg

------------------------

sec#  4096R/276856F7 2016-11-25 [expires: 2017-04-24]

uid                  FranklinYang (Encrypt RSA 4096) <[email protected]>

ssb   4096R/0A09DAC9 2016-11-25

[[email protected] ~]# gpg -k

/root/.gnupg/pubring.gpg

------------------------

pub   4096R/276856F7 2016-11-25 [expires: 2017-04-24]

uid                  FranklinYang (Encrypt RSA 4096) <[email protected]>

sub   4096R/0A09DAC9 2016-11-25 [expires: 2017-04-24]

[[email protected] ~]#

[[email protected] ~]#

2 加密在debian8解密

opensuse13:~ #

opensuse13:~ # vi temp_txt.log

opensuse13:~ # cat temp_txt.log

Try

decrypt

on

debian

8

with

new

secret

key

opensuse13:~ #

opensuse13:~ #

opensuse13:~ # gpg -u "FranklinYang" -r "FranklinYang" -a -o temp_txt.log.gpg -e temp_txt.log

opensuse13:~ # l temp_txt.log.gpg

-rw-r--r-- 1 root root  969 Nov 26 14:22 temp_txt.log.gpg

opensuse13:~ #

opensuse13:~ #

opensuse13:~ # scp temp_txt.log.gpg [email protected]:/home/franklin/

[email protected]‘s password:

temp_txt.log.gpg                                            100%  969     1.0KB/s   00:00

opensuse13:~ #

opensuse13:~ #

opensuse13:~ #

(在debian8上解密)

[email protected]:~#

[email protected]:~#

[email protected]:~# gpg -d temp_txt.log.gpg

You need a passphrase to unlock the secret key for

user: "FranklinYang (Encrypt RSA 4096) <[email protected]>"

4096-bit RSA key, ID 0A09DAC9, created 2016-11-25 (main key ID 276856F7)

gpg: encrypted with 4096-bit RSA key, ID 0A09DAC9, created 2016-11-25

"FranklinYang (Encrypt RSA 4096) <[email protected]>"

Try

decrypt

on

debian

8

with

new

secret

key

[email protected]:~#

[email protected]:~#

[email protected]:~#

[email protected]:~#

[email protected]:~#

或者,在centos7上加密和签名,发给debian8:

[[email protected] ~]#

[[email protected] ~]#

[[email protected] ~]# cat temp.sig.log

Try

decrypt

on

debian

8

with

new

secret

key

encrypt

and

AND     signature

on      CENTOS7

!

sending

to

DEBIAN8

!

[[email protected] ~]#

[[email protected] ~]#

[[email protected] ~]#

[[email protected] ~]# gpg -a -o temp.sig.log.sig.CAST5.asc -u "FranklinYang" -r "FranklinYang" -se --cipher-algo CAST5 temp.sig.log

You need a passphrase to unlock the secret key for

user: "FranklinYang (Encrypt RSA 4096) <[email protected]>"

4096-bit RSA key, ID 276856F7, created 2016-11-25

[[email protected] ~]#

[[email protected] ~]#

[[email protected] ~]#

[[email protected] ~]# l temp.sig.log.sig.CAST5.asc

-rw-r--r--. 1 root root 1835 Nov 26 01:55 temp.sig.log.sig.CAST5.asc

[[email protected] ~]#

[[email protected] ~]#

[[email protected] ~]# scp temp.sig.log.sig.CAST5.asc [email protected]:/home/franklin/

[email protected]‘s password:

temp.sig.log.sig.CAST5.asc                                   100% 1835     1.8KB/s   00:00

[[email protected] ~]#

[[email protected] ~]#

(在debian8上解密并验证签名)

[email protected]:~#

[email protected]:~#

[email protected]:~# gpg -o temp.sig.log -d temp.sig.log.sig.CAST5.asc

You need a passphrase to unlock the secret key for

user: "FranklinYang (Encrypt RSA 4096) <[email protected]>"

4096-bit RSA key, ID 0A09DAC9, created 2016-11-25 (main key ID 276856F7)

gpg: encrypted with 4096-bit RSA key, ID 0A09DAC9, created 2016-11-25

"FranklinYang (Encrypt RSA 4096) <[email protected]>"

gpg: Signature made Mon 28 Nov 2016 11:25:08 PM CST using RSA key ID 276856F7

gpg: Good signature from "FranklinYang (Encrypt RSA 4096) <[email protected]>"

[email protected]:~#

[email protected]:~#

[email protected]:~# cat temp.sig.log

Try

decrypt

on

debian

8

with

new

secret

key

encrypt

and

AND     signature

on      CENTOS7

!

sending

to

DEBIAN8

!

[email protected]:~#

[email protected]:~#

[email protected]:~#

时间: 2024-10-05 20:01:01

GnuPG高级指导(6)在其他电脑上启用“我的密钥”的相关文章

GnuPG高级指导(4)加密分发我的私钥

私钥,需要绝密,绝对不让别人知道! 所以,分发私钥,可以加密一下! 1 给debian8加密一份“我的私钥” opensuse13:~ # opensuse13:~ # opensuse13:~ # gpg -a -r "debian8" -o FranklinYang.rsa.sec.key.debian8.asc --encrypt FranklinYang.rsa.sec.key gpg: C1845DA4: There is no assurance this key belo

GnuPG高级指导(3)导出私钥

1 为什么要导出分发私钥 友情提示:分发私钥,是危险的! 我有好几个电脑,只想用一对密钥:也就是说我需要把我的私钥,放到那几个电脑上.这样,我就就可以在任意电脑上,解密和签名以及其他. 1       怎么做 使用(临时)公钥把私钥加密,然后传到我的其他某个电脑,再解密. 3 我的debian8,生成(临时)密钥 [email protected]:~# gpg -K [email protected]:~# gpg -k /root/.gnupg/pubring.gpg -----------

GnuPG高级指导(5)分发我的私钥(+签名)

(加密 + 签名,保证私钥的安全) 1 给debian8加密(再IDEA加密)并签名一份“我的私钥” opensuse13:~ # opensuse13:~ # opensuse13:~ # gpg -r "debian8" -o FranklinYang.rsa.sec.key.sign.debian8.asc -a --se --cipher-algo IDEA FranklinYang.rsa.sec.key You need a passphrase to unlock the

GnuPG高级指导(2)上传/导出分发公钥

1 上传到keyserver opensuse13:~ # gpg -k /root/.gnupg/pubring.gpg ------------------------ pub   4096R/276856F7 2016-11-25 [expires: 2017-04-24] uid       [ultimate] FranklinYang (Encrypt RSA 4096) <[email protected]> sub   4096R/0A09DAC9 2016-11-25 [ex

GnuPG高级指导(1)GnuPG的用法

1       k与K 可以参考man gpg里的说明: -k --list-public-keys List  all  keys from the public keyrings, or just the keys given on the command line. Avoid using the output of this command in scripts or other  pro- grams  as  it  is likely to change as GnuPG chan

Android 用adb pull或push 拷贝手机文件到到电脑上,拷贝手机数据库到电脑上,拷贝电脑数据库到手机上

先说一下adb命令配置,如果遇到adb不是内部或外部命令,也不是可运行的程序或批量文件.配置下环境变量 1.adb不是内部或外部命令,也不是可运行的程序或批量文件. 解决办法:在我的电脑-属性-高级计算机配置-环境变量,系统变量找到path,把sdk的platform-tools添加进去就可以了. D:\Java\android\android-sdk\platform-tools 2.用命令行把手机上的文件拷贝到电脑上 adb pull sdcard/1222073679.png 拷贝文件夹命

java/matlab混合编程应用移植到其他电脑上遇到的问题

问题1:jar包部署在其他电脑上设置vm参数无效 @echo off start java -Xmx1028M -Xms1028M -XX:PermSize=100M -XX:MaxPermSize=100M -XX:SurvivorRatio=8 -jar Edition_1.0_fat.jar 要把参数设置在前面才有效,开始把jar包放前面虽然自己电脑能运行但是其他人的电脑不能运行 问题2:# An unexpected error has been detected by HotSpot

解决IIS服务和用户上传的文件分别部署在不同的电脑上时,解决权限的问题

为解决IIS服务和用户上传的文件分别部署在不同的电脑上时,解决权限的问题. 定义: A:iis服务器 B:文件服务器 步骤: 1.在B上创建一个用户[uploaduser](并设置密码) 2.给B上的共享目录赋予用户[uploaduser]读写的权限. 3.在A上创建一个相同的用户[uploaduser](用户名和密码都一样) 4.在A上新建一个虚拟目录,指向B上的那个目录:并且检查其共享权限和权限中,[uploaduser]都存在且都有读写权限. 5.在A的iis这样配置: IIS应用程序池的

如何在一台新电脑上配置JAVA开发环境

对于JAVA新手来说,刚开始要学JAVA,而自己的电脑上毫无与JAVA开发有关的环境,应该如何进行配置呢? (安卓新手也需要JAVA开发环境) 第一步,下载.安装java JRE JRE (Java Runtime Environment),即Java运行环境,是运行JAVA程序所必须的环境的集合,包含各种类库. 1.Jre官方下载; http://www.oracle.com/technetwork/java/javase/downloads/index.html 2.点击左侧的JAVA字样图