Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nEmse-0000zg-2S for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Feb 2022 06:43:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nEmsc-0007NA-N3 for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Feb 2022 06:43:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nEmsc-0007N1-As for pgsql-hackers@lists.postgresql.org; Tue, 01 Feb 2022 06:43:06 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nEmsV-00059z-4Q for pgsql-hackers@postgresql.org; Tue, 01 Feb 2022 06:43:05 +0000 Received: by mail-ej1-x630.google.com with SMTP id d10so50883741eje.10 for ; Mon, 31 Jan 2022 22:42:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:comments:mime-version :content-id:content-transfer-encoding:date:message-id; bh=MeBjKOn0S5ZlcmZ+9wRTfLflZv/lct6tfXtbShfFE3c=; b=y17SysfbxaxrYMYCI703soNDk1a71sfkG+1l+2r0SsmMDYoF1AQi4mKGboRwkFBw1y Mk0QaVGABBnS26kgkknRFQNJAEKweskP1a99VmNRk3UjHlKpzToCNksdz0ZAs/QJiRXP sKrKjWqruAp8zVG7LTJ+7qDJ6zKSGUTMO32Fw/DDw2KT+D2xnMPR06tlkcCkngQJZdQh CurbXv8yGjIXiriKql9W7DIF0UuiPGGXJac31u0IcHysDmoOiSzGA8hAfGERCJkUW9Xs rz5iiFEiItyQ2denSip08rE2naw9jSVMzEaNYfxuVjUztEuI8QuYvHvHp2pjZXyZNVix 4iEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :comments:mime-version:content-id:content-transfer-encoding:date :message-id; bh=MeBjKOn0S5ZlcmZ+9wRTfLflZv/lct6tfXtbShfFE3c=; b=DceKuiszmEgCMEbznocrk4UKAxcEk/+g4zsHNAbDJRgft133S+pYi2EhmyUMvSt3IP oC097exnTAUa/pdjRXJqWc4VLfU19t1swICyywWrJoTNQKyBe+yoXO7nNOfMXTOpUdbc s0KcFfpQ5fpQn9mOWlJK/q5egoJUTYesHUg50REj0nRVssoyIRq5YpFOyQoKQSg6n6Ks 7WYTp1zduCGb4Y3W2n8huMF6ccAaJofJXCV2wg1di2raCz9XDnRcnlA1S1ZjgJp7EKVs 2A0rEOWbyE1P6lnoN+scrolCkLYFJRQdpS4DGFNoUUbduq/HP1v8s/j8B13zd8ewgOGQ AbNg== X-Gm-Message-State: AOAM530DZQG2nzHpYvTK5fhoXPrGFlk4QNoxeomxc2GxblUNGXn9Tn1N 62PHpn2Gj8y0y19Dyu4mbSF/Vg== X-Google-Smtp-Source: ABdhPJy1N2u76WjTI9Jpt4yRmiQ6lBDiF8Rlznog0AYVzA4RnM4C0itJzdVdkMhbOFv/5zpSNaVL9g== X-Received: by 2002:a17:906:604d:: with SMTP id p13mr19343066ejj.639.1643697776566; Mon, 31 Jan 2022 22:42:56 -0800 (PST) Received: from antos (85-207-121-76.static.bluetone.cz. [85.207.121.76]) by smtp.gmail.com with ESMTPSA id a20sm18884124edb.12.2022.01.31.22.42.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 22:42:56 -0800 (PST) From: Antonin Houska To: Bruce Momjian cc: Stephen Frost , Sasasu , Robert Haas , Andres Freund , PostgreSQL-development Subject: Re: XTS cipher mode for cluster file encryption In-reply-to: References: <20211013222648.GA373@momjian.us> <20211015192248.GP20998@tamriel.snowman.net> <20211015212109.ugwjuhe4lzymnorg@alap3.anarazel.de> <4b73c57e-0941-9e66-ea7e-087793c4c927@sasa.su> <20211019185456.GV20998@tamriel.snowman.net> <20211023160336.GB22621@momjian.us> <20211025155814.GD20998@tamriel.snowman.net> <18009.1638171451@antos> Comments: In-reply-to Bruce Momjian message dated "Mon, 24 Jan 2022 17:57:18 -0500." X-Mailer: MH-E 8.6+git; nmh 1.7+dev; GNU Emacs 27.2.50 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1780.1643697906.1@antos> Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Feb 2022 07:45:06 +0100 Message-ID: <1781.1643697906@antos> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bruce Momjian wrote: > On Mon, Nov 29, 2021 at 08:37:31AM +0100, Antonin Houska wrote: > > The changes to buffile.c are not trivial, but we haven't really change= d the > > API, as long as you mean BufFileCreateTemp(), BufFileWrite(), BufFileR= ead(). > > = > > What our patch affects on the caller side is that BufFileOpenTransient= (), > > BufFileCloseTransient(), BufFileWriteTransient() and BufFileReadTransi= ent() > > replace OpenTransientFile(), CloseTransientFile(), write()/fwrite() an= d > > read()/fread() respectively in reorderbuffer.c and in pgstat.c. These = changes > > become a little bit less invasive in TDE 1.1 than they were in 1.0, se= e [1], > > see the diffs attached. > = > With pg_upgrade modified to preserve the relfilenode, tablespace oid, an= d > database oid, we are now closer to implementing cluster file encryption > using XTS. I think we have a few steps left: > = > 1. modify temporary file I/O to use a more centralized API > 2. modify the existing cluster file encryption patch to use XTS with a > IV that uses more than the LSN > 3. add XTS regression test code like CTR > 4. create WAL encryption code using CTR > = > If we can do #1 in PG 15 I think I can have #2 ready for PG 16 in July. > The feature wiki page is: > = > https://wiki.postgresql.org/wiki/Transparent_Data_Encryption > = > Do people want to advance this feature forward? I confirm that we (Cybertec) do and that we're ready to spend more time on= the community implementation. -- = Antonin Houska Web: https://www.cybertec-postgresql.com