入门gpg

前言

GPG 的全称是 GNU Privacy Guard ,可以看作是一个软件,可以用来进行密钥的管理。其实和我们用的一些图形化的密码管理类似,不过GPG 好像更多是命令行交互的,所以一般人不太习惯。另外,中间包含的概念也较多。

用过enpass, 1password的可以将一些概念类比起来,比如 master password , 子密码

我们应该使用且只使用子密钥,主密钥应该放在一个绝对安全的地方。

安装

在 Mac 上可以使用 Homebrew 安装 gopass

brew install gopass

使用

生成主密钥

1
gpg --full-generate-key

交互

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
➜ gpg --edit-key 771xx601@qq.com
gpg (GnuPG) 2.2.20; Copyright (C) 2020 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.

Secret key is available.

sec rsa2048/00C21CE66A8AE9E0
created: 2020-04-23 expires: 2022-04-23 usage: SC
trust: ultimate validity: ultimate
ssb rsa2048/9DCC33D2FECB246F
created: 2020-04-23 expires: never usage: E
[ultimate] (1). qinrui <771963601@qq.com>

gpg>

请注意上面的字符串”sec rsa2048/xxxxx”,斜杆后面就是”用户ID”的Hash字符串,可以用来替代”用户ID”。

Donate
  • Copyright: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.

扫一扫,分享到微信

微信分享二维码
  • Copyrights © 2019-2024 John Doe
  • Visitors: | Views:

请我喝杯咖啡吧~