
{"id":7321,"date":"2025-03-05T13:54:46","date_gmt":"2025-03-05T13:54:46","guid":{"rendered":"https:\/\/test.opensource-db.in\/wp1\/?p=7321"},"modified":"2025-03-19T09:07:32","modified_gmt":"2025-03-19T09:07:32","slug":"enhancing-data-security-with-postgresqls-pgcrypto-extension","status":"publish","type":"post","link":"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/","title":{"rendered":"Enhancing Data Security with PostgreSQL&#8217;s pgcrypto Extension"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><br>In today&#8217;s digital landscape, data security is paramount. As organizations increasingly rely on databases to store sensitive information, the need for robust encryption and hashing mechanisms has never been greater. PostgreSQL, a powerful open-source RDBMS, offers an extension called <strong>pgcrypto<\/strong> that provides a suite of cryptographic functions. In this blog post, we will explore what pgcrypto is, its key features, and how to use it effectively to enhance your database security.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>pgcrypto<\/strong> extension was introduced in <strong>PostgreSQL 8.1<\/strong>, which was released in 2005. It enables developers to secure sensitive data within the database directly, ensuring that it is protected both at rest and in transit.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What is pgcrypto?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>pgcrypto<\/strong> is a popular PostgreSQL extension that provides cryptographic functions for data encryption, decryption, hashing, digital signatures, and random number generation. It allows developers to implement security measures directly within the database, ensuring that sensitive data is protected effectively.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Use Cases:<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When using <strong>pgcrypto<\/strong> in PostgreSQL, encryption and decryption operations are typically performed at the column level, not the entire table level. This means you can encrypt or decrypt individual column values without affecting the entire table or all columns.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Key Features of pgcrypto:<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"has-small-font-size\"><strong>Encryption\/Decryption<\/strong>: Supports both symmetric (same key for encryption and decryption) and asymmetric (public\/private keys) encryption.<\/li>\n\n\n\n<li><strong>Hashing<\/strong>: Provides functions for generating hash values (e.g., MD5, SHA256).<\/li>\n\n\n\n<li><strong>Random Data Generation<\/strong>: Can generate random numbers or random data.<\/li>\n\n\n\n<li><strong>Digital Signatures<\/strong>: Enables the creation and verification of digital signatures.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to Install and Use pgcrypto<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"font-size:27px\"><strong>Step 1: Install the pgcrypto Extension<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before using <strong>pgcrypto<\/strong>, you need to ensure it&#8217;s installed and enabled on your PostgreSQL instance. You can install <strong>pgcrypto<\/strong> using the following SQL command:<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><code>CREATE EXTENSION IF NOT EXISTS pgcrypto;<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Key Functions in pgcrypto:<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Symmetric Encryption and Decryption Functions<\/strong>:\n<ul class=\"wp-block-list\">\n<li>pgp_sym_encrypt(data, key): Encrypts the data using a symmetric key.<\/li>\n\n\n\n<li>pgp_sym_decrypt(data, key): Decrypts the data encrypted with a symmetric key.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Asymmetric Encryption and Decryption Functions<\/strong>:\n<ul class=\"wp-block-list\">\n<li>pgp_pub_encrypt(data, public_key): Encrypts data using a public key.<\/li>\n\n\n\n<li>pgp_pub_decrypt(data, private_key): Decrypts data using a private key.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Hashing Functions<\/strong>:\n<ul class=\"wp-block-list\">\n<li>digest(data, type): Computes a hash of the input data using the specified algorithm (e.g., SHA-256, MD5).<\/li>\n\n\n\n<li>hmac(data, key, type): Computes a keyed hash message authentication code (HMAC).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Password Hashing Functions<\/strong>:\n<ul class=\"wp-block-list\">\n<li>crypt(password, salt): Hashes a password using a salt, suitable for secure password storage.<\/li>\n\n\n\n<li>gen_salt(type): Generates a random salt for use with the crypt function.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 2: Using Encryption\/Decryption Functions<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s see how to use the encryption and decryption functions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.1 Symmetric Encryption<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can encrypt sensitive data, such as a <strong>credit card number<\/strong>, using symmetric encryption with a secret key.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Example of Inserting Encrypted Data:<\/strong><\/h4>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><code>CREATE TABLE Customer (<br>customer_id SERIAL PRIMARY KEY,<br>name VARCHAR(100),<br>email VARCHAR(100),<br>phone_number VARCHAR(15),<br>address VARCHAR(255),<br>credit_card_number bytea,<br>password VARCHAR(255)<br>);<\/code><\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><code>INSERT INTO Customer (name, email, phone_number, address, credit_card_number, password)<br>VALUES (<br>'Dhoni',<br>'dhoni.ms@example.com',<br>'123-456-7890',<br>'Ranchi, Bihar',<br>pgp_sym_encrypt('1234-5678-9876-5432', 'secret_key'), -- Encrypt using the secret key<br>'msdhoni07'<br>);<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is how the data would look after encrypting the &nbsp;the column:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:10px\"><code>SELECT * FROM customer;<br>customer_id \u2502 name  \u2502        email         \u2502 phone_number \u2502 address       \u2502 credit_card_number                   \u2502 password<br>\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500<code>\u2500<\/code>\u2500\u253c\u2500\u2500<code>\u2500<\/code>\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500<code>\u2500<\/code>\u2500\u2500\u2500<code>\u2500\u2500<\/code>\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500<code>\u2500\u2500<\/code>\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500<br>1           \u2502 Dhoni \u2502 dhoni.ms@example.com \u2502 123-456-7890 \u2502 Ranchi, Bihar \u2502 xc30d04070302bd0bb96fa909e16a68d24...\u2502 msdhoni07<br>(1 row<\/code>)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Example of Decrypting Data:<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">To decrypt the encrypted <strong>credit_card_number<\/strong>, use the following query:<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><code>SELECT<br>customer_id,<br>name,<br>email,<br>phone_number,<br>address,<br>pgp_sym_decrypt(credit_card_number, 'secret_key') AS decrypted_credit_card_number,<br>password<br>FROM Customer;<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:10px\"><code>SELECT<br>customer_id,<br>name,<br>email,<br>phone_number,<br>address,<br>pgp_sym_decrypt(credit_card_number, 'secret_key') AS decrypted_credit_card_number,<br>password<br>FROM Customer;<br>customer_id \u2502 name  \u2502        email         \u2502 phone_number \u2502 address       \u2502 decrypted_credit_card_number \u2502 password<br>\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500<br>1           \u2502 Dhoni \u2502 dhoni.ms@example.com \u2502 123-456-7890 \u2502 Ranchi, Bihar \u2502      1234-5678-9876-5432     \u2502 msdhoni07<br>(1 row)<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:10px\"><code>Time: 32.344 ms<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.2 Asymmetric Encryption<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Asymmetric encryption uses a pair of keys: a public key for encryption and a private key for decryption.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Generating a Key Pair<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">To use asymmetric encryption, you first need to generate a PGP key pair. The steps to generate a PGP key pair and use it with <strong>pgcrypto<\/strong> are outlined below.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>How to Generate a PGP Key Pair for pgcrypto<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Generate the PGP Key Pair<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To generate a PGP key pair, use relevant <strong>GPG<\/strong> (GNU Privacy Guard) commands (this step assumes you have <strong>GPG<\/strong> already installed on your system). You can use the following command and inputs(make sure you replace the \u2018Name-Real\u2019 and \u2018Name-Email\u2019 with appropriate values) to generate an RSA key pair:<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><code>gpg --batch --generate-key &lt;&lt;EOF<br>Key-Type: RSA<br>Key-Length: 2048<br>Subkey-Type: RSA<br>Subkey-Length: 2048<br>Name-Real: Your Name<br>Name-Email: your.email@example.com<br>Expire-Date: 0<br>%no-protection<br>EOF<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This will generate an RSA key pair with the following parameters:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Key-Type<\/strong>: RSA<\/li>\n\n\n\n<li><strong>Key-Length<\/strong>: 2048 bits<\/li>\n\n\n\n<li><strong>Subkey-Type<\/strong>: RSA<\/li>\n\n\n\n<li><strong>Subkey-Length<\/strong>: 2048 bits<\/li>\n\n\n\n<li><strong>Name-Real<\/strong>: Your full name<\/li>\n\n\n\n<li><strong>Name-Email<\/strong>: Your email address associated with the key<\/li>\n\n\n\n<li><strong>Expire-Date<\/strong>: Set to 0 (no expiration)<\/li>\n\n\n\n<li><strong>%no-protection<\/strong>: This means that the key will be created without a passphrase (no protection). Normally, a passphrase is used to protect your private key. This option disables that, making the key easier to use but less secure. It\u2019s not recommended for keys used in high-security environments.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Verify the Key Pair<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After generating the key pair, verify it by running the following command:<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><code>gpg --list-keys<br>gpg --list-secret-keys<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This will display the details of your PGP key pair.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: Export the Public and Private Keys<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You need to export both the public and private keys to use them in PostgreSQL.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Export the Public Key:<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">To export the public key, use the following command replacing your.email@example.com with the value entered for Name-Email in Step#1 above:<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><code>gpg --export -a your.email@example.com &gt; pgp_public.key<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Export the Private Key:<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">To export the private key, use the following command replacing your.email@example.com with the value entered for Name-Email in Step#1 above:<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><code>gpg --export-secret-key -a your.email@example.com &gt; pgp_private.key<\/code><br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While exporting the private key, the system would prompt you to create a Passphrase. Make sure you enter a value and store it in a safe location (with controlled\/restricted access) as you would need it for decrypting the data.<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><code>Please enter the passphrase to export the OpenPGP secret key:<br>\"Your Name &lt;<a href=\"mailto:your.email@example.com\">your.email@example.com<\/a>&gt;\"<br>2048-bit RSA key, ID D72085FEF21BF188,<br>created 2025-03-03.<br>Passphrase:<\/code>____________________<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 4: Import the Keys into PostgreSQL<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you have the keys, store them in PostgreSQL to use them with <strong>pgcrypto<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Create a Table to Store the Keys<\/strong>:<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><code>CREATE TABLE pgp_keys (<br>id SERIAL PRIMARY KEY,<br>key_name VARCHAR(50) UNIQUE NOT NULL,<br>pubkey TEXT NOT NULL,<br>privkey TEXT NOT NULL<br>);<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Insert the Keys into the Table:<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Use the following statement to insert the keys into the table. You could assign any desired name instead of&nbsp; &#8216;<code>your_key_name'<\/code>. The values for the next two columns should come from the <code>pgp_public.key<\/code> and <code>pgp_private.key<\/code> files created above:<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><code>INSERT INTO pgp_keys (key_name, pubkey, privkey)<br>VALUES (<br>'your_key_name',<br>'-----BEGIN PGP PUBLIC KEY BLOCK----- \u2026 -----END PGP PUBLIC KEY BLOCK-----',<br>'-----BEGIN PGP PRIVATE KEY BLOCK----- \u2026 -----END PGP PRIVATE KEY BLOCK-----'<br>);<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 5: Use the Keys for Encryption and Decryption in PostgreSQL<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now that the keys are in the database, you can use <strong>pgcrypto<\/strong> functions like <code>pgp_pub_encrypt<\/code> and <code>pgp_pub_decrypt <\/code>to encrypt and decrypt data. After encrypt the column<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example of Encrypting Data with the Public Key:<\/strong><\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><code>CREATE TABLE Customer (<br>customer_id SERIAL PRIMARY KEY,<br>name VARCHAR(100),<br>phone_number VARCHAR(15),<br>address VARCHAR(255),<br>email TEXT,<br>password BYTEA -- Store password or any other sensitive data<br>);<\/code><\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><code>INSERT INTO Customer (name, phone_number, address, email, password)<br>VALUES (<br>'Virat',<br>'987-654-3210',<br>'Delhi, India',<br>'virat.kohli@example.com',<br>pgp_pub_encrypt('Vratkohli18', dearmor((SELECT pubkey FROM pgp_keys WHERE key_name = 'your_key_name')))<br>);<\/code><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">After encrypt the column:<\/p>\n\n\n\n<div class=\"wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-2c90304e wp-block-group-is-layout-flex\">\n<p class=\"wp-block-paragraph\" style=\"font-size:10px\">SELECT  *  FROM customer;<br><code>customer_id \u2502 name  \u2502 phone_number \u2502 address      \u2502 encrypted_email         \u2502                      password                      &gt;<br>\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500<code>\u2500\u2500\u2500<\/code>\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500<code>\u2500\u2500\u2500<\/code>\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500<code>\u2500\u2500\u2500<\/code>\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500<code>\u2500\u2500\u2500<\/code>\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500<code>\u2500\u2500\u2500<\/code>\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500<\/code>&gt;<code><br>1           \u2502 Virat \u2502 987-654-3210 \u2502 Delhi, India \u2502 virat.kohli@example.com \u2502 \\xc1c04c03a3df036234e28011010800b7cdfa41ad3f13d8...&gt;<br>(1 row)<\/code><\/p>\n\n\n\n<div class=\"wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-2c90304e wp-block-group-is-layout-flex\">\n<p class=\"wp-block-paragraph\" style=\"font-size:10px\">Time: 0.733 ms<\/p>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example of Decrypting Data with the Private Key:<\/strong><\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><code>SELECT customer_id,<br>phone_number,<br>address,<br>email,<br>pgp_pub_decrypt(password, dearmor((SELECT privkey FROM pgp_keys WHERE key_name = 'your_key_name')), 'YourPassphrase') AS password<br>FROM customer;<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:11px\"><code>SELECT<br>customer_id,<br>name,<br>phone_number,<br>address,<br>encrypted_email,<br>pgp_pub_decrypt(password, dearmor((SELECT privkey FROM pgp_keys WHERE key_name = 'lokesh_key')), 'Postgres123@') AS password<br>FROM<br>customer;<br>customer_id \u2502 name \u2502 phone_number \u2502 address      \u2502 encrypted_email         \u2502 password<br>\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500<br>1           \u2502Virat \u2502 987-654-3210 \u2502 Delhi, India \u2502 virat.kohli@example.com \u2502 Vratkohli18<br>(1 row)<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the query, <strong>YourPassphrase<\/strong> is the passphrase used to decrypt the private key (privkey) stored in the pgp_keys table. This passphrase is required to access the private key for decryption purposes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By following these steps, you can leverage <strong>pgcrypto<\/strong> to encrypt, decrypt, and securely store sensitive data within PostgreSQL. Generating a <strong>PGP key pair<\/strong> and importing the keys into your database is an essential step for using asymmetric encryption with <strong>pgcrypto<\/strong>. This approach ensures that your sensitive data remains secure both at rest and during transmission.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the next blog, we will dive deeper into additional <strong>pgcrypto functions<\/strong>, including hashing and digital signatures, to further enhance the security of your PostgreSQL databases.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In today&#8217;s digital landscape, data security is paramount. As organizations increasingly rely on databases to store sensitive information, the need [&hellip;]<\/p>\n","protected":false},"author":20,"featured_media":7325,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1,23,42,89],"tags":[130,37,24,44,26,33],"class_list":["post-7321","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-others","category-postgresql-14","category-postgresql-15","category-postgresql-16","tag-encrypt-and-decrypt","tag-postgres","tag-postgres14","tag-postgres15","tag-postgresql","tag-security"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Enhancing Data Security with PostgreSQL&#039;s pgcrypto Extension - OpenSource DB<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Enhancing Data Security with PostgreSQL&#039;s pgcrypto Extension - OpenSource DB\" \/>\n<meta property=\"og:description\" content=\"In today&#8217;s digital landscape, data security is paramount. As organizations increasingly rely on databases to store sensitive information, the need [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/\" \/>\n<meta property=\"og:site_name\" content=\"OpenSource DB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-05T13:54:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-19T09:07:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"945\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Lokesh Mandyam\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@opensource_db\" \/>\n<meta name=\"twitter:site\" content=\"@opensource_db\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lokesh Mandyam\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/\"},\"author\":{\"name\":\"Lokesh Mandyam\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/df72407df12174ffefa34535b1120929\"},\"headline\":\"Enhancing Data Security with PostgreSQL&#8217;s pgcrypto Extension\",\"datePublished\":\"2025-03-05T13:54:46+00:00\",\"dateModified\":\"2025-03-19T09:07:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/\"},\"wordCount\":1083,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png\",\"keywords\":[\"encrypt and decrypt\",\"postgres\",\"postgres14\",\"postgres15\",\"postgresql\",\"security\"],\"articleSection\":[\"Others\",\"PostgreSQL 14\",\"PostgreSQL 15\",\"PostgreSQL 16\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/\",\"name\":\"Enhancing Data Security with PostgreSQL's pgcrypto Extension - OpenSource DB\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png\",\"datePublished\":\"2025-03-05T13:54:46+00:00\",\"dateModified\":\"2025-03-19T09:07:32+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/#primaryimage\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png\",\"contentUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png\",\"width\":1800,\"height\":945},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/test.opensource-db.in\/wp1\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Enhancing Data Security with PostgreSQL&#8217;s pgcrypto Extension\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#website\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/\",\"name\":\"OpenSource DB\",\"description\":\"Your Trusted OpenSource Databases partner\",\"publisher\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/test.opensource-db.in\/wp1\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\",\"name\":\"OPENSOURCE DB PRIVATE LIMITED\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png\",\"contentUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png\",\"width\":368,\"height\":120,\"caption\":\"OPENSOURCE DB PRIVATE LIMITED\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/\",\"https:\/\/x.com\/opensource_db\",\"https:\/\/www.youtube.com\/channel\/UCmTI5h\",\"https:\/\/www.linkedin.com\/company\/opensource-db\",\"https:\/\/www.instagram.com\/opensource_db\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/df72407df12174ffefa34535b1120929\",\"name\":\"Lokesh Mandyam\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ed40b2db95ad8d925a250fc4cff81508442f1b7187fb607bb790a3c801fb2072?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ed40b2db95ad8d925a250fc4cff81508442f1b7187fb607bb790a3c801fb2072?s=96&d=mm&r=g\",\"caption\":\"Lokesh Mandyam\"},\"url\":\"https:\/\/test.opensource-db.in\/wp1\/author\/lokesh\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Enhancing Data Security with PostgreSQL's pgcrypto Extension - OpenSource DB","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Enhancing Data Security with PostgreSQL's pgcrypto Extension - OpenSource DB","og_description":"In today&#8217;s digital landscape, data security is paramount. As organizations increasingly rely on databases to store sensitive information, the need [&hellip;]","og_url":"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/","og_site_name":"OpenSource DB","article_publisher":"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/","article_published_time":"2025-03-05T13:54:46+00:00","article_modified_time":"2025-03-19T09:07:32+00:00","og_image":[{"width":1800,"height":945,"url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png","type":"image\/png"}],"author":"Lokesh Mandyam","twitter_card":"summary_large_image","twitter_creator":"@opensource_db","twitter_site":"@opensource_db","twitter_misc":{"Written by":"Lokesh Mandyam","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/#article","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/"},"author":{"name":"Lokesh Mandyam","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/df72407df12174ffefa34535b1120929"},"headline":"Enhancing Data Security with PostgreSQL&#8217;s pgcrypto Extension","datePublished":"2025-03-05T13:54:46+00:00","dateModified":"2025-03-19T09:07:32+00:00","mainEntityOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/"},"wordCount":1083,"commentCount":0,"publisher":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#organization"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png","keywords":["encrypt and decrypt","postgres","postgres14","postgres15","postgresql","security"],"articleSection":["Others","PostgreSQL 14","PostgreSQL 15","PostgreSQL 16"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/","url":"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/","name":"Enhancing Data Security with PostgreSQL's pgcrypto Extension - OpenSource DB","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#website"},"primaryImageOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/#primaryimage"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png","datePublished":"2025-03-05T13:54:46+00:00","dateModified":"2025-03-19T09:07:32+00:00","breadcrumb":{"@id":"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/#primaryimage","url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png","contentUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png","width":1800,"height":945},{"@type":"BreadcrumbList","@id":"https:\/\/test.opensource-db.in\/wp1\/enhancing-data-security-with-postgresqls-pgcrypto-extension\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/test.opensource-db.in\/wp1\/"},{"@type":"ListItem","position":2,"name":"Enhancing Data Security with PostgreSQL&#8217;s pgcrypto Extension"}]},{"@type":"WebSite","@id":"https:\/\/test.opensource-db.in\/wp1\/#website","url":"https:\/\/test.opensource-db.in\/wp1\/","name":"OpenSource DB","description":"Your Trusted OpenSource Databases partner","publisher":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/test.opensource-db.in\/wp1\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/test.opensource-db.in\/wp1\/#organization","name":"OPENSOURCE DB PRIVATE LIMITED","url":"https:\/\/test.opensource-db.in\/wp1\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/","url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png","contentUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png","width":368,"height":120,"caption":"OPENSOURCE DB PRIVATE LIMITED"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/","https:\/\/x.com\/opensource_db","https:\/\/www.youtube.com\/channel\/UCmTI5h","https:\/\/www.linkedin.com\/company\/opensource-db","https:\/\/www.instagram.com\/opensource_db\/"]},{"@type":"Person","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/df72407df12174ffefa34535b1120929","name":"Lokesh Mandyam","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ed40b2db95ad8d925a250fc4cff81508442f1b7187fb607bb790a3c801fb2072?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ed40b2db95ad8d925a250fc4cff81508442f1b7187fb607bb790a3c801fb2072?s=96&d=mm&r=g","caption":"Lokesh Mandyam"},"url":"https:\/\/test.opensource-db.in\/wp1\/author\/lokesh\/"}]}},"rttpg_featured_image_url":{"full":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png",1800,945,false],"landscape":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png",1800,945,false],"portraits":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png",1800,945,false],"thumbnail":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension-150x150.png",150,150,true],"medium":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension-300x158.png",300,158,true],"large":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension-1024x538.png",1024,538,true],"1536x1536":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension-1536x806.png",1536,806,true],"2048x2048":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png",1800,945,false],"ultp_layout_landscape_large":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png",1200,630,false],"ultp_layout_landscape":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png",870,457,false],"ultp_layout_portrait":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png",600,315,false],"ultp_layout_square":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/03\/Enhancing-Data-Security-with-PostgreSQLs-pgcrypto-Extension.png",600,315,false]},"rttpg_author":{"display_name":"Lokesh Mandyam","author_link":"https:\/\/test.opensource-db.in\/wp1\/author\/lokesh\/"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/business\/others\/\" rel=\"category tag\">Others<\/a> <a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-14\/\" rel=\"category tag\">PostgreSQL 14<\/a> <a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-15\/\" rel=\"category tag\">PostgreSQL 15<\/a> <a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-16\/\" rel=\"category tag\">PostgreSQL 16<\/a>","rttpg_excerpt":"In today&#8217;s digital landscape, data security is paramount. As organizations increasingly rely on databases to store sensitive information, the need [&hellip;]","_links":{"self":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/7321","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/comments?post=7321"}],"version-history":[{"count":5,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/7321\/revisions"}],"predecessor-version":[{"id":7449,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/7321\/revisions\/7449"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/media\/7325"}],"wp:attachment":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/media?parent=7321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/categories?post=7321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/tags?post=7321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}