From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id MFqoBKC2j2bMOAEAqHPOHw:P1 (envelope-from ) for ; Thu, 11 Jul 2024 10:40:32 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id MFqoBKC2j2bMOAEAqHPOHw (envelope-from ) for ; Thu, 11 Jul 2024 12:40:32 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=kTrTIvnL; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1720694432; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=XPE+Fz3PsUiUHSqRMO31VON0whxzl96hOE0U7NvKEIA=; b=srYRHpllT8GPMY/j/AymljNq3N4hJkqfTPAH5id+S7LXVHQBoMmPnwE+jp4ZqgrsF70fcE v+yzdfZl2elnB+EQLIRzA86mble1i6ILQ75cG1ow6uaaPaodDMbr4Of6HnUbOSNlSBt9Vj jTdRJqEDJLI2/UJwyjw5OmOBSytdPqcxInzCoBA5iMciDvYRClC8Og8vfbJ3MyuxQiifjU tbQdRpzWzh+3BesFK1Q8Oifq574XtWTcaTW8rZzH9fK0G8bQvEA6lfLjcEICtP/xSzi5P2 s6yChInHUkciaMnBFaSrAhcOBiaJILWhy7BhhkOGCyMR+xfVuhAI7YebWKDIBg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1720694432; a=rsa-sha256; cv=none; b=FrEX3/qSu8mqz6br/LnFl4Ck7T3qrvgJhg4LrkZk+IFiL7y902nRaSRCawDJDy3FN6Z4t+ J2GO0XlgCFH3zwwuJLMGXpKMLv62QGD0iHQp8B7I3XTCFRoO05InYRIVWr0RqjMU7F7M/F M7c6mXibzA/VYHOA1UWfD3F49dp000ns2svt5yRdJUevxpfrv9RvpWjgX4Ul8zroICIr4Z 4e3UcWYJmr43VYDrsZkoHzQ5XIzF6GQ1q/UfrwKgodn3SJ5bG+LnZbNsJbP89OcynXP/I4 AoMBK3sN2d+kq71CGJbJ94xZ5wFfi/JIzj2qRCaGAgkV4BdQ+9pwkqc3H+D/JQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=kTrTIvnL; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0274362FED for ; Thu, 11 Jul 2024 12:40:31 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sRrD3-00012v-UY; Thu, 11 Jul 2024 06:39:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sRrD2-00012l-4s for emacs-orgmode@gnu.org; Thu, 11 Jul 2024 06:39:32 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sRrCz-0001As-Th for emacs-orgmode@gnu.org; Thu, 11 Jul 2024 06:39:31 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id F37E7240027 for ; Thu, 11 Jul 2024 12:39:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1720694367; bh=aVMgliL3BdHHPs4efWO2aTECTjipu5N+dBkVHz+WG1g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=kTrTIvnLmBH04OxR973WVT/dzxs7sA4wPHBX0OZ3wHeUH0ZCrgTLg8+JYIq0ZvC16 Or6bqMqGpfLiDQStZjFWQWLeaBzAOkXeeRWq5Pg2E/iP0xc+2l1FBMbtHQaOhd966x 7dfnUbBge1eR0LUdZ9eFCbcCqvTz3PMWuHkzxJPzvly/w7X71zkUqSNdvDuVl3wBDd R8yXBl42TmMmOZqsQtaE8vIi2zpfOJGOltR5RX2F7sQYMAWL5Q7pWnb6pDd/yH8CD2 YSBAuWxu4nwRbawp12v+M3HBYzMm6Bs5oHc14uVqTLt5rhiGmn60BWKZiFz3vOIcpl YlGw/EnObnj7g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WKWSG0SQ6z9rxG; Thu, 11 Jul 2024 12:39:26 +0200 (CEST) From: Ihor Radchenko To: Daniel Clemente Cc: Eli Zaretskii , emacs-orgmode@gnu.org Subject: Re: org-encrypt-entries is slow (was: org-crypt leaking data when encryption password is not entered twice (was: Please document the caching and its user options)) In-Reply-To: References: <86ed921oxu.fsf@gnu.org> <874j9vllbp.fsf@localhost> <87o781t676.fsf@localhost> <874j9qs0wh.fsf@localhost> <87ed8mtyp0.fsf@localhost> <87msn7kffy.fsf@localhost> <87o77my9mp.fsf@localhost> <87y16j4nbe.fsf@localhost> <87o77ak70y.fsf@localhost> Date: Thu, 11 Jul 2024 10:40:56 +0000 Message-ID: <87wmls5hzb.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 0274362FED X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.63 X-Spam-Score: -9.63 X-TUID: n9j1HuyR7haf Daniel Clemente writes: > I see it's trying to decrypt things (therefore it asks for the > password). It shouldn't, since I didn't modify any encrypted section. > I said =E2=80=9Eit asked me for an encryption password=E2=80=9C because t= he GPG prompt > confusingly uses the word =E2=80=9Eencryption=E2=80=9C (=E2=80=9EPassphra= se for symmetric > encryption=E2=80=9C), though it's actually asking for a decryption passwo= rd. > ... > This is the text "abc" encrypted with password "abc". Use this file: > > * hi :no= crypt: > -----BEGIN PGP MESSAGE----- > > jA0ECQMCVpS/qSoed5f/0joBYoIRWdgt/+PVQCsZh9sg176SdnvP2Wc8tH/CV1Rk > l2MjAh3Rk19Q2aP2EffpZ5CFeGELTMXCnCYv > =3DFNtI > -----END PGP MESSAGE----- > > Open the file, add a space to the title and save it. The first time it > works (no questions asked) because there's no tag called :crypt: > Now change the :nocrypt: to :crypt: and save. It asks for the > password. Press C-g to cancel. > Change again the tag to :nocrypt:. Save. It asks for the encryption > password; it shouldn't. > Add a space to the title, save, it keeps asking for the encryption > password, though there's no :crypt: section. This should be fixed now. May you try yet again? >> > - Org spends around 20 seconds trying to save the file, in a loop, >> > reporting: (error "org-crypt: Encryption failed. Not saving the >> > buffer. Error: GPG error: \"Encrypt failed\", \"Canceled; Exit\"") >> >> This is curious, but I again have no clue. Maybe the new version of the >> branch works a bit better. >> > > Since this error can happen because of a problem in a different buffer > (not the current one), would it be good to mention the file name in > that error message? Yes. Done now on the branch. > I didn't see this particular problem again. But I see others, which > are hard to report and reproduce. For instance I had an encrypted > section under a :crypt: header (I see =E2=80=9EBEGIN PGP=E2=80=9C and hex= codes), I > save, and saving *UNencrypts* the header before saving, without > asking. It should never decrypt when saving, but it does. This happens > with the same small example I posted above (but using the :crypt: > tag). The other problem you reported had something to do with incorrectly cycling encryption state during save. I hope that fixing one also fixed another. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at