From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 583B76DE0C64 for ; Tue, 24 Oct 2017 23:52:21 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.037 X-Spam-Level: X-Spam-Status: No, score=-0.037 tagged_above=-999 required=5 tests=[AWL=-0.037] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4yXfTU5IMDCf for ; Tue, 24 Oct 2017 23:52:20 -0700 (PDT) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTP id 4930F6DE0FD2 for ; Tue, 24 Oct 2017 23:52:13 -0700 (PDT) Received: from fifthhorseman.net (unknown [38.109.115.130]) by che.mayfirst.org (Postfix) with ESMTPSA id 96283F9AA for ; Wed, 25 Oct 2017 02:52:12 -0400 (EDT) Received: by fifthhorseman.net (Postfix, from userid 1000) id B385320650; Wed, 25 Oct 2017 02:52:06 -0400 (EDT) From: Daniel Kahn Gillmor To: Notmuch Mail Subject: Stashed session keys Date: Wed, 25 Oct 2017 02:51:45 -0400 Message-Id: <20171025065203.24403-1-dkg@fifthhorseman.net> X-Mailer: git-send-email 2.14.2 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Oct 2017 06:52:21 -0000 Now that cleartext indexing is merged, let's add the ability to stash session keys! Background ========== Encrypted e-mail messages are "hybrid" encryption. The message body is encrypted with an ephemeral session key, and then that session key is itself encrypted to the user's public key. If an MUA retains (or obtains) a copy of the session key for a given message, it can access the cleartext of that message without needing any access to the user's private key material. This offers possible wins in efficiency, usability, convenience *and* security, as the series hopefully makes clear. Decryption Policies =================== At the end of the series, there are four sensible policies defined for message decryption and stashing of session keys. There are only two i expect to see any widespread regular use: "auto", and "true". But hopefully the reasons for including the other two policies ("false" and "nostash") are made clear by the series itself. I'll replicate here the table this series adds to notmuch-config(1), in describing the available values for index.try_decrypt: +------------------------+-------+------+---------+------+ | | false | auto | nostash | true | +========================+=======+======+=========+======+ | Index cleartext using | | X | X | X | | stashed session keys | | | | | +------------------------+-------+------+---------+------+ | Index cleartext | | | X | X | | using secret keys | | | | | +------------------------+-------+------+---------+------+ | Stash session keys | | | | X | +------------------------+-------+------+---------+------+ | Delete stashed session | X | | | | | keys on reindex | | | | | +------------------------+-------+------+---------+------+ Please let me know what you think! I'd love feedback and critique. Happy hacking, --dkg