Percona-Lab / pg_tde

MIT License
107 stars 19 forks source link

Also use the CommandID in tuple IVs #119

Closed dutow closed 7 months ago

dutow commented 7 months ago

Currently tupple iv calculatino is based only on the CTID, which means that when postgres reuses the same address, it also reuses the same IV. This makes our encryption theoretically weaker, in case of some unlikely but not impossible attack scenarios.

As an improvement this commit also adds the command id into the calculation. As the (ctid, cid) pair will be basically always unique, this solves the problem.

Fixes #112