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 belongs to the named user

pub  2048g/C1845DA4 2016-11-25 debian8

Primary key fingerprint: E6F5 0620 A8EA 0C60 FDBF  FD3E 1F8A 8A36 D04D 1A0B

Subkey fingerprint: 36C6 7490 ABF8 0B12 7CE5  D788 A48C 4F81 C184 5DA4

It is NOT certain that the key belongs to the person named

in the user ID.  If you *really* know what you are doing,

you may answer the next question with yes.

Use this key anyway? (y/N) y

opensuse13:~ #

opensuse13:~ #

opensuse13:~ # l FranklinYang.rsa.sec.key.debian8.asc

-rw-r--r-- 1 root root 5994 Nov 25 23:41 FranklinYang.rsa.sec.key.debian8.asc

opensuse13:~ #

opensuse13:~ # scp FranklinYang.rsa.sec.key.debian8.asc [email protected]:/home/franklin/

[email protected]‘s password:

FranklinYang.rsa.sec.key.debian8.asc                100% 5994     5.9KB/s   00:00

opensuse13:~ #

opensuse13:~ #

[email protected]:~# l FranklinYang.rsa.sec.key.debian8.asc

-rw-r--r-- 1 franklin franklin 5994 Nov 25 23:45 FranklinYang.rsa.sec.key.debian8.asc

[email protected]:~#

2 给centos7加密一份“我的私钥”

opensuse13:~ #

opensuse13:~ # gpg -a -r "centos7" -o FranklinYang.rsa.sec.key.centos7.asc --encrypt FranklinYang.rsa.sec.key

gpg: CDA873F4: There is no assurance this key belongs to the named user

pub  2048g/CDA873F4 2016-11-25 centos7

Primary key fingerprint: EEB2 90CA E690 2DD5 2480  FA72 9E1B 26EB 28D4 14A1

Subkey fingerprint: 8997 4D45 4AB8 6F48 B0B6  322B B982 87D3 CDA8 73F4

It is NOT certain that the key belongs to the person named

in the user ID.  If you *really* know what you are doing,

you may answer the next question with yes.

Use this key anyway? (y/N) yes

opensuse13:~ #

opensuse13:~ # l FranklinYang.rsa.sec.key.centos7.asc

-rw-r--r-- 1 root root 5994 Nov 25 23:44 FranklinYang.rsa.sec.key.centos7.asc

opensuse13:~ #

opensuse13:~ #

opensuse13:~ #

opensuse13:~ # scp FranklinYang.rsa.sec.key.centos7.asc [email protected]:/home/franklin

[email protected]‘s password:

FranklinYang.rsa.sec.key.centos7.asc                        100% 5994     5.9KB/s   00:00

opensuse13:~ #

opensuse13:~ #

[[email protected] ~]# ls -l FranklinYang.rsa.sec.key.centos7.asc

-rw-r--r--. 1 franklin franklin 5994 Nov 25 23:45 FranklinYang.rsa.sec.key.centos7.asc

[[email protected] ~]#

3 在其他电脑上,解密“我的私钥”

[email protected]:~# gpg -d FranklinYang.rsa.sec.key.debian8.asc

You need a passphrase to unlock the secret key for

user: "debian8"

2048-bit ELG-E key, ID C1845DA4, created 2016-11-25 (main key ID D04D1A0B)

gpg: encrypted with 2048-bit ELG-E key, ID C1845DA4, created 2016-11-25

"debian8"

-----BEGIN PGP PRIVATE KEY BLOCK-----

Version: GnuPG v2

lQIVBFg4PyYBEACTNyE3hnLtqHcGLQrjhh56yLtWiWJMxTeh26Xy378quxoGaLzC

JW9iOAq2AT67jdhYF6Lx7YE0YN1mPmzNhb8okhNdrP/wMxYHQB5mhxEeyLfPI6xG

HJ0gnDoHATmXteLTiWSxkPqQ+Byp9vIqTwDFMm7jMvQhO5DNLQrjmQIcnmo3hMZY

jOdyKYAPV3UpbcSWiO这可是我的私钥啊。。。pTRahQf6DlC3mO/c5+42NDFYgY0zX7haMLpLwc/Gn

dUDUdNvgFFWX9IhtnLf1VRFU0borjtBLaezDN5LaUYEkIK0UxRAOQRi6EDb//5Ar

uM/gOyZe0VK8cl9YFc1IZ28RhkwrMMYnJR7Lj/O6k+vGQsbJcXp9xtnIudX/pJpk

TlweT7P0mCLBc这可是我的私钥啊。。。VdpYFmNQWJaXDIH45J+TEX5

+P5H9b156eSJtk4PB1NNoGDjQvZep9KcQ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Lp0gPy9D

DSLYhoJtFd6TZ9QRD08QR52QKd3rm50maqXQC9s0zhsOcvIut0Ze3yxlQp04tg0G

BSbRv8AB7TtPWWft1YKz065w2BLnCWUqc2WxHXRWIcir+vmtAGKdkHFqRpbNABAf

/Ikfc8jGyf+LtuoDTmyCRG7ZrQEQiRUwoy4B5ZOX4BjjQLwvle/L/swrrXkDdhpV

YojFtC0qiUmqbVLD0+/vw4x这可是我的私钥啊。。。2qvWUG23dQcHwXCMfb0H9St5+XgG108+MDm

tEovoMxl1B+vRb2VZh2rcRC7Lvo6r9Mbs7buOunBJQfqxC3y0AxHL5c6vHX6+7b3

fMIfI9L/jS2SC1+r888T4Hy4D2RyrB9kemsDFY7sM9ktq3aaXTUJLNPRdPyieOtx

N024vLR8llBVa3Joz29XBwhaGYViL01APQBDrVFsG/ziezxhgKiLFTAV6GQm2wdO

QpYTkQgbLEHYMk7CHpgfucCAIMEEI/m1ATmaEzcMQhEQoNiZ2mGjhlgXZBJwuSAg

4t3hh8jbsdFb2OCMbKzyib8pTQQ6H3cdQfEHV65ZSyj53L4XWonFLauxnwJVRRcj

PXTna3BzUqJvWkLz5pvDN/JP82/AjG9JWkXOmuBCx35lGGgDj0sqY49sb6c/npYZ

/3LJSI3rioane7qoz8Hqzow这可是我的私钥啊。。。GxjOtob7lWFow5vc3U3AcS4m9bSFaLwkkfNn78

rd6XYC6EqZmzY2uTv4gbBSvl9slW+bmsuEjHWHy12dagdok8JsxufJZcbaDblP78

iQIlBBgBAgAPBQJYOD8mAhsMBQkAxcEAAAoJEI2keVQnaFb3NKIP/jCs07cOx7Zs

bhO30vzpb1P3kaMzWHIVNN3H+HyGQaaUfF49J66TWQ5x8GKCVraqR14FBqHIJEh3

NkhgkdOMlFJQDbdpAfJoSAlNzc9aAoGZyHC9pp4MvEmUZx0GahkMSeVeGzy8m/JQ

wGNcJT3aidKk这可是我的私钥啊。。。SNZl7/zvJeAmvYwlGaUFkIXXnz1zb8CUi3wRf2m89a0N

gL7VWBk9rQp6BSGsjyz8kiRb8L7qDRUBXFjENLUcsFyk/JOX74iI5v6fLR68hhau

twdlKbl1A24wKX8AMFyPCVwacJ6n6/nVl/M/io/OOX04rZ76nyxDkslKNhSpt9Dy

hx2mlzBWcDbBoEtzl0evQdhWOkKCuaYCsUa80uaKzddBqg9Guw7Lc+3xRkKqWanM

MWDQVE/2iHdfZdGPSt1+U5fvNn2xP648

=p/mc

-----END PGP PRIVATE KEY BLOCK-----

[email protected]:~#

[email protected]:~# gpg -a -o FranklinYang.sec.key -d FranklinYang.rsa.sec.key.debian8.asc

You need a passphrase to unlock the secret key for

user: "debian8"

2048-bit ELG-E key, ID C1845DA4, created 2016-11-25 (main key ID D04D1A0B)

gpg: encrypted with 2048-bit ELG-E key, ID C1845DA4, created 2016-11-25

"debian8"

[email protected]:~#

[email protected]:~#

[email protected]:~# l FranklinYang.sec.key

-rw-r--r-- 1 root root 4942 Nov 25 23:52 FranklinYang.sec.key

[email protected]:~#

[email protected]:~#

这就是“我的”私钥!

[[email protected] ~]#

[[email protected] ~]# gpg -a -d FranklinYang.rsa.sec.key.centos7.asc

You need a passphrase to unlock the secret key for

user: "centos7"

2048-bit ELG key, ID CDA873F4, created 2016-11-25 (main key ID 28D414A1)

gpg: encrypted with 2048-bit ELG key, ID CDA873F4, created 2016-11-25

"centos7"

-----BEGIN PGP PRIVATE KEY BLOCK-----

Version: GnuPG v2

lQIVBFg4PyYBEACTNyE3hnLtqHcGLQrjhh56yLtWiWJMxTeh26Xy378quxoGaLzC

JW9iOAq2AT67jdhYF6Lx7YE0YN1mPmzNhb8okhNdrP/wMxYHQB5mhxEeyLfPI6xG

HJ0gnDoHATmXteLTiWSxkPqQ+Byp9vIqTwDFMm7jMvQhO5DNLQrjmQIcnmo3hMZY

jOdyKYAPV3UpbcSWiOg/wj7E7Lb7Bc37rOX2WzUMOK3JvvoDTmK4Juqq87ywGHgq

3Y83f93pjDqq7xGwAdJOl7k5cq6mgvJz+wi3ivtQmvP8Xzt79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vyyakS

7XTPjGZokeF7ak/xeYrP这可是我的私钥啊。。。By9HXInOk7x5Xy0EvAyqRdzf3pOC66RkfdEN3om

Hjj/COMbk6PIkLkWLfROXE7QnAwXu5AjxucAcKNHjxcr/bUJAlyKE81hcOea13VW

KjD5Ww8cQvinNyUJevZt//6R010AwUNX96JKgb5bhpg1kp9qQGV4XeWgNahtTYkw

wUdCgwiu5S7zSQARAQAB/gMDAr27jk6nvmsq7nl6KrCV6q1KnBs5b0ozYMnUoZpm

mEhqFQ0AVCDxYOkSnTgHIPQRi9tPUnATuK//iqoBjTwQ1ufbg85OdnY57Gq4aVT0

IJsZcwgcGeWZf0gRN7DBxf2kVl8HhC+FyQ14+lDHN0OrxMKYttH1xpA50qnV9qUr

+fcae+nNSm1D9KyYRRGARByg/aGpCDr8ed27YY6ZtQYd+v2Xwm/PByl7o2VER4Sb

iGnw5Ezti4VWptWCuVLq这可是我的私钥啊。。。Uwoy4B5ZOX4BjjQLwvle/L/swrrXkDdhpV

YojFtC0qiUmqbVLD0+/vw4xE4usQJxL7DdHKdzkWx/5sv89fK9fApRgRPt+Q6a9i

x+ZUyGdsT8iEmAYBHNYyORSKEQIbG7VDtFMrPCk38mykgsAElMyTOHe/258uvpSr

BDATnqHdKE4fEFSquYfjDeEZtWF6XGS5XAe/xHXQPbElWHesaNx/miRe5nd4ySVl

h270DT5ALO11eGiKkiMD4SPEzrZX7QEstJdDjdFWHVfGVINMiVM9wwJ5+oKqlPD6

TAoBq5+clOcR0/3YxxJaGCun1wGj2CE9arLhrJfQbrW6UQB/FP+l8dcmh1a365Uc

rln1nKaVyeROap8VOQNWqR0FzhkXd2qvWUG23dQcHwXCMfb0H9St5+XgG108+MDm

tEovoMxl1B+vRb2VZh2rc这可是我的私钥啊。。。aGYViL01APQBDrVFsG/ziezxhgKiLFTAV6GQm2wdO

QpYTkQgbLEHYMk7CHpgfucCAIMEEI/m1ATmaEzcMQhEQoNiZ2mGjhlgXZBJwuSAg

4t3hh8jbsdFb2OCMbKzyib8pTQQ6H3cdQfEHV65ZSyj53L4XWonFLauxnwJVRRcj

PXTna3BzUqJvWkLz5pvDN/JP82/AjG9JWkXOmuBCx35lGGgDj0sqY49sb6c/npYZ

/3LJSI3rioane7qoz8Hqzowax这可是我的私钥啊。。。04fkEmQgztnA0MoC//2Z6D9EUXV1qK89k4gs

fSLA6IB77cxHsEKcwTSHpKLaSWGxjOtob7lWFow5vc3U3AcS4m9bSFaLwkkfNn78

rd6XYC6EqZmzY2uTv4gbBSvl9slW+bmsuEjHWHy12dagdok8JsxufJZcbaDblP78

iQIlBBgBAgAPBQJYOD8mAhsMBQkAxcEAAAoJEI2keVQnaFb3NKIP/jCs07cOx7Zs

bhO30vzpb1P3kaMzWHIVNN3H+HyGQaaUfF49J66TWQ5x8GKCVraqR14FBqHIJEh3

NkhgkdOMlFJQDbdpAfJoSAlNzc9aAoGZyHC9pp4MvEmUZx0GahkMSeVeGzy8m/JQ

wGNcJT3aidKkz0DPg8ifbw1u4gFKIJlQ/6QSodWdwoeqnbhNFWxHNuQEzXkLSkuv

SwaVduHihCBWWxB39Q这可是我的私钥啊。。。qMQ2NGaSbvwqwKVNvOnHzCz40DTW6QFG2ZHO

3JJjrZfiVQ1oSLXMoqdKSNZl7/zvJeAmvYwlGaUFkIXXnz1zb8CUi3wRf2m89a0N

gL7VWBk9rQp6BSGsjyz8kiRb8L7qDRUBXFjENLUcsFyk/JOX74iI5v6fLR68hhau

twdlKbl1A24wKX8AMFyPCVwacJ6n6/nVl/M/io/OOX04rZ76nyxDkslKNhSpt9Dy

hx2mlzBWcDbBoEtzl0evQdhWOkKCuaYCsUa80uaKzddBqg9Guw7Lc+3xRkKqWanM

MWDQVE/2iHdfZdGPSt1+U5fvNn2xP648

=p/mc

-----END PGP PRIVATE KEY BLOCK-----

[[email protected] ~]#

[[email protected] ~]#

[[email protected] ~]#

[[email protected] ~]# gpg -a -o FranklinYang.sec.key -d FranklinYang.rsa.sec.key.centos7.asc

You need a passphrase to unlock the secret key for

user: "centos7"

2048-bit ELG key, ID CDA873F4, created 2016-11-25 (main key ID 28D414A1)

gpg: encrypted with 2048-bit ELG key, ID CDA873F4, created 2016-11-25

"centos7"

[[email protected] ~]#

[[email protected] ~]# ls -l FranklinYang.sec.key

-rw-r--r--. 1 root root 4942 Nov 25 23:51 FranklinYang.sec.key

[[email protected] ~]#

[[email protected] ~]#

[[email protected] ~]#

4 在其他电脑上,导入“我的私钥”

[email protected]:~#

[email protected]:~# gpg --import FranklinYang.sec.key

gpg: key 276856F7: secret key imported

gpg: key 276856F7: "FranklinYang (Encrypt RSA 4096) <[email protected]>" not changed

gpg: Total number processed: 1

gpg:              unchanged: 1

gpg:       secret keys read: 1

gpg:   secret keys imported: 1

[email protected]:~#

[email protected]:~#

[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]:~#

[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]

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

uid                  debian8

sub   2048g/C1845DA4 2016-11-25 [expires: 2016-12-09]

[email protected]:~#

[[email protected] ~]#

[[email protected] ~]# gpg --import FranklinYang.sec.key

gpg: key 276856F7: secret key imported

gpg: key 276856F7: "FranklinYang (Encrypt RSA 4096) <[email protected]>" not changed

gpg: Total number processed: 1

gpg:              unchanged: 1

gpg:       secret keys read: 1

gpg:   secret keys imported: 1

[[email protected] ~]#

[[email protected] ~]#

[[email protected] ~]# gpg -K

gpg: checking the trustdb

gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model

gpg: depth: 0  valid:   2  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 2u

gpg: next trustdb check due at 2016-12-09

/root/.gnupg/secring.gpg

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

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

uid                  centos7

ssb   2048g/CDA873F4 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] ~]# 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]

pub   1024D/28D414A1 2016-11-25 [expires: 2016-12-09]

uid                  centos7

sub   2048g/CDA873F4 2016-11-25 [expires: 2016-12-09]

[[email protected] ~]#

时间: 2024-10-27 03:45:38

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

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高级指导(3)导出私钥

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

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-0

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

JAVA生成RSA非对称型加密的公钥和私钥(利用JAVA API)

非对称型加密非常适合多个客户端和服务器之间的秘密通讯,客户端使用同一个公钥将明文加密,而这个公钥不能逆向的解密,密文发送到服务器后有服务器端用私钥解密,这样就做到了明文的加密传送. 非对称型加密也有它先天的缺点,加密.解密速度慢制约了它的发挥,如果你有大量的文字需要加密传送,建议你通过非对称型加密来把对称型‘密钥’分发到客户端,及时更新对称型‘密钥’. package com.paul.module.common.util; import sun.misc.BASE64Decoder; impo

对加密方式(公钥私钥)的形象理解

https其实就是建构在SSL/TLS之上的 http协议,所以要比较https比http多用多少服务器资源,主要看SSL/TLS本身消耗多少服务器资源. http使用TCP 三次握手建立连接,客户端和服务器需要交换3个包,https除了 TCP 的三个包,还要加上 ssl握手需要的9个包,所以一共是12个包.http 建立连接,按照下面链接中针对Computer Science House的测试,是114毫秒:https建立连接,耗费436毫秒.ssl 部分花费322毫秒,包括网络延时和ssl

概念解释:对称加密、非对称加密、公钥、私钥、签名、证书

楔子 现在网络的安全性已经变得越来越重要,各位程序员在开发过程中或多或少都会遇到公钥.私钥.加密.签名等一些相关名词.这些概念比较杂乱,容易混淆,下面就来梳理一下这部分的内容. 对称加密 在重要的信息的传递过程中,人们总是希望信息不会被偷看.不会被篡改,伪造等.为了达到这个要求人们一直在不断努力着. 电报加密使用的密码本,就是初代网络安全所使用的加密方式,用法为:发信时将内容翻译为密文发出,收到电报的一方,使用相同的密码本才能解密出正确的信息,否则看到的就是一堆乱码. 这种传统的加密方式就叫做对

使用GnuPG(PGP)加密信息及数字签名教程_转

转自:http://www.williamlong.info/archives/3439.html PGP (Pretty Good Privacy) 是由 Phil Zimmermann 于 1991 开发的一个用于数据加密和数字签名的程序,由于被广泛应用以至于后来形成一个开放的标准 OpenPGP,而 GnuPG 则是实现了该标准的一个开源免费程序,本文将会简单介绍如何使用 GnuPG 管理钥匙.加密解密文件和电子邮件.数字签名文件和电子邮件等内容.篇幅有点长,不过内容是很简单的,可以一步一