gpg – matoken's blog https://matoken.org/blog Is there no plan B? Tue, 14 Jan 2025 10:08:22 +0000 ja hourly 1 https://wordpress.org/?v=7.0 https://matoken.org/blog/wp-content/uploads/2025/03/cropped-1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9-32x32.jpeg gpg – matoken's blog https://matoken.org/blog 32 32 ParrotOS gpg key更新 https://matoken.org/blog/2025/01/14/parrotos-gpg-key-update/ https://matoken.org/blog/2025/01/14/parrotos-gpg-key-update/#respond Tue, 14 Jan 2025 10:08:21 +0000 https://matoken.org/blog/?p=4368

ParrotOSでapt update時にエラーが出るようになりました.

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7A8286AF0E81EE4A
公開鍵を利用できないため、以下の署名は検証できませんでした: NO_PUBKEY 7A8286AF0E81EE4A

フルメッセージは以下の通り
$ sudo apt update
Get:1 https://deb.parrot.sh/parrot lory InRelease [29.8 kB]
Get:2 https://deb.parrot.sh/direct/parrot lory-security InRelease [29.4 kB]
Get:3 https://deb.parrot.sh/parrot lory-backports InRelease [29.7 kB]
Err:1 https://deb.parrot.sh/parrot lory InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7A8286AF0E81EE4A
Get:4 https://pkgs.tailscale.com/stable/ubuntu noble InRelease
Err:2 https://deb.parrot.sh/direct/parrot lory-security InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7A8286AF0E81EE4A
Err:3 https://deb.parrot.sh/parrot lory-backports InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7A8286AF0E81EE4A
Fetched 6578 B in 1s (5701 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://deb.parrot.sh/parrot lory InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7A8286AF0E81EE4A
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://deb.parrot.sh/direct/parrot lory-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7A8286AF0E81EE4A
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://deb.parrot.sh/parrot lory-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7A8286AF0E81EE4A
W: Failed to fetch https://deb.parrot.sh/parrot/dists/lory/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7A8286AF0E81EE4A
W: Failed to fetch https://deb.parrot.sh/direct/parrot/dists/lory-security/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7A8286AF0E81EE4A
W: Failed to fetch https://deb.parrot.sh/parrot/dists/lory-backports/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7A8286AF0E81EE4A
W: Some index files failed to download. They have been ignored, or old ones used instead.
日本語の場合
$ LC_ALL=ja_JP.UTF-8 sudo apt update
取得:1 https://pkgs.tailscale.com/stable/ubuntu noble InRelease
取得:2 https://deb.parrot.sh/parrot lory InRelease [29.8 kB]
取得:3 https://deb.parrot.sh/direct/parrot lory-security InRelease [29.4 kB]
取得:4 https://deb.parrot.sh/parrot lory-backports InRelease [29.7 kB]
エラー:2 https://deb.parrot.sh/parrot lory InRelease
  公開鍵を利用できないため、以下の署名は検証できませんでした: NO_PUBKEY 7A8286AF0E81EE4A
エラー:3 https://deb.parrot.sh/direct/parrot lory-security InRelease
  公開鍵を利用できないため、以下の署名は検証できませんでした: NO_PUBKEY 7A8286AF0E81EE4A
エラー:4 https://deb.parrot.sh/parrot lory-backports InRelease
  公開鍵を利用できないため、以下の署名は検証できませんでした: NO_PUBKEY 7A8286AF0E81EE4A
95.5 kB を 2秒 で取得しました (45.2 kB/s)
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています... 完了
状態情報を読み取っています... 完了
パッケージはすべて最新です。
W: 署名照合中にエラーが発生しました。リポジトリは更新されず、過去のインデックスファイルが使われます。GPG エラー: https://deb.parrot.sh/parrot lory InRe
lease: 公開鍵を利用できないため、以下の署名は検証できませんでした: NO_PUBKEY 7A8286AF0E81EE4A
W: 署名照合中にエラーが発生しました。リポジトリは更新されず、過去のインデックスファイルが使われます。GPG エラー: https://deb.parrot.sh/direct/parrot lo
ry-security InRelease: 公開鍵を利用できないため、以下の署名は検証できませんでした: NO_PUBKEY 7A8286AF0E81EE4A
W: 署名照合中にエラーが発生しました。リポジトリは更新されず、過去のインデックスファイルが使われます。GPG エラー: https://deb.parrot.sh/parrot lory-back
ports InRelease: 公開鍵を利用できないため、以下の署名は検証できませんでした: NO_PUBKEY 7A8286AF0E81EE4A
W: https://deb.parrot.sh/parrot/dists/lory/InRelease の取得に失敗しました  公開鍵を利用できないため、以下の署名は検証できませんでした: NO_PUBKEY 7A8286
AF0E81EE4A
W: https://deb.parrot.sh/direct/parrot/dists/lory-security/InRelease の取得に失敗しました  公開鍵を利用できないため、以下の署名は検証できませんでした:
NO_PUBKEY 7A8286AF0E81EE4A
W: https://deb.parrot.sh/parrot/dists/lory-backports/InRelease の取得に失敗しました  公開鍵を利用できないため、以下の署名は検証できませんでした: NO_PUB
KEY 7A8286AF0E81EE4A
W: いくつかのインデックスファイルのダウンロードに失敗しました。これらは無視されるか、古いものが代わりに使われます。

Parrotのblogに情報がありました.

しかしこのblogはJavaScriptが有効でないと本文が出てきません.電子署名された部分を以下に張っておきます.
この部分をファイルに保存して gpg –verify で検証しましょう.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

APT KEYRING ERROR

in case apt said that your gpg key is expired,
the solution is to download and install the
latest version of parrot-archive-keyring from our repository

https://deb.parrot.sh/parrot/pool/main/p/
parrot-archive-keyring/parrot-archive-keyring_2024.12_all.deb

once installed. the new key with id 7A8286AF0E81EE4A
will replace the expired key with id 823BF07CEB5C469B

once downloaded, the sha256 hash of the deb file should be
188c74cf726fad499ec416dc6b7dcd9718800aa7178290c10ef7040aea9b5272


this message is digitally signed with the team leader's personal gpg key
(f4c6b9a4), with the expired repository key and with the new one

-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T9aCSybiIq1HPfCAxL
/FUuYHi20VL7GUaA2PFEWZauPjdArPEOKw9IDJ8sZ+WSWnuyT7iu/jlEc2UAfBQZ
ykZ3qhzX/PoNPxRKQSJj374AE4207+39dIywJs/m1KvrYS/Grv9i5mtN0qS11R3u
+YKCyNGmO2MbT0jW9a50xR1Q
=ZggF
-----END PGP SIGNATURE-----

GPG keyは以下で確認できそうです.

というとで内容はParrotが署名したもので間違い無さそうです.
新しいkeyring packageをダウンロードしてhash確認,インストールしてapt updateがうまく行くようになりました.

$ wget2 -c -v https://deb.parrot.sh/parrot/pool/main/p/parrot-archive-keyring/parrot-archive-keyring_2024.12_all.deb (1)
$ sha256sum ./parrot-archive-keyring_2024.12_all.deb (2)
$ sudo apt install ./parrot-archive-keyring_2024.12_all.deb (3)
$ sudo apt update (4)
  1. keyring packageをダウンロード

  2. hash確認

  3. package導入

  4. apt updateがうまく行くのを確認

環境
$ dpkg-query -W parrot-archive-keyring gpg apt
apt     2.6.1
gpg     2.2.40-1.1
parrot-archive-keyring  2024.12
$ lsb_release -dr
No LSB modules are available.
Description:    Parrot Security 6.1 (lorikeet)
Release:        6.1
$ arch
x86_64
]]>
https://matoken.org/blog/2025/01/14/parrotos-gpg-key-update/feed/ 0
Dropbox を FUSE mount する dbxfs のアクセストークンを gpg で暗号化する https://matoken.org/blog/2018/10/05/fuse-mount-dropbox-encrypt-dbxfs-access-token-with-gpg/ https://matoken.org/blog/2018/10/05/fuse-mount-dropbox-encrypt-dbxfs-access-token-with-gpg/#comments Thu, 04 Oct 2018 20:45:06 +0000 http://matoken.org/blog/?p=2163

昨日dbxfs を試したのですが,アクセストークンのgpg での暗号化が出来ませんでした.

するとTwitterで情報をもらい,手動でDropbox app を作成してアクセストークンを入手する必要があるそうです.早速試してみたところうまく行きました!

Dropbox の App Console にアクセスして,Create app で新しいアプリを作成します.
情報を入力してアプリを生成.

44379184824 11e5e5faf4

生成したアプリで Generated access token を押してアクセストークンを生成

43285861640 b2abfddc92 m

dbxfs設定ファイルの場所確認
$ ~/.local/bin/dbxfs --print-default-config-file
/home/matoken/.config/dbxfs/config.json
生成したアクセストークンを gpg で暗号化してファイルに格納.
$ echo -n 'ItBeOfobAlbofEicHefvemsajKicsEjcekDomBaHee-shwijreijKimyatIfnebir' | gpg -r EAA13B982D937827 -e -o /home/matoken/.config/dbxfs/token.gpg
暗号化したアクセストークンファイルを設定ファイルで指定する
$ jq . /home/matoken/.config/dbxfs/config.json
{
  "access_token_command": [
	"gpg",
	"--decrypt",
	"/home/matoken/.config/dbxfs/token.gpg"
  ],
  "send_error_reports": true,
  "asked_send_error_reports": true
}
mount 時に gpg で decrypt されて mount される
$ ~/.local/bin/dbxfs ~/fuse/dbxfs
Running 'gpg --decrypt /home/matoken/.config/dbxfs/token.gpg' for access token
gpg: 4096-ビットRSA鍵, ID EAA13B982D937827, 日付2015-06-11に暗号化されました
	  "K.I.Matohara <matoken@gmail.com>"
$ mount|grep dbxfs
dbxfs on /home/matoken/fuse/dbxfs type fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000,default_permissions)
$ ls /home/matoken/fuse/dbxfs
   :
$ fusermount -u ~/fuse/dbxfs

うまくいきました :)

環境
$ grep ^Version: ~/.local/lib/python3.6/site-packages/dbxfs-1.0.4.dist-info/METADATA
Version: 1.0.4
$ dpkg-query -W gpg libfuse2 python3-pip
gpg     2.2.10-2
libfuse2:amd64  2.9.8-2
python3-pip     9.0.1-2.3
$ lsb_release -d
Description:    Debian GNU/Linux unstable (sid)
$ uname -m
x86_64
]]>
https://matoken.org/blog/2018/10/05/fuse-mount-dropbox-encrypt-dbxfs-access-token-with-gpg/feed/ 1