[{"data":1,"prerenderedAt":3470},["ShallowReactive",2],{"blogsSurround:/blogs/utils/gpg-intro":3,"content-query-z7KPGQqwGJ":19,"content-navigation-8C37fagqQL":3451},[4,5],null,{"_path":6,"_dir":7,"_draft":8,"_partial":8,"_locale":9,"title":10,"description":11,"publishedAt":12,"_type":13,"_id":14,"_source":15,"_file":16,"_stem":17,"_extension":18},"/blogs/frontend/nuxt-content-for-blog","frontend",false,"","用 Nuxt Content 搭建 Blog 系统","为 Nuxt 站点增添由 Markdown 撰写的内容页面。","2024-12-20","markdown","blogs:blogs:frontend:nuxt-content-for-blog:index.md","blogs","blogs/frontend/nuxt-content-for-blog/index.md","blogs/frontend/nuxt-content-for-blog/index","md",{"_path":20,"_dir":21,"_draft":8,"_partial":8,"_locale":9,"title":22,"description":23,"tags":24,"publishedAt":29,"publishedTo":30,"body":31,"_type":13,"_id":3448,"_source":15,"_file":3449,"_stem":3450,"_extension":18},"/blogs/utils/gpg-intro","utils","GPG 入门","一直没用过 gpg，刻板印象是接口非常不友好很难用，但仔细试了一下意外很好用啊。。我直接一个黑转粉（）",[25,26,27,28],"explore","#linux","#mac","#tool","2025-06-25","murchinroom-web",{"type":32,"children":33,"toc":3424},"root",[34,42,47,53,102,126,132,153,158,176,181,257,263,268,287,292,365,559,564,569,607,612,660,666,672,677,696,701,725,755,760,779,784,789,829,923,928,951,972,977,1067,1120,1127,1147,1152,1176,1223,1228,1251,1267,1272,1284,1297,1302,1339,1357,1362,1385,1416,1422,1427,1450,1455,1478,1491,1517,1521,1533,1538,1699,1717,1722,1733,1821,1827,1832,1845,1888,1998,2017,2065,2098,2110,2166,2171,2191,2225,2260,2265,2316,2332,2524,2529,2534,2539,2580,2681,2693,2698,2703,2727,2763,2768,2790,2795,2813,2953,2971,2996,3001,3021,3040,3071,3076,3103,3116,3121,3126,3184,3239,3244,3249,3268,3314,3327,3358,3366,3371,3392,3397,3418],{"type":35,"tag":36,"props":37,"children":39},"element","h1",{"id":38},"gpg-入门",[40],{"type":41,"value":22},"text",{"type":35,"tag":43,"props":44,"children":45},"p",{},[46],{"type":41,"value":23},{"type":35,"tag":48,"props":49,"children":51},"h2",{"id":50},"安装",[52],{"type":41,"value":50},{"type":35,"tag":54,"props":55,"children":59},"pre",{"className":56,"code":57,"language":58,"meta":9,"style":9},"language-sh shiki shiki-themes github-light github-dark monokai","brew install gpg pinentry\n# sudo dnf install gpg pinentry \n","sh",[60],{"type":35,"tag":61,"props":62,"children":63},"code",{"__ignoreMap":9},[64,92],{"type":35,"tag":65,"props":66,"children":69},"span",{"class":67,"line":68},"line",1,[70,76,82,87],{"type":35,"tag":65,"props":71,"children":73},{"style":72},"--shiki-default:#6F42C1;--shiki-dark:#B392F0;--shiki-sepia:#A6E22E",[74],{"type":41,"value":75},"brew",{"type":35,"tag":65,"props":77,"children":79},{"style":78},"--shiki-default:#032F62;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74",[80],{"type":41,"value":81}," install",{"type":35,"tag":65,"props":83,"children":84},{"style":78},[85],{"type":41,"value":86}," gpg",{"type":35,"tag":65,"props":88,"children":89},{"style":78},[90],{"type":41,"value":91}," pinentry\n",{"type":35,"tag":65,"props":93,"children":95},{"class":67,"line":94},2,[96],{"type":35,"tag":65,"props":97,"children":99},{"style":98},"--shiki-default:#6A737D;--shiki-dark:#6A737D;--shiki-sepia:#88846F",[100],{"type":41,"value":101},"# sudo dnf install gpg pinentry\n",{"type":35,"tag":103,"props":104,"children":105},"ul",{},[106],{"type":35,"tag":107,"props":108,"children":109},"li",{},[110,116,118],{"type":35,"tag":61,"props":111,"children":113},{"className":112},[],[114],{"type":41,"value":115},"pinentry",{"type":41,"value":117}," 是用来收集系统信息做随机数的。\n",{"type":35,"tag":103,"props":119,"children":120},{},[121],{"type":35,"tag":107,"props":122,"children":123},{},[124],{"type":41,"value":125},"有些系统（Fedora）自带了 gpg 但没装 pinentry，会导致 gen-key 失败说是",{"type":35,"tag":48,"props":127,"children":129},{"id":128},"生成-key",[130],{"type":41,"value":131},"生成 key",{"type":35,"tag":54,"props":133,"children":135},{"className":56,"code":134,"language":58,"meta":9,"style":9},"gpg --gen-key\n",[136],{"type":35,"tag":61,"props":137,"children":138},{"__ignoreMap":9},[139],{"type":35,"tag":65,"props":140,"children":141},{"class":67,"line":68},[142,147],{"type":35,"tag":65,"props":143,"children":144},{"style":72},[145],{"type":41,"value":146},"gpg",{"type":35,"tag":65,"props":148,"children":150},{"style":149},"--shiki-default:#005CC5;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF",[151],{"type":41,"value":152}," --gen-key\n",{"type":35,"tag":43,"props":154,"children":155},{},[156],{"type":41,"value":157},"他会交互式的让输入一些东西：",{"type":35,"tag":103,"props":159,"children":160},{},[161,166,171],{"type":35,"tag":107,"props":162,"children":163},{},[164],{"type":41,"value":165},"Real name （要求大于 5 字符）",{"type":35,"tag":107,"props":167,"children":168},{},[169],{"type":41,"value":170},"Email address",{"type":35,"tag":107,"props":172,"children":173},{},[174],{"type":41,"value":175},"Passphrase （建议至少 8 字符）",{"type":35,"tag":43,"props":177,"children":178},{},[179],{"type":41,"value":180},"生成出来的 key：",{"type":35,"tag":103,"props":182,"children":183},{},[184,203,208],{"type":35,"tag":107,"props":185,"children":186},{},[187,189,195],{"type":41,"value":188},"uid（USER-ID）：",{"type":35,"tag":61,"props":190,"children":192},{"className":191},[],[193],{"type":41,"value":194},"Real name \u003CEmail address>",{"type":35,"tag":103,"props":196,"children":197},{},[198],{"type":35,"tag":107,"props":199,"children":200},{},[201],{"type":41,"value":202},"uid 不能重复，如果已经有相同 uid 的 key，生成会失败",{"type":35,"tag":107,"props":204,"children":205},{},[206],{"type":41,"value":207},"默认 2 年过期",{"type":35,"tag":107,"props":209,"children":210},{},[211,213,219],{"type":41,"value":212},"持久化存储到了 ",{"type":35,"tag":61,"props":214,"children":216},{"className":215},[],[217],{"type":41,"value":218},"~/.gnupg",{"type":35,"tag":103,"props":220,"children":221},{},[222,235],{"type":35,"tag":107,"props":223,"children":224},{},[225,227,233],{"type":41,"value":226},"key 放在 ",{"type":35,"tag":61,"props":228,"children":230},{"className":229},[],[231],{"type":41,"value":232},"~/.gnupg/private-keys-v1.d",{"type":41,"value":234},"，具体文件名怎么看不知道",{"type":35,"tag":107,"props":236,"children":237},{},[238,240,246,248,255],{"type":41,"value":239},"还会有一个用来吊销的证书放到 ",{"type":35,"tag":61,"props":241,"children":243},{"className":242},[],[244],{"type":41,"value":245},"~/.gnupg/openpgp-revocs.d",{"type":41,"value":247},"，具体文件名看输出。See also ",{"type":35,"tag":249,"props":250,"children":252},"a",{"href":251},"#%E5%90%8A%E9%94%80%E8%AF%81%E4%B9%A6",[253],{"type":41,"value":254},"吊销证书",{"type":41,"value":256},".",{"type":35,"tag":258,"props":259,"children":261},"h3",{"id":260},"更多设置",[262],{"type":41,"value":260},{"type":35,"tag":43,"props":264,"children":265},{},[266],{"type":41,"value":267},"定制算法、过期时间(可永不过期)：",{"type":35,"tag":54,"props":269,"children":271},{"className":56,"code":270,"language":58,"meta":9,"style":9},"gpg --full-generate-key\n",[272],{"type":35,"tag":61,"props":273,"children":274},{"__ignoreMap":9},[275],{"type":35,"tag":65,"props":276,"children":277},{"class":67,"line":68},[278,282],{"type":35,"tag":65,"props":279,"children":280},{"style":72},[281],{"type":41,"value":146},{"type":35,"tag":65,"props":283,"children":284},{"style":149},[285],{"type":41,"value":286}," --full-generate-key\n",{"type":35,"tag":258,"props":288,"children":290},{"id":289},"更少设置",[291],{"type":41,"value":289},{"type":35,"tag":54,"props":293,"children":295},{"className":56,"code":294,"language":58,"meta":9,"style":9},"# gpg --quick-gen-key USER-ID [ALGO [USAGE [EXPIRE]]]\ngpg --quick-gen-key \"Foo Bar \u003Cfoo@bar.com>\"\n\ngpg --quick-gen-key \"Foo Bar \u003Cfoo@bar.com>\" default default \"2025-12-31\"\n",[296],{"type":35,"tag":61,"props":297,"children":298},{"__ignoreMap":9},[299,307,324,334],{"type":35,"tag":65,"props":300,"children":301},{"class":67,"line":68},[302],{"type":35,"tag":65,"props":303,"children":304},{"style":98},[305],{"type":41,"value":306},"# gpg --quick-gen-key USER-ID [ALGO [USAGE [EXPIRE]]]\n",{"type":35,"tag":65,"props":308,"children":309},{"class":67,"line":94},[310,314,319],{"type":35,"tag":65,"props":311,"children":312},{"style":72},[313],{"type":41,"value":146},{"type":35,"tag":65,"props":315,"children":316},{"style":149},[317],{"type":41,"value":318}," --quick-gen-key",{"type":35,"tag":65,"props":320,"children":321},{"style":78},[322],{"type":41,"value":323}," \"Foo Bar \u003Cfoo@bar.com>\"\n",{"type":35,"tag":65,"props":325,"children":327},{"class":67,"line":326},3,[328],{"type":35,"tag":65,"props":329,"children":331},{"emptyLinePlaceholder":330},true,[332],{"type":41,"value":333},"\n",{"type":35,"tag":65,"props":335,"children":337},{"class":67,"line":336},4,[338,342,346,351,356,360],{"type":35,"tag":65,"props":339,"children":340},{"style":72},[341],{"type":41,"value":146},{"type":35,"tag":65,"props":343,"children":344},{"style":149},[345],{"type":41,"value":318},{"type":35,"tag":65,"props":347,"children":348},{"style":78},[349],{"type":41,"value":350}," \"Foo Bar \u003Cfoo@bar.com>\"",{"type":35,"tag":65,"props":352,"children":353},{"style":78},[354],{"type":41,"value":355}," default",{"type":35,"tag":65,"props":357,"children":358},{"style":78},[359],{"type":41,"value":355},{"type":35,"tag":65,"props":361,"children":362},{"style":78},[363],{"type":41,"value":364}," \"2025-12-31\"\n",{"type":35,"tag":103,"props":366,"children":367},{},[368,395,450,461],{"type":35,"tag":107,"props":369,"children":370},{},[371,373],{"type":41,"value":372},"其实 USER-ID 写啥都行，任意字符串\n",{"type":35,"tag":103,"props":374,"children":375},{},[376],{"type":35,"tag":107,"props":377,"children":378},{},[379,381,387,389],{"type":41,"value":380},"默认标准的是 ",{"type":35,"tag":61,"props":382,"children":384},{"className":383},[],[385],{"type":41,"value":386},"真名 (注释) \u003C邮箱>",{"type":41,"value":388},"，例如 ",{"type":35,"tag":61,"props":390,"children":392},{"className":391},[],[393],{"type":41,"value":394},"Foo Bar (work) \u003Cfoo@bar.com>",{"type":35,"tag":107,"props":396,"children":397},{},[398,400],{"type":41,"value":399},"默认还是会交互式让输入 Passphrase 的\n",{"type":35,"tag":103,"props":401,"children":402},{},[403,416,429],{"type":35,"tag":107,"props":404,"children":405},{},[406,408,414],{"type":41,"value":407},"可以加 ",{"type":35,"tag":61,"props":409,"children":411},{"className":410},[],[412],{"type":41,"value":413},"--batch --passphrase 'xxx'",{"type":41,"value":415}," 指定，避免交互",{"type":35,"tag":107,"props":417,"children":418},{},[419,421,427],{"type":41,"value":420},"或者 ",{"type":35,"tag":61,"props":422,"children":424},{"className":423},[],[425],{"type":41,"value":426},"--batch --passphrase ''",{"type":41,"value":428}," 不用密码",{"type":35,"tag":107,"props":430,"children":431},{},[432,434,440,442,448],{"type":41,"value":433},"不加 ",{"type":35,"tag":61,"props":435,"children":437},{"className":436},[],[438],{"type":41,"value":439},"--batch",{"type":41,"value":441}," 的话，即使写了 ",{"type":35,"tag":61,"props":443,"children":445},{"className":444},[],[446],{"type":41,"value":447},"--passphrase",{"type":41,"value":449}," 还是会出交互输入",{"type":35,"tag":107,"props":451,"children":452},{},[453,455],{"type":41,"value":454},"只想指定过期时间的话，把 ALGO  和 USAGE 都写成 ",{"type":35,"tag":61,"props":456,"children":458},{"className":457},[],[459],{"type":41,"value":460},"default",{"type":35,"tag":107,"props":462,"children":463},{},[464,466],{"type":41,"value":465},"日期有好几种格式：\n",{"type":35,"tag":103,"props":467,"children":468},{},[469,478,487,527,540],{"type":35,"tag":107,"props":470,"children":471},{},[472],{"type":35,"tag":61,"props":473,"children":475},{"className":474},[],[476],{"type":41,"value":477},"YYYY-MM-DD",{"type":35,"tag":107,"props":479,"children":480},{},[481],{"type":35,"tag":61,"props":482,"children":484},{"className":483},[],[485],{"type":41,"value":486},"YYYYMMDDThhmmss",{"type":35,"tag":107,"props":488,"children":489},{},[490,492,498,500,506,507,513,514,520,521],{"type":41,"value":491},"当前时间的 N 秒/天/周/月/年后过期：",{"type":35,"tag":61,"props":493,"children":495},{"className":494},[],[496],{"type":41,"value":497},"seconds=N",{"type":41,"value":499},"，",{"type":35,"tag":61,"props":501,"children":503},{"className":502},[],[504],{"type":41,"value":505},"Nd",{"type":41,"value":499},{"type":35,"tag":61,"props":508,"children":510},{"className":509},[],[511],{"type":41,"value":512},"Nw",{"type":41,"value":499},{"type":35,"tag":61,"props":515,"children":517},{"className":516},[],[518],{"type":41,"value":519},"Nm",{"type":41,"value":499},{"type":35,"tag":61,"props":522,"children":524},{"className":523},[],[525],{"type":41,"value":526},"Ny",{"type":35,"tag":107,"props":528,"children":529},{},[530,532,538],{"type":41,"value":531},"默认过期时间：",{"type":35,"tag":61,"props":533,"children":535},{"className":534},[],[536],{"type":41,"value":537},"-",{"type":41,"value":539},"（也就是 2 年过期）",{"type":35,"tag":107,"props":541,"children":542},{},[543,545,551,553],{"type":41,"value":544},"不过期：",{"type":35,"tag":61,"props":546,"children":548},{"className":547},[],[549],{"type":41,"value":550},"never",{"type":41,"value":552}," 或者 ",{"type":35,"tag":61,"props":554,"children":556},{"className":555},[],[557],{"type":41,"value":558},"none",{"type":35,"tag":258,"props":560,"children":562},{"id":561},"跳过交互",[563],{"type":41,"value":561},{"type":35,"tag":43,"props":565,"children":566},{},[567],{"type":41,"value":568},"没有任何交互，直接生成证书：",{"type":35,"tag":54,"props":570,"children":572},{"className":56,"code":571,"language":58,"meta":9,"style":9},"gpg --batch --passphrase '' --quick-gen-key \"wo-pass\"\n",[573],{"type":35,"tag":61,"props":574,"children":575},{"__ignoreMap":9},[576],{"type":35,"tag":65,"props":577,"children":578},{"class":67,"line":68},[579,583,588,593,598,602],{"type":35,"tag":65,"props":580,"children":581},{"style":72},[582],{"type":41,"value":146},{"type":35,"tag":65,"props":584,"children":585},{"style":149},[586],{"type":41,"value":587}," --batch",{"type":35,"tag":65,"props":589,"children":590},{"style":149},[591],{"type":41,"value":592}," --passphrase",{"type":35,"tag":65,"props":594,"children":595},{"style":78},[596],{"type":41,"value":597}," ''",{"type":35,"tag":65,"props":599,"children":600},{"style":149},[601],{"type":41,"value":318},{"type":35,"tag":65,"props":603,"children":604},{"style":78},[605],{"type":41,"value":606}," \"wo-pass\"\n",{"type":35,"tag":43,"props":608,"children":609},{},[610],{"type":41,"value":611},"不交互，直接生成一个永不过期、没有密码的证书：",{"type":35,"tag":54,"props":613,"children":615},{"className":56,"code":614,"language":58,"meta":9,"style":9},"gpg --batch --passphrase '' --quick-gen-key \"never-exp\" default default \"never\"\n",[616],{"type":35,"tag":61,"props":617,"children":618},{"__ignoreMap":9},[619],{"type":35,"tag":65,"props":620,"children":621},{"class":67,"line":68},[622,626,630,634,638,642,647,651,655],{"type":35,"tag":65,"props":623,"children":624},{"style":72},[625],{"type":41,"value":146},{"type":35,"tag":65,"props":627,"children":628},{"style":149},[629],{"type":41,"value":587},{"type":35,"tag":65,"props":631,"children":632},{"style":149},[633],{"type":41,"value":592},{"type":35,"tag":65,"props":635,"children":636},{"style":78},[637],{"type":41,"value":597},{"type":35,"tag":65,"props":639,"children":640},{"style":149},[641],{"type":41,"value":318},{"type":35,"tag":65,"props":643,"children":644},{"style":78},[645],{"type":41,"value":646}," \"never-exp\"",{"type":35,"tag":65,"props":648,"children":649},{"style":78},[650],{"type":41,"value":355},{"type":35,"tag":65,"props":652,"children":653},{"style":78},[654],{"type":41,"value":355},{"type":35,"tag":65,"props":656,"children":657},{"style":78},[658],{"type":41,"value":659}," \"never\"\n",{"type":35,"tag":48,"props":661,"children":663},{"id":662},"管理-key",[664],{"type":41,"value":665},"管理 key",{"type":35,"tag":258,"props":667,"children":669},{"id":668},"查看-keys",[670],{"type":41,"value":671},"查看 keys",{"type":35,"tag":43,"props":673,"children":674},{},[675],{"type":41,"value":676},"当前系统里的所有公钥：",{"type":35,"tag":54,"props":678,"children":680},{"className":56,"code":679,"language":58,"meta":9,"style":9},"gpg --list-keys\n",[681],{"type":35,"tag":61,"props":682,"children":683},{"__ignoreMap":9},[684],{"type":35,"tag":65,"props":685,"children":686},{"class":67,"line":68},[687,691],{"type":35,"tag":65,"props":688,"children":689},{"style":72},[690],{"type":41,"value":146},{"type":35,"tag":65,"props":692,"children":693},{"style":149},[694],{"type":41,"value":695}," --list-keys\n",{"type":35,"tag":43,"props":697,"children":698},{},[699],{"type":41,"value":700},"查看某个 key：",{"type":35,"tag":54,"props":702,"children":704},{"className":56,"code":703,"language":58,"meta":9,"style":9},"gpg --list-key foo@bar.com\n",[705],{"type":35,"tag":61,"props":706,"children":707},{"__ignoreMap":9},[708],{"type":35,"tag":65,"props":709,"children":710},{"class":67,"line":68},[711,715,720],{"type":35,"tag":65,"props":712,"children":713},{"style":72},[714],{"type":41,"value":146},{"type":35,"tag":65,"props":716,"children":717},{"style":149},[718],{"type":41,"value":719}," --list-key",{"type":35,"tag":65,"props":721,"children":722},{"style":78},[723],{"type":41,"value":724}," foo@bar.com\n",{"type":35,"tag":103,"props":726,"children":727},{},[728],{"type":35,"tag":107,"props":729,"children":730},{},[731,733,739,741,747],{"type":41,"value":732},"其实这些命令单复数都是一样的 ",{"type":35,"tag":61,"props":734,"children":736},{"className":735},[],[737],{"type":41,"value":738},"--list-keys",{"type":41,"value":740}," == ",{"type":35,"tag":61,"props":742,"children":744},{"className":743},[],[745],{"type":41,"value":746},"--list-key",{"type":35,"tag":103,"props":748,"children":749},{},[750],{"type":35,"tag":107,"props":751,"children":752},{},[753],{"type":41,"value":754},"但严格来说，man page 里都是带 s 的",{"type":35,"tag":43,"props":756,"children":757},{},[758],{"type":41,"value":759},"查看私钥：",{"type":35,"tag":54,"props":761,"children":763},{"className":56,"code":762,"language":58,"meta":9,"style":9},"gpg --list-secret-keys\n",[764],{"type":35,"tag":61,"props":765,"children":766},{"__ignoreMap":9},[767],{"type":35,"tag":65,"props":768,"children":769},{"class":67,"line":68},[770,774],{"type":35,"tag":65,"props":771,"children":772},{"style":72},[773],{"type":41,"value":146},{"type":35,"tag":65,"props":775,"children":776},{"style":149},[777],{"type":41,"value":778}," --list-secret-keys\n",{"type":35,"tag":258,"props":780,"children":782},{"id":781},"公钥导入导出",[783],{"type":41,"value":781},{"type":35,"tag":43,"props":785,"children":786},{},[787],{"type":41,"value":788},"导出公钥（public key）：",{"type":35,"tag":54,"props":790,"children":792},{"className":56,"code":791,"language":58,"meta":9,"style":9},"gpg --armor [--output public-key.txt] --export USERID\n",[793],{"type":35,"tag":61,"props":794,"children":795},{"__ignoreMap":9},[796],{"type":35,"tag":65,"props":797,"children":798},{"class":67,"line":68},[799,803,808,814,819,824],{"type":35,"tag":65,"props":800,"children":801},{"style":72},[802],{"type":41,"value":146},{"type":35,"tag":65,"props":804,"children":805},{"style":149},[806],{"type":41,"value":807}," --armor",{"type":35,"tag":65,"props":809,"children":811},{"style":810},"--shiki-default:#24292E;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2",[812],{"type":41,"value":813}," [--output ",{"type":35,"tag":65,"props":815,"children":816},{"style":78},[817],{"type":41,"value":818},"public-key.txt]",{"type":35,"tag":65,"props":820,"children":821},{"style":149},[822],{"type":41,"value":823}," --export",{"type":35,"tag":65,"props":825,"children":826},{"style":78},[827],{"type":41,"value":828}," USERID\n",{"type":35,"tag":103,"props":830,"children":831},{},[832,837,869,888],{"type":35,"tag":107,"props":833,"children":834},{},[835],{"type":41,"value":836},"公钥导出可以发给别人，导入他的系统里面，他就能拿你的公钥解密你加密的东西了",{"type":35,"tag":107,"props":838,"children":839},{},[840,841,847,849],{"type":41,"value":433},{"type":35,"tag":61,"props":842,"children":844},{"className":843},[],[845],{"type":41,"value":846},"--output 文件",{"type":41,"value":848}," 打到标准输出\n",{"type":35,"tag":103,"props":850,"children":851},{},[852],{"type":35,"tag":107,"props":853,"children":854},{},[855,861,863],{"type":35,"tag":61,"props":856,"children":858},{"className":857},[],[859],{"type":41,"value":860},"--output",{"type":41,"value":862}," 简写 ",{"type":35,"tag":61,"props":864,"children":866},{"className":865},[],[867],{"type":41,"value":868},"-o",{"type":35,"tag":107,"props":870,"children":871},{},[872,878,880,886],{"type":35,"tag":61,"props":873,"children":875},{"className":874},[],[876],{"type":41,"value":877},"USERID",{"type":41,"value":879}," 是完整的字符串或者",{"type":35,"tag":61,"props":881,"children":883},{"className":882},[],[884],{"type":41,"value":885},"... \u003C邮箱>",{"type":41,"value":887}," 里面的邮箱地址",{"type":35,"tag":107,"props":889,"children":890},{},[891,897,899,905],{"type":35,"tag":61,"props":892,"children":894},{"className":893},[],[895],{"type":41,"value":896},"--armor",{"type":41,"value":898}," 是把 key 转换成 ASCII 字符形式的 ",{"type":35,"tag":61,"props":900,"children":902},{"className":901},[],[903],{"type":41,"value":904},"-----BEGIN PGP PUBLIC KEY BLOCK----- ... -----END PGP PUBLIC KEY BLOCK-----",{"type":35,"tag":103,"props":906,"children":907},{},[908],{"type":35,"tag":107,"props":909,"children":910},{},[911,916,917],{"type":35,"tag":61,"props":912,"children":914},{"className":913},[],[915],{"type":41,"value":896},{"type":41,"value":862},{"type":35,"tag":61,"props":918,"children":920},{"className":919},[],[921],{"type":41,"value":922},"-a",{"type":35,"tag":43,"props":924,"children":925},{},[926],{"type":41,"value":927},"导出公钥指纹：",{"type":35,"tag":54,"props":929,"children":931},{"className":56,"code":930,"language":58,"meta":9,"style":9},"gpg --fingerprint foo@bar.com\n",[932],{"type":35,"tag":61,"props":933,"children":934},{"__ignoreMap":9},[935],{"type":35,"tag":65,"props":936,"children":937},{"class":67,"line":68},[938,942,947],{"type":35,"tag":65,"props":939,"children":940},{"style":72},[941],{"type":41,"value":146},{"type":35,"tag":65,"props":943,"children":944},{"style":149},[945],{"type":41,"value":946}," --fingerprint",{"type":35,"tag":65,"props":948,"children":949},{"style":78},[950],{"type":41,"value":724},{"type":35,"tag":103,"props":952,"children":953},{},[954],{"type":35,"tag":107,"props":955,"children":956},{},[957,963,965,970],{"type":35,"tag":61,"props":958,"children":960},{"className":959},[],[961],{"type":41,"value":962},"--fingerprint",{"type":41,"value":964}," 其实和 ",{"type":35,"tag":61,"props":966,"children":968},{"className":967},[],[969],{"type":41,"value":738},{"type":41,"value":971}," 输出是一样的",{"type":35,"tag":43,"props":973,"children":974},{},[975],{"type":41,"value":976},"导入别人的公钥：",{"type":35,"tag":54,"props":978,"children":980},{"className":56,"code":979,"language":58,"meta":9,"style":9},"gpg --import public-key.txt\n\n\ngpg --edit-key foo@bar.com\n# 然后交互式输入 trust 命令，选择信任等级，并确认操作：\n## gpg> trust\n## Your decision? 5 # 5 = I trust ultimately\n## ^D # exit\n",[981],{"type":35,"tag":61,"props":982,"children":983},{"__ignoreMap":9},[984,1001,1008,1015,1031,1040,1049,1058],{"type":35,"tag":65,"props":985,"children":986},{"class":67,"line":68},[987,991,996],{"type":35,"tag":65,"props":988,"children":989},{"style":72},[990],{"type":41,"value":146},{"type":35,"tag":65,"props":992,"children":993},{"style":149},[994],{"type":41,"value":995}," --import",{"type":35,"tag":65,"props":997,"children":998},{"style":78},[999],{"type":41,"value":1000}," public-key.txt\n",{"type":35,"tag":65,"props":1002,"children":1003},{"class":67,"line":94},[1004],{"type":35,"tag":65,"props":1005,"children":1006},{"emptyLinePlaceholder":330},[1007],{"type":41,"value":333},{"type":35,"tag":65,"props":1009,"children":1010},{"class":67,"line":326},[1011],{"type":35,"tag":65,"props":1012,"children":1013},{"emptyLinePlaceholder":330},[1014],{"type":41,"value":333},{"type":35,"tag":65,"props":1016,"children":1017},{"class":67,"line":336},[1018,1022,1027],{"type":35,"tag":65,"props":1019,"children":1020},{"style":72},[1021],{"type":41,"value":146},{"type":35,"tag":65,"props":1023,"children":1024},{"style":149},[1025],{"type":41,"value":1026}," --edit-key",{"type":35,"tag":65,"props":1028,"children":1029},{"style":78},[1030],{"type":41,"value":724},{"type":35,"tag":65,"props":1032,"children":1034},{"class":67,"line":1033},5,[1035],{"type":35,"tag":65,"props":1036,"children":1037},{"style":98},[1038],{"type":41,"value":1039},"# 然后交互式输入 trust 命令，选择信任等级，并确认操作：\n",{"type":35,"tag":65,"props":1041,"children":1043},{"class":67,"line":1042},6,[1044],{"type":35,"tag":65,"props":1045,"children":1046},{"style":98},[1047],{"type":41,"value":1048},"## gpg> trust\n",{"type":35,"tag":65,"props":1050,"children":1052},{"class":67,"line":1051},7,[1053],{"type":35,"tag":65,"props":1054,"children":1055},{"style":98},[1056],{"type":41,"value":1057},"## Your decision? 5 # 5 = I trust ultimately\n",{"type":35,"tag":65,"props":1059,"children":1061},{"class":67,"line":1060},8,[1062],{"type":35,"tag":65,"props":1063,"children":1064},{"style":98},[1065],{"type":41,"value":1066},"## ^D # exit\n",{"type":35,"tag":103,"props":1068,"children":1069},{},[1070,1083],{"type":35,"tag":107,"props":1071,"children":1072},{},[1073,1075,1081],{"type":41,"value":1074},"导入完成之后，可以比较 ",{"type":35,"tag":61,"props":1076,"children":1078},{"className":1077},[],[1079],{"type":41,"value":1080},"gpg --fingerprint",{"type":41,"value":1082}," 进行二次验证，确保导入正确",{"type":35,"tag":107,"props":1084,"children":1085},{},[1086,1088,1094,1096],{"type":41,"value":1087},"刚导入的 key 的 trust 状态是 unknown 的，不能用，要 ",{"type":35,"tag":61,"props":1089,"children":1091},{"className":1090},[],[1092],{"type":41,"value":1093},"gpg --edit-key",{"type":41,"value":1095}," 修改信任\n",{"type":35,"tag":103,"props":1097,"children":1098},{},[1099,1104],{"type":35,"tag":107,"props":1100,"children":1101},{},[1102],{"type":41,"value":1103},"自己的 key 则可以改成和新签发一样的 ultimately",{"type":35,"tag":107,"props":1105,"children":1106},{},[1107,1112,1114],{"type":35,"tag":61,"props":1108,"children":1110},{"className":1109},[],[1111],{"type":41,"value":1093},{"type":41,"value":1113}," 还可以做很多其他事情，see ",{"type":35,"tag":249,"props":1115,"children":1117},{"href":1116},"#%E7%BC%96%E8%BE%91%20key",[1118],{"type":41,"value":1119},"编辑 key",{"type":35,"tag":1121,"props":1122,"children":1124},"h4",{"id":1123},"使用-keyserver",[1125],{"type":41,"value":1126},"使用 keyserver",{"type":35,"tag":1128,"props":1129,"children":1130},"blockquote",{},[1131],{"type":35,"tag":43,"props":1132,"children":1133},{},[1134,1139,1141,1145],{"type":35,"tag":65,"props":1135,"children":1136},{},[1137],{"type":41,"value":1138},"!error",{"type":41,"value":1140}," key server 按照设计正常工作的话，原理上来说应该是 write only 的，公钥推上去就删不掉了。如果要使之无效可以 ",{"type":35,"tag":249,"props":1142,"children":1143},{"href":251},[1144],{"type":41,"value":254},{"type":41,"value":1146},"。",{"type":35,"tag":43,"props":1148,"children":1149},{},[1150],{"type":41,"value":1151},"可以把公钥上传到公开的一些服务器上，让别人通过网络去拉：",{"type":35,"tag":54,"props":1153,"children":1155},{"className":56,"code":1154,"language":58,"meta":9,"style":9},"gpg --send-keys KEYID\n",[1156],{"type":35,"tag":61,"props":1157,"children":1158},{"__ignoreMap":9},[1159],{"type":35,"tag":65,"props":1160,"children":1161},{"class":67,"line":68},[1162,1166,1171],{"type":35,"tag":65,"props":1163,"children":1164},{"style":72},[1165],{"type":41,"value":146},{"type":35,"tag":65,"props":1167,"children":1168},{"style":149},[1169],{"type":41,"value":1170}," --send-keys",{"type":35,"tag":65,"props":1172,"children":1173},{"style":78},[1174],{"type":41,"value":1175}," KEYID\n",{"type":35,"tag":103,"props":1177,"children":1178},{},[1179,1184,1189,1202],{"type":35,"tag":107,"props":1180,"children":1181},{},[1182],{"type":41,"value":1183},"这个 KEYID 不是邮箱或者 uid 全写。",{"type":35,"tag":107,"props":1185,"children":1186},{},[1187],{"type":41,"value":1188},"KEYID 是用 list-keys 列出的那串东西，或者说 fingerprint",{"type":35,"tag":107,"props":1190,"children":1191},{},[1192,1194,1200],{"type":41,"value":1193},"会上传到默认的服务器（例如 ",{"type":35,"tag":61,"props":1195,"children":1197},{"className":1196},[],[1198],{"type":41,"value":1199},"hkps://keyserver.ubuntu.com",{"type":41,"value":1201},"）",{"type":35,"tag":107,"props":1203,"children":1204},{},[1205,1207,1213,1215],{"type":41,"value":1206},"可以 ",{"type":35,"tag":61,"props":1208,"children":1210},{"className":1209},[],[1211],{"type":41,"value":1212},"gpg --keyserver hkp://subkeys.pgp.net --send-keys KEYID",{"type":41,"value":1214}," 指定服务器\n",{"type":35,"tag":103,"props":1216,"children":1217},{},[1218],{"type":35,"tag":107,"props":1219,"children":1220},{},[1221],{"type":41,"value":1222},"说是这些服务器会自动同步的，上传一个就最终都会有了",{"type":35,"tag":43,"props":1224,"children":1225},{},[1226],{"type":41,"value":1227},"别人可以用指纹作为 KEYID，从服务器找你的这个公钥，并导入：",{"type":35,"tag":54,"props":1229,"children":1231},{"className":56,"code":1230,"language":58,"meta":9,"style":9},"gpg --search-keys KEYID\n",[1232],{"type":35,"tag":61,"props":1233,"children":1234},{"__ignoreMap":9},[1235],{"type":35,"tag":65,"props":1236,"children":1237},{"class":67,"line":68},[1238,1242,1247],{"type":35,"tag":65,"props":1239,"children":1240},{"style":72},[1241],{"type":41,"value":146},{"type":35,"tag":65,"props":1243,"children":1244},{"style":149},[1245],{"type":41,"value":1246}," --search-keys",{"type":35,"tag":65,"props":1248,"children":1249},{"style":78},[1250],{"type":41,"value":1175},{"type":35,"tag":103,"props":1252,"children":1253},{},[1254],{"type":35,"tag":107,"props":1255,"children":1256},{},[1257,1259,1265],{"type":41,"value":1258},"正常就能搜出一个来，所以输入",{"type":35,"tag":61,"props":1260,"children":1262},{"className":1261},[],[1263],{"type":41,"value":1264},"1",{"type":41,"value":1266}," 回车就会 imported 了。",{"type":35,"tag":258,"props":1268,"children":1270},{"id":1269},"私钥导入导出",[1271],{"type":41,"value":1269},{"type":35,"tag":1128,"props":1273,"children":1274},{},[1275],{"type":35,"tag":43,"props":1276,"children":1277},{},[1278,1282],{"type":35,"tag":65,"props":1279,"children":1280},{},[1281],{"type":41,"value":1138},{"type":41,"value":1283}," 不要把私钥发给别人。",{"type":35,"tag":1128,"props":1285,"children":1286},{},[1287],{"type":35,"tag":43,"props":1288,"children":1289},{},[1290,1295],{"type":35,"tag":65,"props":1291,"children":1292},{},[1293],{"type":41,"value":1294},"!info",{"type":41,"value":1296}," 应该对私钥进行备份，存放在独立的、安全的介质上。",{"type":35,"tag":43,"props":1298,"children":1299},{},[1300],{"type":41,"value":1301},"⚠️ 导出私钥（secret key）：",{"type":35,"tag":54,"props":1303,"children":1305},{"className":56,"code":1304,"language":58,"meta":9,"style":9},"gpg --armor --output foo.secret-key.txt --export-secret-key foo@bar.com\n",[1306],{"type":35,"tag":61,"props":1307,"children":1308},{"__ignoreMap":9},[1309],{"type":35,"tag":65,"props":1310,"children":1311},{"class":67,"line":68},[1312,1316,1320,1325,1330,1335],{"type":35,"tag":65,"props":1313,"children":1314},{"style":72},[1315],{"type":41,"value":146},{"type":35,"tag":65,"props":1317,"children":1318},{"style":149},[1319],{"type":41,"value":807},{"type":35,"tag":65,"props":1321,"children":1322},{"style":149},[1323],{"type":41,"value":1324}," --output",{"type":35,"tag":65,"props":1326,"children":1327},{"style":78},[1328],{"type":41,"value":1329}," foo.secret-key.txt",{"type":35,"tag":65,"props":1331,"children":1332},{"style":149},[1333],{"type":41,"value":1334}," --export-secret-key",{"type":35,"tag":65,"props":1336,"children":1337},{"style":78},[1338],{"type":41,"value":724},{"type":35,"tag":103,"props":1340,"children":1341},{},[1342,1347,1352],{"type":35,"tag":107,"props":1343,"children":1344},{},[1345],{"type":41,"value":1346},"正常是不导出私钥的",{"type":35,"tag":107,"props":1348,"children":1349},{},[1350],{"type":41,"value":1351},"导出私钥是要输 passphrase 的",{"type":35,"tag":107,"props":1353,"children":1354},{},[1355],{"type":41,"value":1356},"实际上公钥也连带在导出的私钥里面",{"type":35,"tag":43,"props":1358,"children":1359},{},[1360],{"type":41,"value":1361},"导出的私钥，可以到另一台机器，和导入公钥一样的命令来导入这个私钥：",{"type":35,"tag":54,"props":1363,"children":1365},{"className":56,"code":1364,"language":58,"meta":9,"style":9},"gpg --import foo.secret-key.txt\n",[1366],{"type":35,"tag":61,"props":1367,"children":1368},{"__ignoreMap":9},[1369],{"type":35,"tag":65,"props":1370,"children":1371},{"class":67,"line":68},[1372,1376,1380],{"type":35,"tag":65,"props":1373,"children":1374},{"style":72},[1375],{"type":41,"value":146},{"type":35,"tag":65,"props":1377,"children":1378},{"style":149},[1379],{"type":41,"value":995},{"type":35,"tag":65,"props":1381,"children":1382},{"style":78},[1383],{"type":41,"value":1384}," foo.secret-key.txt\n",{"type":35,"tag":103,"props":1386,"children":1387},{},[1388,1393,1398,1403],{"type":35,"tag":107,"props":1389,"children":1390},{},[1391],{"type":41,"value":1392},"导入也要输入 passphrase",{"type":35,"tag":107,"props":1394,"children":1395},{},[1396],{"type":41,"value":1397},"然后这组公/私钥又导入进来了",{"type":35,"tag":107,"props":1399,"children":1400},{},[1401],{"type":41,"value":1402},"私钥就没有 trust 一说了，主打一个信任",{"type":35,"tag":107,"props":1404,"children":1405},{},[1406,1408,1414],{"type":41,"value":1407},"可能需要加一个 ",{"type":35,"tag":61,"props":1409,"children":1411},{"className":1410},[],[1412],{"type":41,"value":1413},"--allow-secret-key-import",{"type":41,"value":1415}," 选项才能导入私钥",{"type":35,"tag":258,"props":1417,"children":1419},{"id":1418},"删除-keys",[1420],{"type":41,"value":1421},"删除 keys",{"type":35,"tag":43,"props":1423,"children":1424},{},[1425],{"type":41,"value":1426},"删除公钥：",{"type":35,"tag":54,"props":1428,"children":1430},{"className":56,"code":1429,"language":58,"meta":9,"style":9},"gpg --delete-keys USERID\n",[1431],{"type":35,"tag":61,"props":1432,"children":1433},{"__ignoreMap":9},[1434],{"type":35,"tag":65,"props":1435,"children":1436},{"class":67,"line":68},[1437,1441,1446],{"type":35,"tag":65,"props":1438,"children":1439},{"style":72},[1440],{"type":41,"value":146},{"type":35,"tag":65,"props":1442,"children":1443},{"style":149},[1444],{"type":41,"value":1445}," --delete-keys",{"type":35,"tag":65,"props":1447,"children":1448},{"style":78},[1449],{"type":41,"value":828},{"type":35,"tag":43,"props":1451,"children":1452},{},[1453],{"type":41,"value":1454},"如果要删自己的公钥，得先把私钥删掉：",{"type":35,"tag":54,"props":1456,"children":1458},{"className":56,"code":1457,"language":58,"meta":9,"style":9},"gpg --delete-secret-keys USERID\n",[1459],{"type":35,"tag":61,"props":1460,"children":1461},{"__ignoreMap":9},[1462],{"type":35,"tag":65,"props":1463,"children":1464},{"class":67,"line":68},[1465,1469,1474],{"type":35,"tag":65,"props":1466,"children":1467},{"style":72},[1468],{"type":41,"value":146},{"type":35,"tag":65,"props":1470,"children":1471},{"style":149},[1472],{"type":41,"value":1473}," --delete-secret-keys",{"type":35,"tag":65,"props":1475,"children":1476},{"style":78},[1477],{"type":41,"value":828},{"type":35,"tag":103,"props":1479,"children":1480},{},[1481,1486],{"type":35,"tag":107,"props":1482,"children":1483},{},[1484],{"type":41,"value":1485},"删除私钥会反复以多种方式确认是否删除",{"type":35,"tag":107,"props":1487,"children":1488},{},[1489],{"type":41,"value":1490},"删除不需要 passphrase",{"type":35,"tag":43,"props":1492,"children":1493},{},[1494,1496,1502,1504,1509,1511,1516],{"type":41,"value":1495},"如果之前有导出过 key，可以重新 ",{"type":35,"tag":61,"props":1497,"children":1499},{"className":1498},[],[1500],{"type":41,"value":1501},"gpg --import",{"type":41,"value":1503}," 加载回来，详见 ",{"type":35,"tag":249,"props":1505,"children":1507},{"href":1506},"#%E5%85%AC%E9%92%A5%E5%AF%BC%E5%85%A5%E5%AF%BC%E5%87%BA",[1508],{"type":41,"value":781},{"type":41,"value":1510},"、",{"type":35,"tag":249,"props":1512,"children":1514},{"href":1513},"#%E7%A7%81%E9%92%A5%E5%AF%BC%E5%85%A5%E5%AF%BC%E5%87%BA",[1515],{"type":41,"value":1269},{"type":41,"value":1146},{"type":35,"tag":258,"props":1518,"children":1519},{"id":254},[1520],{"type":41,"value":254},{"type":35,"tag":1128,"props":1522,"children":1523},{},[1524],{"type":35,"tag":43,"props":1525,"children":1526},{},[1527,1531],{"type":35,"tag":65,"props":1528,"children":1529},{},[1530],{"type":41,"value":1138},{"type":41,"value":1532}," 吊销了似乎就不能在弄回来了",{"type":35,"tag":43,"props":1534,"children":1535},{},[1536],{"type":41,"value":1537},"生成并导入一个 revoke key 就可以使一个 key 失效。如果这个 key 被推到 key server 了，再把 revoke key 推到 server 人家服务器就知道把你的证书无效化了。",{"type":35,"tag":54,"props":1539,"children":1541},{"className":56,"code":1540,"language":58,"meta":9,"style":9},"gpg --list-keys foo@bar.com\n# 查看 KEYID\n\ngpg --output revoke.asc --gen-revoke KEYID\n# 会交互式让选择原因\n# 然后要输对应私钥的 passphrase\n\ngpg --import revoke.asc\n\n# 现在再看 gpg --list-keys foo@bar.com 就显示 revoked 了\n\ngpg --send-keys KEYID\n# 还是原来公钥的那个 KEYID\n# You have already revoked the key in your keyring. So, this revoked key is sent to the keyserver. Hence, your key in the online keyserver will also get revoked.\n",[1542],{"type":35,"tag":61,"props":1543,"children":1544},{"__ignoreMap":9},[1545,1561,1569,1576,1601,1609,1617,1624,1640,1648,1657,1665,1681,1690],{"type":35,"tag":65,"props":1546,"children":1547},{"class":67,"line":68},[1548,1552,1557],{"type":35,"tag":65,"props":1549,"children":1550},{"style":72},[1551],{"type":41,"value":146},{"type":35,"tag":65,"props":1553,"children":1554},{"style":149},[1555],{"type":41,"value":1556}," --list-keys",{"type":35,"tag":65,"props":1558,"children":1559},{"style":78},[1560],{"type":41,"value":724},{"type":35,"tag":65,"props":1562,"children":1563},{"class":67,"line":94},[1564],{"type":35,"tag":65,"props":1565,"children":1566},{"style":98},[1567],{"type":41,"value":1568},"# 查看 KEYID\n",{"type":35,"tag":65,"props":1570,"children":1571},{"class":67,"line":326},[1572],{"type":35,"tag":65,"props":1573,"children":1574},{"emptyLinePlaceholder":330},[1575],{"type":41,"value":333},{"type":35,"tag":65,"props":1577,"children":1578},{"class":67,"line":336},[1579,1583,1587,1592,1597],{"type":35,"tag":65,"props":1580,"children":1581},{"style":72},[1582],{"type":41,"value":146},{"type":35,"tag":65,"props":1584,"children":1585},{"style":149},[1586],{"type":41,"value":1324},{"type":35,"tag":65,"props":1588,"children":1589},{"style":78},[1590],{"type":41,"value":1591}," revoke.asc",{"type":35,"tag":65,"props":1593,"children":1594},{"style":149},[1595],{"type":41,"value":1596}," --gen-revoke",{"type":35,"tag":65,"props":1598,"children":1599},{"style":78},[1600],{"type":41,"value":1175},{"type":35,"tag":65,"props":1602,"children":1603},{"class":67,"line":1033},[1604],{"type":35,"tag":65,"props":1605,"children":1606},{"style":98},[1607],{"type":41,"value":1608},"# 会交互式让选择原因\n",{"type":35,"tag":65,"props":1610,"children":1611},{"class":67,"line":1042},[1612],{"type":35,"tag":65,"props":1613,"children":1614},{"style":98},[1615],{"type":41,"value":1616},"# 然后要输对应私钥的 passphrase\n",{"type":35,"tag":65,"props":1618,"children":1619},{"class":67,"line":1051},[1620],{"type":35,"tag":65,"props":1621,"children":1622},{"emptyLinePlaceholder":330},[1623],{"type":41,"value":333},{"type":35,"tag":65,"props":1625,"children":1626},{"class":67,"line":1060},[1627,1631,1635],{"type":35,"tag":65,"props":1628,"children":1629},{"style":72},[1630],{"type":41,"value":146},{"type":35,"tag":65,"props":1632,"children":1633},{"style":149},[1634],{"type":41,"value":995},{"type":35,"tag":65,"props":1636,"children":1637},{"style":78},[1638],{"type":41,"value":1639}," revoke.asc\n",{"type":35,"tag":65,"props":1641,"children":1643},{"class":67,"line":1642},9,[1644],{"type":35,"tag":65,"props":1645,"children":1646},{"emptyLinePlaceholder":330},[1647],{"type":41,"value":333},{"type":35,"tag":65,"props":1649,"children":1651},{"class":67,"line":1650},10,[1652],{"type":35,"tag":65,"props":1653,"children":1654},{"style":98},[1655],{"type":41,"value":1656},"# 现在再看 gpg --list-keys foo@bar.com 就显示 revoked 了\n",{"type":35,"tag":65,"props":1658,"children":1660},{"class":67,"line":1659},11,[1661],{"type":35,"tag":65,"props":1662,"children":1663},{"emptyLinePlaceholder":330},[1664],{"type":41,"value":333},{"type":35,"tag":65,"props":1666,"children":1668},{"class":67,"line":1667},12,[1669,1673,1677],{"type":35,"tag":65,"props":1670,"children":1671},{"style":72},[1672],{"type":41,"value":146},{"type":35,"tag":65,"props":1674,"children":1675},{"style":149},[1676],{"type":41,"value":1170},{"type":35,"tag":65,"props":1678,"children":1679},{"style":78},[1680],{"type":41,"value":1175},{"type":35,"tag":65,"props":1682,"children":1684},{"class":67,"line":1683},13,[1685],{"type":35,"tag":65,"props":1686,"children":1687},{"style":98},[1688],{"type":41,"value":1689},"# 还是原来公钥的那个 KEYID\n",{"type":35,"tag":65,"props":1691,"children":1693},{"class":67,"line":1692},14,[1694],{"type":35,"tag":65,"props":1695,"children":1696},{"style":98},[1697],{"type":41,"value":1698},"# You have already revoked the key in your keyring. So, this revoked key is sent to the keyserver. Hence, your key in the online keyserver will also get revoked.\n",{"type":35,"tag":43,"props":1700,"children":1701},{},[1702,1704,1709,1711,1716],{"type":41,"value":1703},"公钥吊销掉之后，对应的私钥也对应 revoked 了。所以这一对就没啥用了，可以 ",{"type":35,"tag":249,"props":1705,"children":1707},{"href":1706},"#%E5%88%A0%E9%99%A4%20keys",[1708],{"type":41,"value":1421},{"type":41,"value":1710}," 了。然后得重新生成一对来用了，see also ",{"type":35,"tag":249,"props":1712,"children":1714},{"href":1713},"#%E7%94%9F%E6%88%90%20key",[1715],{"type":41,"value":131},{"type":41,"value":256},{"type":35,"tag":258,"props":1718,"children":1720},{"id":1719},"编辑-key",[1721],{"type":41,"value":1119},{"type":35,"tag":43,"props":1723,"children":1724},{},[1725,1731],{"type":35,"tag":61,"props":1726,"children":1728},{"className":1727},[],[1729],{"type":41,"value":1730},"gpg --edit-key KEYID",{"type":41,"value":1732}," 很强，进去之后可以做很多事情，常用命令：",{"type":35,"tag":103,"props":1734,"children":1735},{},[1736,1747,1758,1769,1780,1791,1810],{"type":35,"tag":107,"props":1737,"children":1738},{},[1739,1745],{"type":35,"tag":61,"props":1740,"children":1742},{"className":1741},[],[1743],{"type":41,"value":1744},"help",{"type":41,"value":1746},": 显示所有命令",{"type":35,"tag":107,"props":1748,"children":1749},{},[1750,1756],{"type":35,"tag":61,"props":1751,"children":1753},{"className":1752},[],[1754],{"type":41,"value":1755},"passwd",{"type":41,"value":1757},": 修改口令",{"type":35,"tag":107,"props":1759,"children":1760},{},[1761,1767],{"type":35,"tag":61,"props":1762,"children":1764},{"className":1763},[],[1765],{"type":41,"value":1766},"clean",{"type":41,"value":1768},": 清理不可用（被撤销或过期）的密钥",{"type":35,"tag":107,"props":1770,"children":1771},{},[1772,1778],{"type":35,"tag":61,"props":1773,"children":1775},{"className":1774},[],[1776],{"type":41,"value":1777},"revkey",{"type":41,"value":1779},": 撤销密钥",{"type":35,"tag":107,"props":1781,"children":1782},{},[1783,1789],{"type":35,"tag":61,"props":1784,"children":1786},{"className":1785},[],[1787],{"type":41,"value":1788},"addkey",{"type":41,"value":1790},": 向此密钥添加子密钥",{"type":35,"tag":107,"props":1792,"children":1793},{},[1794,1800,1802],{"type":35,"tag":61,"props":1795,"children":1797},{"className":1796},[],[1798],{"type":41,"value":1799},"expire",{"type":41,"value":1801},": 修改密钥的过期时间\n",{"type":35,"tag":103,"props":1803,"children":1804},{},[1805],{"type":35,"tag":107,"props":1806,"children":1807},{},[1808],{"type":41,"value":1809},"可以重新启用一个已过期的密钥：密钥的过期时间可在任何时候被修改，即使它已经过期",{"type":35,"tag":107,"props":1811,"children":1812},{},[1813,1819],{"type":35,"tag":61,"props":1814,"children":1816},{"className":1815},[],[1817],{"type":41,"value":1818},"adduid",{"type":41,"value":1820},": 向此密钥添加一个电子邮件地址",{"type":35,"tag":48,"props":1822,"children":1824},{"id":1823},"使用-key",[1825],{"type":41,"value":1826},"使用 key",{"type":35,"tag":258,"props":1828,"children":1830},{"id":1829},"加密",[1831],{"type":41,"value":1829},{"type":35,"tag":43,"props":1833,"children":1834},{},[1835,1837,1843],{"type":41,"value":1836},"用 ",{"type":35,"tag":61,"props":1838,"children":1840},{"className":1839},[],[1841],{"type":41,"value":1842},"gpg --encrypt FILE",{"type":41,"value":1844}," 加密文件，输出二进制密文：",{"type":35,"tag":54,"props":1846,"children":1848},{"className":56,"code":1847,"language":58,"meta":9,"style":9},"gpg [--recipient foo@bar.com] [--output hello.encrypted.bin] --encrypt hello.txt\n",[1849],{"type":35,"tag":61,"props":1850,"children":1851},{"__ignoreMap":9},[1852],{"type":35,"tag":65,"props":1853,"children":1854},{"class":67,"line":68},[1855,1859,1864,1869,1873,1878,1883],{"type":35,"tag":65,"props":1856,"children":1857},{"style":72},[1858],{"type":41,"value":146},{"type":35,"tag":65,"props":1860,"children":1861},{"style":810},[1862],{"type":41,"value":1863}," [--recipient ",{"type":35,"tag":65,"props":1865,"children":1866},{"style":78},[1867],{"type":41,"value":1868},"foo@bar.com]",{"type":35,"tag":65,"props":1870,"children":1871},{"style":810},[1872],{"type":41,"value":813},{"type":35,"tag":65,"props":1874,"children":1875},{"style":78},[1876],{"type":41,"value":1877},"hello.encrypted.bin]",{"type":35,"tag":65,"props":1879,"children":1880},{"style":149},[1881],{"type":41,"value":1882}," --encrypt",{"type":35,"tag":65,"props":1884,"children":1885},{"style":78},[1886],{"type":41,"value":1887}," hello.txt\n",{"type":35,"tag":103,"props":1889,"children":1890},{},[1891,1896,1934,1982],{"type":35,"tag":107,"props":1892,"children":1893},{},[1894],{"type":41,"value":1895},"加密是使用的公钥，也就无需 passphrase，也就可以使用别人的公钥加密消息，然后发给别人，让他拿自己的私钥去解密。",{"type":35,"tag":107,"props":1897,"children":1898},{},[1899,1905,1907,1913],{"type":35,"tag":61,"props":1900,"children":1902},{"className":1901},[],[1903],{"type":41,"value":1904},"--recipient USERID",{"type":41,"value":1906}," 指定用的证书，简写 ",{"type":35,"tag":61,"props":1908,"children":1910},{"className":1909},[],[1911],{"type":41,"value":1912},"-r",{"type":35,"tag":103,"props":1914,"children":1915},{},[1916,1929],{"type":35,"tag":107,"props":1917,"children":1918},{},[1919,1921,1927],{"type":41,"value":1920},"可以写多个 ",{"type":35,"tag":61,"props":1922,"children":1924},{"className":1923},[],[1925],{"type":41,"value":1926},"-r userA -r userB",{"type":41,"value":1928}," 之类的，指定多个公钥",{"type":35,"tag":107,"props":1930,"children":1931},{},[1932],{"type":41,"value":1933},"不加这个， 没有默认的话会交互式让输入，可以输入多个（换行区分）",{"type":35,"tag":107,"props":1935,"children":1936},{},[1937,1943,1945,1950],{"type":35,"tag":61,"props":1938,"children":1940},{"className":1939},[],[1941],{"type":41,"value":1942},"--output FILE",{"type":41,"value":1944}," 输出到文件，简写 ",{"type":35,"tag":61,"props":1946,"children":1948},{"className":1947},[],[1949],{"type":41,"value":868},{"type":35,"tag":103,"props":1951,"children":1952},{},[1953,1970],{"type":35,"tag":107,"props":1954,"children":1955},{},[1956,1957,1962,1964],{"type":41,"value":433},{"type":35,"tag":61,"props":1958,"children":1960},{"className":1959},[],[1961],{"type":41,"value":868},{"type":41,"value":1963}," 会自动输出到 ",{"type":35,"tag":61,"props":1965,"children":1967},{"className":1966},[],[1968],{"type":41,"value":1969},"原文件名.gpg",{"type":35,"tag":107,"props":1971,"children":1972},{},[1973,1975,1980],{"type":41,"value":1974},"To write to stdout use ",{"type":35,"tag":61,"props":1976,"children":1978},{"className":1977},[],[1979],{"type":41,"value":537},{"type":41,"value":1981}," as the filename.",{"type":35,"tag":107,"props":1983,"children":1984},{},[1985,1991,1992],{"type":35,"tag":61,"props":1986,"children":1988},{"className":1987},[],[1989],{"type":41,"value":1990},"--encrypt",{"type":41,"value":862},{"type":35,"tag":61,"props":1993,"children":1995},{"className":1994},[],[1996],{"type":41,"value":1997},"-e",{"type":35,"tag":43,"props":1999,"children":2000},{},[2001,2003,2008,2010,2015],{"type":41,"value":2002},"加 ",{"type":35,"tag":61,"props":2004,"children":2006},{"className":2005},[],[2007],{"type":41,"value":896},{"type":41,"value":2009},"（a.k.a. ",{"type":35,"tag":61,"props":2011,"children":2013},{"className":2012},[],[2014],{"type":41,"value":922},{"type":41,"value":2016},"），输出转成文本的密文：",{"type":35,"tag":54,"props":2018,"children":2020},{"className":56,"code":2019,"language":58,"meta":9,"style":9},"gpg -a -r foo@bar.com -o hello.encrypted.asc -e hello.txt\n",[2021],{"type":35,"tag":61,"props":2022,"children":2023},{"__ignoreMap":9},[2024],{"type":35,"tag":65,"props":2025,"children":2026},{"class":67,"line":68},[2027,2031,2036,2041,2046,2051,2056,2061],{"type":35,"tag":65,"props":2028,"children":2029},{"style":72},[2030],{"type":41,"value":146},{"type":35,"tag":65,"props":2032,"children":2033},{"style":149},[2034],{"type":41,"value":2035}," -a",{"type":35,"tag":65,"props":2037,"children":2038},{"style":149},[2039],{"type":41,"value":2040}," -r",{"type":35,"tag":65,"props":2042,"children":2043},{"style":78},[2044],{"type":41,"value":2045}," foo@bar.com",{"type":35,"tag":65,"props":2047,"children":2048},{"style":149},[2049],{"type":41,"value":2050}," -o",{"type":35,"tag":65,"props":2052,"children":2053},{"style":78},[2054],{"type":41,"value":2055}," hello.encrypted.asc",{"type":35,"tag":65,"props":2057,"children":2058},{"style":149},[2059],{"type":41,"value":2060}," -e",{"type":35,"tag":65,"props":2062,"children":2063},{"style":78},[2064],{"type":41,"value":1887},{"type":35,"tag":103,"props":2066,"children":2067},{},[2068],{"type":35,"tag":107,"props":2069,"children":2070},{},[2071,2073,2078,2079,2085],{"type":41,"value":2072},"不指定 ",{"type":35,"tag":61,"props":2074,"children":2076},{"className":2075},[],[2077],{"type":41,"value":868},{"type":41,"value":1963},{"type":35,"tag":61,"props":2080,"children":2082},{"className":2081},[],[2083],{"type":41,"value":2084},"原文件名.asc",{"type":35,"tag":103,"props":2086,"children":2087},{},[2088],{"type":35,"tag":107,"props":2089,"children":2090},{},[2091,2092,2097],{"type":41,"value":1974},{"type":35,"tag":61,"props":2093,"children":2095},{"className":2094},[],[2096],{"type":41,"value":537},{"type":41,"value":1981},{"type":35,"tag":43,"props":2099,"children":2100},{},[2101,2103,2108],{"type":41,"value":2102},"如果 ",{"type":35,"tag":61,"props":2104,"children":2106},{"className":2105},[],[2107],{"type":41,"value":1990},{"type":41,"value":2109}," 后面不加文件，gpg 会从标准输入读取明文，加密后将密文输出到标准输出：",{"type":35,"tag":54,"props":2111,"children":2113},{"className":56,"code":2112,"language":58,"meta":9,"style":9},"echo \"hello\" | gpg -a -r foo@bar.com -e | less\n",[2114],{"type":35,"tag":61,"props":2115,"children":2116},{"__ignoreMap":9},[2117],{"type":35,"tag":65,"props":2118,"children":2119},{"class":67,"line":68},[2120,2126,2131,2137,2141,2145,2149,2153,2157,2161],{"type":35,"tag":65,"props":2121,"children":2123},{"style":2122},"--shiki-default:#005CC5;--shiki-dark:#79B8FF;--shiki-sepia:#66D9EF",[2124],{"type":41,"value":2125},"echo",{"type":35,"tag":65,"props":2127,"children":2128},{"style":78},[2129],{"type":41,"value":2130}," \"hello\"",{"type":35,"tag":65,"props":2132,"children":2134},{"style":2133},"--shiki-default:#D73A49;--shiki-dark:#F97583;--shiki-sepia:#F92672",[2135],{"type":41,"value":2136}," |",{"type":35,"tag":65,"props":2138,"children":2139},{"style":72},[2140],{"type":41,"value":86},{"type":35,"tag":65,"props":2142,"children":2143},{"style":149},[2144],{"type":41,"value":2035},{"type":35,"tag":65,"props":2146,"children":2147},{"style":149},[2148],{"type":41,"value":2040},{"type":35,"tag":65,"props":2150,"children":2151},{"style":78},[2152],{"type":41,"value":2045},{"type":35,"tag":65,"props":2154,"children":2155},{"style":149},[2156],{"type":41,"value":2060},{"type":35,"tag":65,"props":2158,"children":2159},{"style":2133},[2160],{"type":41,"value":2136},{"type":35,"tag":65,"props":2162,"children":2163},{"style":72},[2164],{"type":41,"value":2165}," less\n",{"type":35,"tag":258,"props":2167,"children":2169},{"id":2168},"解密",[2170],{"type":41,"value":2168},{"type":35,"tag":43,"props":2172,"children":2173},{},[2174,2175,2181,2183,2189],{"type":41,"value":1836},{"type":35,"tag":61,"props":2176,"children":2178},{"className":2177},[],[2179],{"type":41,"value":2180},"--decrypt",{"type":41,"value":2182}," 或 ",{"type":35,"tag":61,"props":2184,"children":2186},{"className":2185},[],[2187],{"type":41,"value":2188},"-d",{"type":41,"value":2190}," 解密：",{"type":35,"tag":54,"props":2192,"children":2194},{"className":56,"code":2193,"language":58,"meta":9,"style":9},"gpg [-o decrypted.txt] --decrypt hello.encrypted.asc\n",[2195],{"type":35,"tag":61,"props":2196,"children":2197},{"__ignoreMap":9},[2198],{"type":35,"tag":65,"props":2199,"children":2200},{"class":67,"line":68},[2201,2205,2210,2215,2220],{"type":35,"tag":65,"props":2202,"children":2203},{"style":72},[2204],{"type":41,"value":146},{"type":35,"tag":65,"props":2206,"children":2207},{"style":810},[2208],{"type":41,"value":2209}," [-o ",{"type":35,"tag":65,"props":2211,"children":2212},{"style":78},[2213],{"type":41,"value":2214},"decrypted.txt]",{"type":35,"tag":65,"props":2216,"children":2217},{"style":149},[2218],{"type":41,"value":2219}," --decrypt",{"type":35,"tag":65,"props":2221,"children":2222},{"style":78},[2223],{"type":41,"value":2224}," hello.encrypted.asc\n",{"type":35,"tag":103,"props":2226,"children":2227},{},[2228,2241],{"type":35,"tag":107,"props":2229,"children":2230},{},[2231,2233,2239],{"type":41,"value":2232},"无需指定 ",{"type":35,"tag":61,"props":2234,"children":2236},{"className":2235},[],[2237],{"type":41,"value":2238},"--recipient",{"type":41,"value":2240},"，他能自己识别到 Key ID，然后选用对应的私钥（如果存在的话），可能需要输入 passphrase 来使用私钥",{"type":35,"tag":107,"props":2242,"children":2243},{},[2244,2245,2250,2252],{"type":41,"value":433},{"type":35,"tag":61,"props":2246,"children":2248},{"className":2247},[],[2249],{"type":41,"value":868},{"type":41,"value":2251}," 默认输出到标准输出\n",{"type":35,"tag":103,"props":2253,"children":2254},{},[2255],{"type":35,"tag":107,"props":2256,"children":2257},{},[2258],{"type":41,"value":2259},"注意：即使解密得到的文件是二进制，也会打到标准输出",{"type":35,"tag":43,"props":2261,"children":2262},{},[2263],{"type":41,"value":2264},"下面这个管道，相当于一个 echo，打印出最终输出原始为加密的文本：",{"type":35,"tag":54,"props":2266,"children":2268},{"className":56,"code":2267,"language":58,"meta":9,"style":9},"echo \"hello\" | gpg -r foo@bar.com -e | gpg -d\n",[2269],{"type":35,"tag":61,"props":2270,"children":2271},{"__ignoreMap":9},[2272],{"type":35,"tag":65,"props":2273,"children":2274},{"class":67,"line":68},[2275,2279,2283,2287,2291,2295,2299,2303,2307,2311],{"type":35,"tag":65,"props":2276,"children":2277},{"style":2122},[2278],{"type":41,"value":2125},{"type":35,"tag":65,"props":2280,"children":2281},{"style":78},[2282],{"type":41,"value":2130},{"type":35,"tag":65,"props":2284,"children":2285},{"style":2133},[2286],{"type":41,"value":2136},{"type":35,"tag":65,"props":2288,"children":2289},{"style":72},[2290],{"type":41,"value":86},{"type":35,"tag":65,"props":2292,"children":2293},{"style":149},[2294],{"type":41,"value":2040},{"type":35,"tag":65,"props":2296,"children":2297},{"style":78},[2298],{"type":41,"value":2045},{"type":35,"tag":65,"props":2300,"children":2301},{"style":149},[2302],{"type":41,"value":2060},{"type":35,"tag":65,"props":2304,"children":2305},{"style":2133},[2306],{"type":41,"value":2136},{"type":35,"tag":65,"props":2308,"children":2309},{"style":72},[2310],{"type":41,"value":86},{"type":35,"tag":65,"props":2312,"children":2313},{"style":149},[2314],{"type":41,"value":2315}," -d\n",{"type":35,"tag":103,"props":2317,"children":2318},{},[2319],{"type":35,"tag":107,"props":2320,"children":2321},{},[2322,2324,2330],{"type":41,"value":2323},"实际上，也不完全是 echo，",{"type":35,"tag":61,"props":2325,"children":2327},{"className":2326},[],[2328],{"type":41,"value":2329},"gpg --decrypt",{"type":41,"value":2331}," 的时候，会打印加密使用的公钥信息到 stderr：",{"type":35,"tag":54,"props":2333,"children":2335},{"className":56,"code":2334,"language":58,"meta":9,"style":9},"$ echo \"hello\" | gpg -r foo@bar.com -e | gpg -d\ngpg: encrypted with rsa3072 key, ID E92EFD81571490F1, created 2025-04-21\n      \"Foo Bar \u003Cfoo@bar.com>\"\nhello\n\n$ echo \"hello\" | gpg -r foo@bar.com -e | gpg -d 2>stderr.log\nhello\n",[2336],{"type":35,"tag":61,"props":2337,"children":2338},{"__ignoreMap":9},[2339,2388,2436,2444,2452,2459,2517],{"type":35,"tag":65,"props":2340,"children":2341},{"class":67,"line":68},[2342,2347,2352,2356,2360,2364,2368,2372,2376,2380,2384],{"type":35,"tag":65,"props":2343,"children":2344},{"style":72},[2345],{"type":41,"value":2346},"$",{"type":35,"tag":65,"props":2348,"children":2349},{"style":78},[2350],{"type":41,"value":2351}," echo",{"type":35,"tag":65,"props":2353,"children":2354},{"style":78},[2355],{"type":41,"value":2130},{"type":35,"tag":65,"props":2357,"children":2358},{"style":2133},[2359],{"type":41,"value":2136},{"type":35,"tag":65,"props":2361,"children":2362},{"style":72},[2363],{"type":41,"value":86},{"type":35,"tag":65,"props":2365,"children":2366},{"style":149},[2367],{"type":41,"value":2040},{"type":35,"tag":65,"props":2369,"children":2370},{"style":78},[2371],{"type":41,"value":2045},{"type":35,"tag":65,"props":2373,"children":2374},{"style":149},[2375],{"type":41,"value":2060},{"type":35,"tag":65,"props":2377,"children":2378},{"style":2133},[2379],{"type":41,"value":2136},{"type":35,"tag":65,"props":2381,"children":2382},{"style":72},[2383],{"type":41,"value":86},{"type":35,"tag":65,"props":2385,"children":2386},{"style":149},[2387],{"type":41,"value":2315},{"type":35,"tag":65,"props":2389,"children":2390},{"class":67,"line":94},[2391,2396,2401,2406,2411,2416,2421,2426,2431],{"type":35,"tag":65,"props":2392,"children":2393},{"style":72},[2394],{"type":41,"value":2395},"gpg:",{"type":35,"tag":65,"props":2397,"children":2398},{"style":78},[2399],{"type":41,"value":2400}," encrypted",{"type":35,"tag":65,"props":2402,"children":2403},{"style":78},[2404],{"type":41,"value":2405}," with",{"type":35,"tag":65,"props":2407,"children":2408},{"style":78},[2409],{"type":41,"value":2410}," rsa3072",{"type":35,"tag":65,"props":2412,"children":2413},{"style":78},[2414],{"type":41,"value":2415}," key,",{"type":35,"tag":65,"props":2417,"children":2418},{"style":78},[2419],{"type":41,"value":2420}," ID",{"type":35,"tag":65,"props":2422,"children":2423},{"style":78},[2424],{"type":41,"value":2425}," E92EFD81571490F1,",{"type":35,"tag":65,"props":2427,"children":2428},{"style":78},[2429],{"type":41,"value":2430}," created",{"type":35,"tag":65,"props":2432,"children":2433},{"style":78},[2434],{"type":41,"value":2435}," 2025-04-21\n",{"type":35,"tag":65,"props":2437,"children":2438},{"class":67,"line":326},[2439],{"type":35,"tag":65,"props":2440,"children":2441},{"style":72},[2442],{"type":41,"value":2443},"      \"Foo Bar \u003Cfoo@bar.com>\"\n",{"type":35,"tag":65,"props":2445,"children":2446},{"class":67,"line":336},[2447],{"type":35,"tag":65,"props":2448,"children":2449},{"style":72},[2450],{"type":41,"value":2451},"hello\n",{"type":35,"tag":65,"props":2453,"children":2454},{"class":67,"line":1033},[2455],{"type":35,"tag":65,"props":2456,"children":2457},{"emptyLinePlaceholder":330},[2458],{"type":41,"value":333},{"type":35,"tag":65,"props":2460,"children":2461},{"class":67,"line":1042},[2462,2466,2470,2474,2478,2482,2486,2490,2494,2498,2502,2507,2512],{"type":35,"tag":65,"props":2463,"children":2464},{"style":72},[2465],{"type":41,"value":2346},{"type":35,"tag":65,"props":2467,"children":2468},{"style":78},[2469],{"type":41,"value":2351},{"type":35,"tag":65,"props":2471,"children":2472},{"style":78},[2473],{"type":41,"value":2130},{"type":35,"tag":65,"props":2475,"children":2476},{"style":2133},[2477],{"type":41,"value":2136},{"type":35,"tag":65,"props":2479,"children":2480},{"style":72},[2481],{"type":41,"value":86},{"type":35,"tag":65,"props":2483,"children":2484},{"style":149},[2485],{"type":41,"value":2040},{"type":35,"tag":65,"props":2487,"children":2488},{"style":78},[2489],{"type":41,"value":2045},{"type":35,"tag":65,"props":2491,"children":2492},{"style":149},[2493],{"type":41,"value":2060},{"type":35,"tag":65,"props":2495,"children":2496},{"style":2133},[2497],{"type":41,"value":2136},{"type":35,"tag":65,"props":2499,"children":2500},{"style":72},[2501],{"type":41,"value":86},{"type":35,"tag":65,"props":2503,"children":2504},{"style":149},[2505],{"type":41,"value":2506}," -d",{"type":35,"tag":65,"props":2508,"children":2509},{"style":2133},[2510],{"type":41,"value":2511}," 2>",{"type":35,"tag":65,"props":2513,"children":2514},{"style":78},[2515],{"type":41,"value":2516},"stderr.log\n",{"type":35,"tag":65,"props":2518,"children":2519},{"class":67,"line":1051},[2520],{"type":35,"tag":65,"props":2521,"children":2522},{"style":72},[2523],{"type":41,"value":2451},{"type":35,"tag":258,"props":2525,"children":2527},{"id":2526},"签名",[2528],{"type":41,"value":2526},{"type":35,"tag":43,"props":2530,"children":2531},{},[2532],{"type":41,"value":2533},"证明文件是我本人发出的。",{"type":35,"tag":1121,"props":2535,"children":2537},{"id":2536},"签名文件",[2538],{"type":41,"value":2536},{"type":35,"tag":54,"props":2540,"children":2542},{"className":56,"code":2541,"language":58,"meta":9,"style":9},"gpg --local-user foo@bar.com [-o hello.gpg] --sign hello.txt\n",[2543],{"type":35,"tag":61,"props":2544,"children":2545},{"__ignoreMap":9},[2546],{"type":35,"tag":65,"props":2547,"children":2548},{"class":67,"line":68},[2549,2553,2558,2562,2566,2571,2576],{"type":35,"tag":65,"props":2550,"children":2551},{"style":72},[2552],{"type":41,"value":146},{"type":35,"tag":65,"props":2554,"children":2555},{"style":149},[2556],{"type":41,"value":2557}," --local-user",{"type":35,"tag":65,"props":2559,"children":2560},{"style":78},[2561],{"type":41,"value":2045},{"type":35,"tag":65,"props":2563,"children":2564},{"style":810},[2565],{"type":41,"value":2209},{"type":35,"tag":65,"props":2567,"children":2568},{"style":78},[2569],{"type":41,"value":2570},"hello.gpg]",{"type":35,"tag":65,"props":2572,"children":2573},{"style":149},[2574],{"type":41,"value":2575}," --sign",{"type":35,"tag":65,"props":2577,"children":2578},{"style":78},[2579],{"type":41,"value":1887},{"type":35,"tag":103,"props":2581,"children":2582},{},[2583,2618,2631,2647,2663],{"type":35,"tag":107,"props":2584,"children":2585},{},[2586,2587,2593,2594,2600,2602],{"type":41,"value":1836},{"type":35,"tag":61,"props":2588,"children":2590},{"className":2589},[],[2591],{"type":41,"value":2592},"--local-user",{"type":41,"value":2182},{"type":35,"tag":61,"props":2595,"children":2597},{"className":2596},[],[2598],{"type":41,"value":2599},"-u",{"type":41,"value":2601}," 指定用来签名的私钥\n",{"type":35,"tag":103,"props":2603,"children":2604},{},[2605],{"type":35,"tag":107,"props":2606,"children":2607},{},[2608,2610,2616],{"type":41,"value":2609},"可以写 uid，但我看别人一般是写 key id，就是 ",{"type":35,"tag":61,"props":2611,"children":2613},{"className":2612},[],[2614],{"type":41,"value":2615},"gpg --list-secret-keys",{"type":41,"value":2617}," 出的那串十六进制码（指纹）",{"type":35,"tag":107,"props":2619,"children":2620},{},[2621,2623,2629],{"type":41,"value":2622},"也能用 ",{"type":35,"tag":61,"props":2624,"children":2626},{"className":2625},[],[2627],{"type":41,"value":2628},"--default-key",{"type":41,"value":2630}," 选项来指定私钥",{"type":35,"tag":107,"props":2632,"children":2633},{},[2634,2640,2641],{"type":35,"tag":61,"props":2635,"children":2637},{"className":2636},[],[2638],{"type":41,"value":2639},"--sign",{"type":41,"value":862},{"type":35,"tag":61,"props":2642,"children":2644},{"className":2643},[],[2645],{"type":41,"value":2646},"-s",{"type":35,"tag":107,"props":2648,"children":2649},{},[2650,2651,2656,2658],{"type":41,"value":433},{"type":35,"tag":61,"props":2652,"children":2654},{"className":2653},[],[2655],{"type":41,"value":868},{"type":41,"value":2657}," 默认输出到 ",{"type":35,"tag":61,"props":2659,"children":2661},{"className":2660},[],[2662],{"type":41,"value":1969},{"type":35,"tag":107,"props":2664,"children":2665},{},[2666,2668,2673,2675],{"type":41,"value":2667},"也可以加 ",{"type":35,"tag":61,"props":2669,"children":2671},{"className":2670},[],[2672],{"type":41,"value":896},{"type":41,"value":2674}," 输出转为文本表示的 ",{"type":35,"tag":61,"props":2676,"children":2678},{"className":2677},[],[2679],{"type":41,"value":2680},"原文件.asc",{"type":35,"tag":43,"props":2682,"children":2683},{},[2684,2686,2691],{"type":41,"value":2685},"输出的文件是包含原文件内容、以及签名信息的二进制文件。签名后的这个文件，即使 ",{"type":35,"tag":61,"props":2687,"children":2689},{"className":2688},[],[2690],{"type":41,"value":896},{"type":41,"value":2692}," 转文本了，正常人类也不可读，需要使用 pgp 软件解密才能看到原文。",{"type":35,"tag":1121,"props":2694,"children":2696},{"id":2695},"验证签名",[2697],{"type":41,"value":2695},{"type":35,"tag":43,"props":2699,"children":2700},{},[2701],{"type":41,"value":2702},"验证签名（输出到 stdout）：",{"type":35,"tag":54,"props":2704,"children":2706},{"className":56,"code":2705,"language":58,"meta":9,"style":9},"gpg --verify hello.txt.gpg\n",[2707],{"type":35,"tag":61,"props":2708,"children":2709},{"__ignoreMap":9},[2710],{"type":35,"tag":65,"props":2711,"children":2712},{"class":67,"line":68},[2713,2717,2722],{"type":35,"tag":65,"props":2714,"children":2715},{"style":72},[2716],{"type":41,"value":146},{"type":35,"tag":65,"props":2718,"children":2719},{"style":149},[2720],{"type":41,"value":2721}," --verify",{"type":35,"tag":65,"props":2723,"children":2724},{"style":78},[2725],{"type":41,"value":2726}," hello.txt.gpg\n",{"type":35,"tag":103,"props":2728,"children":2729},{},[2730,2741,2752],{"type":35,"tag":107,"props":2731,"children":2732},{},[2733,2735],{"type":41,"value":2734},"主要看输出最后一行，正常是 ",{"type":35,"tag":61,"props":2736,"children":2738},{"className":2737},[],[2739],{"type":41,"value":2740},"Good signature from ...",{"type":35,"tag":107,"props":2742,"children":2743},{},[2744,2746],{"type":41,"value":2745},"如果原文内容被篡改过，可能就成了 ",{"type":35,"tag":61,"props":2747,"children":2749},{"className":2748},[],[2750],{"type":41,"value":2751},"BAD signature from ...",{"type":35,"tag":107,"props":2753,"children":2754},{},[2755,2757],{"type":41,"value":2756},"如果签名内容被篡改过，还可能是 ",{"type":35,"tag":61,"props":2758,"children":2760},{"className":2759},[],[2761],{"type":41,"value":2762},"the signature could not be verified",{"type":35,"tag":43,"props":2764,"children":2765},{},[2766],{"type":41,"value":2767},"获取原文内容，相当于做一个解密（输出到 stdout）：",{"type":35,"tag":54,"props":2769,"children":2771},{"className":56,"code":2770,"language":58,"meta":9,"style":9},"gpg --decrypt hello.txt.gpg\n",[2772],{"type":35,"tag":61,"props":2773,"children":2774},{"__ignoreMap":9},[2775],{"type":35,"tag":65,"props":2776,"children":2777},{"class":67,"line":68},[2778,2782,2786],{"type":35,"tag":65,"props":2779,"children":2780},{"style":72},[2781],{"type":41,"value":146},{"type":35,"tag":65,"props":2783,"children":2784},{"style":149},[2785],{"type":41,"value":2219},{"type":35,"tag":65,"props":2787,"children":2788},{"style":78},[2789],{"type":41,"value":2726},{"type":35,"tag":1121,"props":2791,"children":2793},{"id":2792},"明文签名",[2794],{"type":41,"value":2792},{"type":35,"tag":43,"props":2796,"children":2797},{},[2798,2803,2805,2811],{"type":35,"tag":61,"props":2799,"children":2801},{"className":2800},[],[2802],{"type":41,"value":2639},{"type":41,"value":2804}," 签名后的消息不用 gpg 解密是看不到原本的明文内容的，可以用 ",{"type":35,"tag":61,"props":2806,"children":2808},{"className":2807},[],[2809],{"type":41,"value":2810},"--clearsign",{"type":41,"value":2812}," 把原本的明文附加进去：",{"type":35,"tag":54,"props":2814,"children":2816},{"className":56,"code":2815,"language":58,"meta":9,"style":9},"$ gpg --local-user foo@bar.com -o - --clearsign hello.txt\n-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA256\n\nHello, world!\n-----BEGIN PGP SIGNATURE-----\n...\n-----END PGP SIGNATURE-----\n",[2817],{"type":35,"tag":61,"props":2818,"children":2819},{"__ignoreMap":9},[2820,2857,2880,2893,2900,2913,2929,2937],{"type":35,"tag":65,"props":2821,"children":2822},{"class":67,"line":68},[2823,2827,2831,2835,2839,2843,2848,2853],{"type":35,"tag":65,"props":2824,"children":2825},{"style":72},[2826],{"type":41,"value":2346},{"type":35,"tag":65,"props":2828,"children":2829},{"style":78},[2830],{"type":41,"value":86},{"type":35,"tag":65,"props":2832,"children":2833},{"style":149},[2834],{"type":41,"value":2557},{"type":35,"tag":65,"props":2836,"children":2837},{"style":78},[2838],{"type":41,"value":2045},{"type":35,"tag":65,"props":2840,"children":2841},{"style":149},[2842],{"type":41,"value":2050},{"type":35,"tag":65,"props":2844,"children":2845},{"style":78},[2846],{"type":41,"value":2847}," -",{"type":35,"tag":65,"props":2849,"children":2850},{"style":149},[2851],{"type":41,"value":2852}," --clearsign",{"type":35,"tag":65,"props":2854,"children":2855},{"style":78},[2856],{"type":41,"value":1887},{"type":35,"tag":65,"props":2858,"children":2859},{"class":67,"line":94},[2860,2865,2870,2875],{"type":35,"tag":65,"props":2861,"children":2862},{"style":72},[2863],{"type":41,"value":2864},"-----BEGIN",{"type":35,"tag":65,"props":2866,"children":2867},{"style":78},[2868],{"type":41,"value":2869}," PGP",{"type":35,"tag":65,"props":2871,"children":2872},{"style":78},[2873],{"type":41,"value":2874}," SIGNED",{"type":35,"tag":65,"props":2876,"children":2877},{"style":78},[2878],{"type":41,"value":2879}," MESSAGE-----\n",{"type":35,"tag":65,"props":2881,"children":2882},{"class":67,"line":326},[2883,2888],{"type":35,"tag":65,"props":2884,"children":2885},{"style":72},[2886],{"type":41,"value":2887},"Hash:",{"type":35,"tag":65,"props":2889,"children":2890},{"style":78},[2891],{"type":41,"value":2892}," SHA256\n",{"type":35,"tag":65,"props":2894,"children":2895},{"class":67,"line":336},[2896],{"type":35,"tag":65,"props":2897,"children":2898},{"emptyLinePlaceholder":330},[2899],{"type":41,"value":333},{"type":35,"tag":65,"props":2901,"children":2902},{"class":67,"line":1033},[2903,2908],{"type":35,"tag":65,"props":2904,"children":2905},{"style":72},[2906],{"type":41,"value":2907},"Hello,",{"type":35,"tag":65,"props":2909,"children":2910},{"style":78},[2911],{"type":41,"value":2912}," world!\n",{"type":35,"tag":65,"props":2914,"children":2915},{"class":67,"line":1042},[2916,2920,2924],{"type":35,"tag":65,"props":2917,"children":2918},{"style":72},[2919],{"type":41,"value":2864},{"type":35,"tag":65,"props":2921,"children":2922},{"style":78},[2923],{"type":41,"value":2869},{"type":35,"tag":65,"props":2925,"children":2926},{"style":78},[2927],{"type":41,"value":2928}," SIGNATURE-----\n",{"type":35,"tag":65,"props":2930,"children":2931},{"class":67,"line":1051},[2932],{"type":35,"tag":65,"props":2933,"children":2934},{"style":2122},[2935],{"type":41,"value":2936},"...\n",{"type":35,"tag":65,"props":2938,"children":2939},{"class":67,"line":1060},[2940,2945,2949],{"type":35,"tag":65,"props":2941,"children":2942},{"style":72},[2943],{"type":41,"value":2944},"-----END",{"type":35,"tag":65,"props":2946,"children":2947},{"style":78},[2948],{"type":41,"value":2869},{"type":35,"tag":65,"props":2950,"children":2951},{"style":78},[2952],{"type":41,"value":2928},{"type":35,"tag":103,"props":2954,"children":2955},{},[2956],{"type":35,"tag":107,"props":2957,"children":2958},{},[2959,2964,2966],{"type":35,"tag":61,"props":2960,"children":2962},{"className":2961},[],[2963],{"type":41,"value":2810},{"type":41,"value":2965}," 将输出文本表示，无需加 ",{"type":35,"tag":61,"props":2967,"children":2969},{"className":2968},[],[2970],{"type":41,"value":896},{"type":35,"tag":43,"props":2972,"children":2973},{},[2974,2976,2982,2983,2988,2990,2995],{"type":41,"value":2975},"一样的，用 ",{"type":35,"tag":61,"props":2977,"children":2979},{"className":2978},[],[2980],{"type":41,"value":2981},"gpg --verify",{"type":41,"value":552},{"type":35,"tag":61,"props":2984,"children":2986},{"className":2985},[],[2987],{"type":41,"value":2329},{"type":41,"value":2989}," 验证签名，明文写的 message 如果被篡改了也会导致 ",{"type":35,"tag":61,"props":2991,"children":2993},{"className":2992},[],[2994],{"type":41,"value":2751},{"type":41,"value":1146},{"type":35,"tag":1121,"props":2997,"children":2999},{"id":2998},"分开签名和原文件",[3000],{"type":41,"value":2998},{"type":35,"tag":43,"props":3002,"children":3003},{},[3004,3006,3012,3013,3019],{"type":41,"value":3005},"不把原文件和签名封到一个文件 ",{"type":35,"tag":61,"props":3007,"children":3009},{"className":3008},[],[3010],{"type":41,"value":3011},".gpg",{"type":41,"value":2182},{"type":35,"tag":61,"props":3014,"children":3016},{"className":3015},[],[3017],{"type":41,"value":3018},".asc",{"type":41,"value":3020}," 文件里，而是弄个单独的签名文件：",{"type":35,"tag":54,"props":3022,"children":3024},{"className":56,"code":3023,"language":58,"meta":9,"style":9},"gpg [--armor] --local-user foo@bar.com --detach-sign hello.txt\n",[3025],{"type":35,"tag":61,"props":3026,"children":3027},{"__ignoreMap":9},[3028],{"type":35,"tag":65,"props":3029,"children":3030},{"class":67,"line":68},[3031,3035],{"type":35,"tag":65,"props":3032,"children":3033},{"style":72},[3034],{"type":41,"value":146},{"type":35,"tag":65,"props":3036,"children":3037},{"style":810},[3038],{"type":41,"value":3039}," [--armor] --local-user foo@bar.com --detach-sign hello.txt\n",{"type":35,"tag":103,"props":3041,"children":3042},{},[3043,3054],{"type":35,"tag":107,"props":3044,"children":3045},{},[3046,3048],{"type":41,"value":3047},"默认当前目录下生成一个二进制的 ",{"type":35,"tag":61,"props":3049,"children":3051},{"className":3050},[],[3052],{"type":41,"value":3053},"原文件名.sig",{"type":35,"tag":107,"props":3055,"children":3056},{},[3057,3059,3064,3066],{"type":41,"value":3058},"带 ",{"type":35,"tag":61,"props":3060,"children":3062},{"className":3061},[],[3063],{"type":41,"value":896},{"type":41,"value":3065}," 的话，默认输出到 ",{"type":35,"tag":61,"props":3067,"children":3069},{"className":3068},[],[3070],{"type":41,"value":2084},{"type":35,"tag":43,"props":3072,"children":3073},{},[3074],{"type":41,"value":3075},"验证分开的签名：签名文件在前，原文件在后：",{"type":35,"tag":54,"props":3077,"children":3079},{"className":56,"code":3078,"language":58,"meta":9,"style":9},"gpg --verify hello.txt.asc hello.txt\n",[3080],{"type":35,"tag":61,"props":3081,"children":3082},{"__ignoreMap":9},[3083],{"type":35,"tag":65,"props":3084,"children":3085},{"class":67,"line":68},[3086,3090,3094,3099],{"type":35,"tag":65,"props":3087,"children":3088},{"style":72},[3089],{"type":41,"value":146},{"type":35,"tag":65,"props":3091,"children":3092},{"style":149},[3093],{"type":41,"value":2721},{"type":35,"tag":65,"props":3095,"children":3096},{"style":78},[3097],{"type":41,"value":3098}," hello.txt.asc",{"type":35,"tag":65,"props":3100,"children":3101},{"style":78},[3102],{"type":41,"value":1887},{"type":35,"tag":103,"props":3104,"children":3105},{},[3106,3111],{"type":35,"tag":107,"props":3107,"children":3108},{},[3109],{"type":41,"value":3110},"后面的原文件可以不传，这样会只验证签名文件本身没问题",{"type":35,"tag":107,"props":3112,"children":3113},{},[3114],{"type":41,"value":3115},"加了原文件则还会验证原文件未被篡改",{"type":35,"tag":258,"props":3117,"children":3119},{"id":3118},"加密并签名",[3120],{"type":41,"value":3118},{"type":35,"tag":43,"props":3122,"children":3123},{},[3124],{"type":41,"value":3125},"可以加密和签名一起做：",{"type":35,"tag":54,"props":3127,"children":3129},{"className":56,"code":3128,"language":58,"meta":9,"style":9},"# 先了签名，再加的密：\ngpg [--armor] --local-user 发送者 --recipient 接收者 --sign --encrypt hello.txt\n\n# 解密，并验证签名\ngpg --decrypt sign-and-enc.asc\n",[3130],{"type":35,"tag":61,"props":3131,"children":3132},{"__ignoreMap":9},[3133,3141,3153,3160,3168],{"type":35,"tag":65,"props":3134,"children":3135},{"class":67,"line":68},[3136],{"type":35,"tag":65,"props":3137,"children":3138},{"style":98},[3139],{"type":41,"value":3140},"# 先了签名，再加的密：\n",{"type":35,"tag":65,"props":3142,"children":3143},{"class":67,"line":94},[3144,3148],{"type":35,"tag":65,"props":3145,"children":3146},{"style":72},[3147],{"type":41,"value":146},{"type":35,"tag":65,"props":3149,"children":3150},{"style":810},[3151],{"type":41,"value":3152}," [--armor] --local-user 发送者 --recipient 接收者 --sign --encrypt hello.txt\n",{"type":35,"tag":65,"props":3154,"children":3155},{"class":67,"line":326},[3156],{"type":35,"tag":65,"props":3157,"children":3158},{"emptyLinePlaceholder":330},[3159],{"type":41,"value":333},{"type":35,"tag":65,"props":3161,"children":3162},{"class":67,"line":336},[3163],{"type":35,"tag":65,"props":3164,"children":3165},{"style":98},[3166],{"type":41,"value":3167},"# 解密，并验证签名\n",{"type":35,"tag":65,"props":3169,"children":3170},{"class":67,"line":1033},[3171,3175,3179],{"type":35,"tag":65,"props":3172,"children":3173},{"style":72},[3174],{"type":41,"value":146},{"type":35,"tag":65,"props":3176,"children":3177},{"style":149},[3178],{"type":41,"value":2219},{"type":35,"tag":65,"props":3180,"children":3181},{"style":78},[3182],{"type":41,"value":3183}," sign-and-enc.asc\n",{"type":35,"tag":103,"props":3185,"children":3186},{},[3187,3207,3228],{"type":35,"tag":107,"props":3188,"children":3189},{},[3190,3192,3198,3200,3205],{"type":41,"value":3191},"这种加密+签名的，不能 ",{"type":35,"tag":61,"props":3193,"children":3195},{"className":3194},[],[3196],{"type":41,"value":3197},"--verify",{"type":41,"value":3199}," 去验证，只能 ",{"type":35,"tag":61,"props":3201,"children":3203},{"className":3202},[],[3204],{"type":41,"value":2180},{"type":41,"value":3206}," 去解密，解完之后，会自动验证签名",{"type":35,"tag":107,"props":3208,"children":3209},{},[3210,3212,3218,3220,3226],{"type":41,"value":3211},"不能 ",{"type":35,"tag":61,"props":3213,"children":3215},{"className":3214},[],[3216],{"type":41,"value":3217}," --clearsign --encrypt",{"type":41,"value":3219}," 和 ",{"type":35,"tag":61,"props":3221,"children":3223},{"className":3222},[],[3224],{"type":41,"value":3225},"--decrypt --verify",{"type":41,"value":3227},"，这两种操作是 conflicting commands",{"type":35,"tag":107,"props":3229,"children":3230},{},[3231,3237],{"type":35,"tag":61,"props":3232,"children":3234},{"className":3233},[],[3235],{"type":41,"value":3236},"--detach-sign --encrypt",{"type":41,"value":3238}," 不会报错但其实只是做了个分离的签名出来，加密没生效",{"type":35,"tag":258,"props":3240,"children":3242},{"id":3241},"对称加密",[3243],{"type":41,"value":3241},{"type":35,"tag":43,"props":3245,"children":3246},{},[3247],{"type":41,"value":3248},"不用密钥对，而是临时现输入一个 passphrase 来做对称加密：",{"type":35,"tag":54,"props":3250,"children":3252},{"className":56,"code":3251,"language":58,"meta":9,"style":9},"gpg [--armor] --symmetric hello.txt\n",[3253],{"type":35,"tag":61,"props":3254,"children":3255},{"__ignoreMap":9},[3256],{"type":35,"tag":65,"props":3257,"children":3258},{"class":67,"line":68},[3259,3263],{"type":35,"tag":65,"props":3260,"children":3261},{"style":72},[3262],{"type":41,"value":146},{"type":35,"tag":65,"props":3264,"children":3265},{"style":810},[3266],{"type":41,"value":3267}," [--armor] --symmetric hello.txt\n",{"type":35,"tag":103,"props":3269,"children":3270},{},[3271,3302],{"type":35,"tag":107,"props":3272,"children":3273},{},[3274,3276],{"type":41,"value":3275},"passphrase 在加密的机器本地似乎会被缓存上，所以解密无需输口令\n",{"type":35,"tag":103,"props":3277,"children":3278},{},[3279,3292],{"type":35,"tag":107,"props":3280,"children":3281},{},[3282,3284,3290],{"type":41,"value":3283},"这个好像是 ",{"type":35,"tag":61,"props":3285,"children":3287},{"className":3286},[],[3288],{"type":41,"value":3289},"gpg-agent",{"type":41,"value":3291}," 提供的",{"type":35,"tag":107,"props":3293,"children":3294},{},[3295],{"type":35,"tag":249,"props":3296,"children":3300},{"href":3297,"rel":3298},"https://wiki.archlinux.org/title/GnuPG#gpg-agent",[3299],"nofollow",[3301],{"type":41,"value":3297},{"type":35,"tag":107,"props":3303,"children":3304},{},[3305,3307,3312],{"type":41,"value":3306},"换一台机器就需要在解密时交互式输入口令了（或者 ",{"type":35,"tag":61,"props":3308,"children":3310},{"className":3309},[],[3311],{"type":41,"value":447},{"type":41,"value":3313},"）。",{"type":35,"tag":43,"props":3315,"children":3316},{},[3317,3319,3325],{"type":41,"value":3318},"解对称加密还是一样的 ",{"type":35,"tag":61,"props":3320,"children":3322},{"className":3321},[],[3323],{"type":41,"value":3324},"gpg -d",{"type":41,"value":3326},"：",{"type":35,"tag":54,"props":3328,"children":3330},{"className":56,"code":3329,"language":58,"meta":9,"style":9},"gpg -o hello.decrypted.txt --decrypt hello.txt.gpg\n",[3331],{"type":35,"tag":61,"props":3332,"children":3333},{"__ignoreMap":9},[3334],{"type":35,"tag":65,"props":3335,"children":3336},{"class":67,"line":68},[3337,3341,3345,3350,3354],{"type":35,"tag":65,"props":3338,"children":3339},{"style":72},[3340],{"type":41,"value":146},{"type":35,"tag":65,"props":3342,"children":3343},{"style":149},[3344],{"type":41,"value":2050},{"type":35,"tag":65,"props":3346,"children":3347},{"style":78},[3348],{"type":41,"value":3349}," hello.decrypted.txt",{"type":35,"tag":65,"props":3351,"children":3352},{"style":149},[3353],{"type":41,"value":2219},{"type":35,"tag":65,"props":3355,"children":3356},{"style":78},[3357],{"type":41,"value":2726},{"type":35,"tag":103,"props":3359,"children":3360},{},[3361],{"type":35,"tag":107,"props":3362,"children":3363},{},[3364],{"type":41,"value":3365},"输入过一次密码之后，这个口令也会被记录下来，再次解密就不需要输入了",{"type":35,"tag":48,"props":3367,"children":3369},{"id":3368},"参考",[3370],{"type":41,"value":3368},{"type":35,"tag":103,"props":3372,"children":3373},{},[3374,3383],{"type":35,"tag":107,"props":3375,"children":3376},{},[3377],{"type":35,"tag":249,"props":3378,"children":3381},{"href":3379,"rel":3380},"https://www.ruanyifeng.com/blog/2013/07/gpg.html",[3299],[3382],{"type":41,"value":3379},{"type":35,"tag":107,"props":3384,"children":3385},{},[3386],{"type":35,"tag":249,"props":3387,"children":3390},{"href":3388,"rel":3389},"https://github.com/yifanbian/gpg-guide-zh",[3299],[3391],{"type":41,"value":3388},{"type":35,"tag":43,"props":3393,"children":3394},{},[3395],{"type":41,"value":3396},"Further reading:",{"type":35,"tag":103,"props":3398,"children":3399},{},[3400,3409],{"type":35,"tag":107,"props":3401,"children":3402},{},[3403],{"type":35,"tag":249,"props":3404,"children":3407},{"href":3405,"rel":3406},"https://www.gnupg.org/gph/en/manual.html",[3299],[3408],{"type":41,"value":3405},{"type":35,"tag":107,"props":3410,"children":3411},{},[3412],{"type":35,"tag":249,"props":3413,"children":3416},{"href":3414,"rel":3415},"https://wiki.archlinux.org/title/GnuPG",[3299],[3417],{"type":41,"value":3414},{"type":35,"tag":3419,"props":3420,"children":3421},"style",{},[3422],{"type":41,"value":3423},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}",{"title":9,"searchDepth":94,"depth":94,"links":3425},[3426,3427,3432,3440,3447],{"id":50,"depth":94,"text":50},{"id":128,"depth":94,"text":131,"children":3428},[3429,3430,3431],{"id":260,"depth":326,"text":260},{"id":289,"depth":326,"text":289},{"id":561,"depth":326,"text":561},{"id":662,"depth":94,"text":665,"children":3433},[3434,3435,3436,3437,3438,3439],{"id":668,"depth":326,"text":671},{"id":781,"depth":326,"text":781},{"id":1269,"depth":326,"text":1269},{"id":1418,"depth":326,"text":1421},{"id":254,"depth":326,"text":254},{"id":1719,"depth":326,"text":1119},{"id":1823,"depth":94,"text":1826,"children":3441},[3442,3443,3444,3445,3446],{"id":1829,"depth":326,"text":1829},{"id":2168,"depth":326,"text":2168},{"id":2526,"depth":326,"text":2526},{"id":3118,"depth":326,"text":3118},{"id":3241,"depth":326,"text":3241},{"id":3368,"depth":94,"text":3368},"blogs:blogs:utils:gpg-intro:index.md","blogs/utils/gpg-intro/index.md","blogs/utils/gpg-intro/index",[3452],{"title":3453,"_path":3454,"children":3455},"Blogs","/blogs",[3456,3463],{"title":3457,"_path":3458,"children":3459},"Frontend","/blogs/frontend",[3460],{"title":10,"_path":6,"children":3461,"publishedAt":12},[3462],{"title":10,"_path":6,"publishedAt":12},{"title":3464,"_path":3465,"children":3466},"Utils","/blogs/utils",[3467],{"title":22,"_path":20,"children":3468,"publishedAt":29},[3469],{"title":22,"_path":20,"publishedAt":29},1772069647438]