Robert Haas <robertmh...@gmail.com> wrote: > On Fri, Oct 4, 2019 at 5:49 PM Bruce Momjian <br...@momjian.us> wrote: > > We spend a lot of time figuring out exactly how to safely encrypt WAL, > > heap, index, and pgsql_tmp files. The idea of doing this for another > > 20 types of files --- to find a safe nonce, to be sure a file rewrite > > doesn't reuse the nonce, figuring the API, crash recovery, forensics, > > tool interface --- is something I would like to avoid. I want to avoid > > it not because I don't like work, but because I am afraid the code > > impact and fragility will doom the feature. > > I'm concerned about that, too, but there's no getting around the fact > that there are a bunch of types of files and that they do all need to > be dealt with. If we have a good scheme for doing that, hopefully > extending it to additional types of files is not that bad, which would > then spare us the trouble of arguing about each one individually, and > also be more secure. > > As I also said to Stephen, the people who are discussing this here > should *really really really* be looking at the Cybertec patch instead > of trying to invent everything from scratch -
Maybe it's enough to check the README.encryption file that [1] contains. Or should I publish this (in shorter form) on the wiki [2] ? > In fact, I can think of a couple pretty clear examples, like the stats > files, which clearly contain user data. Specifically this part was removed because I expected that [3] will be committed earlier than the encryption. This expectation still seems to be valid. The thread on encryption was very alive when I was working on the last version of our patch, so it was hard to participate in the discussion. I tried to catch up later, and I think I could understand most of the problems. It became clear that it's better to collaborate then to incorporate the new ideas into [1]. I proposed to Masahiko Sawada that we're ready to collaborate on coding and he agreed. However the design doesn't seem to be stable enough at the moment for coding to make sense. As for the design, I spent some time thinking about it, especially on the per-table/tablespace keys (recovery issues etc.), but haven't invented anything new. If there's anything useful I can do about the feature, I'll be glad to help. [1] https://commitfest.postgresql.org/25/2104/ [2] https://wiki.postgresql.org/wiki/Transparent_Data_Encryption [3] https://commitfest.postgresql.org/25/1708/ -- Antonin Houska Web: https://www.cybertec-postgresql.com