| tags:mac categories:computing

gpgでファイルを検証

Kde NeonのISOファイルを回線が不安定なので配布元でないところから配布されているトレントを使ってダウンロードしました。 まぁ大丈夫でしょうが、Varification:検証を行いました。

GPG Suite

gpgでファイルを確認します。

マックにてまずは、GPP TOOLが必要です。サイト https://gpgtools.org/ からダウンロードもできますが、brewで一発です。

brew cask install gpg-suite

検証

ファイルを検証する場合,そのファイルと同時に署名ファイルも同時にダウンロードする必要があります。

今回は以下の二つ

  • neon-user-20200102-1116.iso
  • neon-user-20200102-1116.iso.sig

確認方法は gpg --verify file.sig file で行います。署名されたfileがfile.sigと同じディレクトリにある場合,はfileの指定を省略できます.

jin@guiness: $ gpg --verify neon-user-20200102-1116.iso.sig
gpg: assuming signed data in 'neon-user-20200102-1116.iso'
gpg: Signature made Thu Jan  2 18:32:07 2020 +07
gpg:                using RSA key 348C8651206633FD983A8FC4DEACEA00075E1D76
gpg: key DEACEA00075E1D76: new key but contains no user ID - skipped
gpg: Total number processed: 1
gpg:           w/o user IDs: 1
gpg: Can't check signature: No public key

相手の公開鍵が見当たらないのでダウンロードします。
RSA key 348C8651206633FD983A8FC4DEACEA00075E1D76 の鍵アドレスを使ってキーサーバーに問い合わせをします。

jin@guiness: $ gpg --keyserver keys.gnupg.net --recv-key 348C8651206633FD983A8FC4DEACEA00075E1D76
gpg: key DEACEA00075E1D76: public key "KDE neon ISO Signing Key <neon@kde.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1

そしてもう一度実行します。今回はエラーなく終了。

jin@guiness: $ gpg --verify neon-user-20200102-1116.iso.sig
gpg: assuming signed data in 'neon-user-20200102-1116.iso'
gpg: Signature made Thu Jan  2 18:32:07 2020 +07
gpg:                using RSA key 348C8651206633FD983A8FC4DEACEA00075E1D76
gpg: Good signature from "KDE neon ISO Signing Key <neon@kde.org>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 348C 8651 2066 33FD 983A  8FC4 DEAC EA00 075E 1D76

See Also

🏝 tipping

🌷 sat ⚡️ goozenlab@getalby.com
🌻 bitcoin : bc1qnjhnsxgqah050995dkdveav4y3t3d7uxyme4ud

If you do send a tip, Please email me so that I can say thank you.