From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 80CB2158094 for ; Sun, 10 Jul 2022 16:08:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BF235E0D2E; Sun, 10 Jul 2022 16:08:39 +0000 (UTC) Received: from mail143c7.megamailservers.com (mail119c7-2520.megamailservers.com [69.49.98.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1752AE0D21 for ; Sun, 10 Jul 2022 16:08:38 +0000 (UTC) X-Authenticated-User: admin@sys-concept.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.com; s=mailtor; t=1657469317; bh=RUEw3dNdDsBZ1mXJb4kL8OLiQSAp0GM+0COBM2YSyKI=; h=Date:Subject:To:References:From:In-Reply-To:From; b=e0DEaurDF/9CnwV7KZNVsnqWDbP9nVhoCQk9d3OufvCVYY5QIRJSF9nqhiJlVdhjQ wxub+Lzt3IZ8uY7roMOlkuQnKQi9rlM3ScLd6BbJrVAW2S7ai1D6VqzgavGXdRqJ/m ZlctYQBszNvczuq2Ejn17HhuXgsj/drlxNu+w1+8= Feedback-ID:thelma@sys-conc X-VIP: 69.49.109.100 Received: from [10.0.0.109] 184.69.242.18":"52362 ([184.69.242.18]) (authenticated bits=0) by mail143c7.megamailservers.com (8.14.9/8.13.1) with ESMTP id 26AG8ZYn006908 for ; Sun, 10 Jul 2022 12:08:37 -0400 Message-ID: <92a4a1b4-2c36-1542-b18f-0db3545845be@sys-concept.com> Date: Sun, 10 Jul 2022 10:08:31 -0600 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [gentoo-user] GPG problem Content-Language: en-CA To: gentoo-user@lists.gentoo.org References: <20220710105618.5efc490a@op.pl> From: thelma@sys-concept.com In-Reply-To: <20220710105618.5efc490a@op.pl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CTCH-RefID: str=0001.0A742F1A.62CAF985.000B:SCFSTAT54230205,ss=1,re=-4.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: -4.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-VADE-SPAMSTATE: clean X-VADE-SPAMSCORE: 0 X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrudejuddgleelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffquffvqffrkfetpdfqfgfvpdfgpfggqdevjeenuceurghilhhouhhtmecufedtudenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpehthhgvlhhmrgesshihshdqtghonhgtvghpthdrtghomhenucggtffrrghtthgvrhhnpefghedtteeuudehveefgeeggeeutdfhuddtfeeutddugfefiedtvefgffeffefgudenucfkphepudekgedrieelrddvgedvrddukeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedukeegrdeiledrvdegvddrudekpdhhvghloheplgdutddrtddrtddruddtlegnpdhmrghilhhfrhhomhepthhhvghlmhgrsehshihsqdgtohhntggvphhtrdgtohhmpdhnsggprhgtphhtthhopedupdhrtghpthhtohepghgvnhhtohhoqdhushgvrheslhhishhtshdrghgvnhhtohhordhorhhg X-Origin-Country: CA X-Archives-Salt: 5b8216f2-a2c5-4c90-8c5f-7605e3c74f60 X-Archives-Hash: 2837f4c7cb55c8e3ae33a0f83f570e59 On 7/10/22 02:56, wkuz@op.pl wrote: > Hello! > Some time ago I have made a backup of my secret key and all the > subkeys, and then deleted by-hand the master secret key by > > rm ~/.gnupg/private-keys-v1.d/[keygrip].key > > The subkeys were moved to a yubikey. Everything was great. Now I wanted > to import my master key for a moment... and here we have a problem. > Right now what happens, after running > > gpg --import secret_key.asc > > is: > > 1) gpg complains: > > gpg: key D444252908A80B6D: "sxrmn" not changed > gpg: key D444252908A80B6D/D444252908A80B6D: error sending to > agent: Invalid argument > gpg: key D444252908A80B6D: secret key imported > gpg: Total number processed: 1 > gpg: unchanged: 1 > gpg: secret keys read: 1 > gpg: secret keys unchanged: 1 > > 2) gpg -K is aware of the master secret key, though it says it's not > there: > > sec# ed25519 2022-07-06 [SC] > 902404424B39514B6126A2F2D444252908A80B6D > uid [ absolutne ] sxrmn > ssb> cv25519 2022-07-06 [E] > ssb> ed25519 2022-07-06 [S] > > 3) seret subkeys get imported (now they are back on yubikey, but they > got imported OK) > > For reference, the exactly same file on FreeBSD gets imported with no > errors at all. "diff" tells, that key exported from FreeBSD is no > different from the one I try to import to Gentoo. Therefore I guess > it's more a local GPG version problem than problem with the key. > Strangely though I am trying to import the key generated on Gentoo, so > it seems GPG can't import it's own child. > > There are however some version differences between FreeBSD and Gentoo. > > FreeBSD: > $ gpg --version > gpg (gnuPG) 2.3.3 > libgcrypt 1.9.4 > Copyright (c) 2021 Free Software Foundation, Inc. > .... > > Gentoo: > $ gpg --version > gpg (GnuPG) 2.2.35 > libgcrypt 1.9.4-unknown > Copyright (C) 2022 g10 Code GmbH > ... > > So... any ideas why this happens and what can I do about it? > Did you make/or have a backup of your .gpg directory? Run: gpg --list-secret-keys --with-keygrip Does it show Keygrip =