<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Malik Tafheem</title>
    <description>The latest articles on DEV Community by Malik Tafheem (@tafheeeem).</description>
    <link>https://dev.to/tafheeeem</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1120590%2F1c4d3e97-eac3-4324-9392-99e2641b10ee.jpg</url>
      <title>DEV Community: Malik Tafheem</title>
      <link>https://dev.to/tafheeeem</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tafheeeem"/>
    <language>en</language>
    <item>
      <title>Demystifying Transparent Data Encryption (TDE) in EDB Postgres</title>
      <dc:creator>Malik Tafheem</dc:creator>
      <pubDate>Sun, 23 Jul 2023 15:07:03 +0000</pubDate>
      <link>https://dev.to/tafheeeem/demystifying-transparent-data-encryption-tde-in-edb-postgres-54ln</link>
      <guid>https://dev.to/tafheeeem/demystifying-transparent-data-encryption-tde-in-edb-postgres-54ln</guid>
      <description>&lt;h2&gt;
  
  
  What is TDE?
&lt;/h2&gt;

&lt;p&gt;In the simplest terms, TDE is a security measure that encrypts the data stored in your database system. The beauty of TDE is that it's completely transparent to the user. That means you don't have to modify your application or update client drivers to use it. It's like having a silent guardian for your data, working behind the scenes to keep it safe.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does TDE Encrypt?
&lt;/h2&gt;

&lt;p&gt;TDE is quite thorough when it comes to encryption. It encrypts the files underlying tables, sequences, indexes, including TOAST tables and system catalogs, and including all forks. These files are known as data files. It also encrypts the write-ahead log (WAL) and various temporary files used during query processing and database system operation. &lt;br&gt;
But it's also important to know what TDE doesn't encrypt. Metadata internal to operating the database system that doesn't contain user data, such as the transaction status, isn't encrypted. The file names and file system structure in the data directory, data in foreign tables, the server diagnostics log, and configuration files also remain unencrypted. &lt;/p&gt;

&lt;h2&gt;
  
  
  How Does TDE Work?
&lt;/h2&gt;

&lt;p&gt;Now, let's get into the nitty-gritty. TDE encrypts the data files using AES-128-XTS. The WAL is encrypted using AES-128-CTR. Temporary files accessed by block are also encrypted using AES-128-XTS, and other temporary files are encrypted using AES-128-CBC. &lt;br&gt;
EDB Postgres Advanced Server and EDB Postgres Extended Server provide hooks to key management that's external to the database. These hooks allow for simple passphrase encrypt/decrypt or integration with enterprise key management solutions. This means you have flexibility in how you manage your encryption keys.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing a TDE Configuration
&lt;/h2&gt;

&lt;p&gt;If you're like me, you'll want to test out TDE before you fully commit. To run tests in single-user mode with TDE enabled, you can set the environment variable 'PG_TEST_USE_DATA_ENCRYPTION'. For example, you can use the command 'make check PG_TEST_USE_DATA_ENCRYPTION=1'. It's always good to test new features in a controlled environment before rolling them out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implications of TDE
&lt;/h2&gt;

&lt;p&gt;There are a few things to keep in mind when using TDE. Any WAL fetched from a server using TDE, including by streaming replication and archiving, is encrypted. A physical replica is necessarily encrypted (or not encrypted) in the same way and using the same keys as its primary server. If a server uses TDE, a base backup is automatically encrypted. &lt;/p&gt;

&lt;h2&gt;
  
  
  Performance Impact
&lt;/h2&gt;

&lt;p&gt;You might be wondering, "What's the catch?" Well, the performance impact of TDE is in line with the general overhead for AES encryption. But considering the added layer of security it provides, it's a trade-off many are willing to make.&lt;br&gt;
In conclusion, TDE is a powerful tool in your data security toolkit. It provides an additional layer of security by encrypting data stored in the database system, preventing unauthorized viewing of data in operating system files on the database server and on backup storage. &lt;/p&gt;

&lt;p&gt;To know more about TDE in EDB Postgres you can visit &lt;a href="https://www.enterprisedb.com/docs/tde/latest/regress_run/"&gt;EDB docs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;That's it for today, folks! Remember, in the world of data, security is paramount. Stay safe and keep exploring!&lt;/p&gt;

</description>
      <category>postgres</category>
    </item>
  </channel>
</rss>
