Questions tagged [pgcrypto]

The pgcrypto module provides cryptographic functions for PostgreSQL.

The pgcrypto module provides cryptographic functions for PostgreSQL.

102 questions
1
vote
1 answer

Encrypt columns data in postgresql database with pgcrypto

I have a postgres database with some tables having columns containing some sensitive data, i used PGCRYPTO extension (pgp_pub_encrypt/pgp_pub_decrypt) to encrypt and gpg to generate public and private key pairs. I have two questions : Where…
gat kipper
  • 61
  • 2
  • 9
1
vote
1 answer

Encrypt entire column with pgcrypto

I need to encrypt some columns using AES-256 key, I have checked an official documentation of pgcrypto. But their examples makes me mad. For instance I have database looks like this. id first_name last_name is_active 0 …
qwew
  • 39
  • 5
1
vote
1 answer

pgcrypto: column encryption in PostgreSQL need suggestions

I have a table and I want to encrypt, few columns of it using pgcrypto functions of PostgreSQL. Lets say I want to use pgp_sym_encrypt( 'sample_name', 'someKey' , [options]). I need suggestions on how and where to store the 'someKey'. I understand…
sys
  • 330
  • 3
  • 15
1
vote
0 answers

PostgreSQL | pgcrypto | Index with Reverse encrypt | How to hide the key with help of PostgreSQL

I try to encrypt columns with pgcrypto using pgp_sym_encrypt/pgp_sym_decrypt in PostgreSQL. While creating indexes for certain columns, I use reverse encryption for speeding up the search of selection by exact match or using (i)like. I have a…
1
vote
0 answers

Django + PostrgreSQL performance issues

Hello there) I have a performance issue after using django-pgcrypto-fields: model is: class AssignedEmployee(models.Model): user_email = CharPGPSymmetricKeyField(max_length=50) project = models.ForeignKey('Project', on_delete=models.CASCADE,…
PlusSP
  • 11
  • 3
1
vote
2 answers

PostgreSql: How to query using encrypted columns

SCENARIO: I have created a table: Create table knights(age integer, nickname varchar(255)); Then I inserted a few records and encrypted the nickname column data using pgcrypto: insert into knights values(21,…
Syed Waqas
  • 2,576
  • 4
  • 29
  • 36
1
vote
1 answer

Could not load the 'pgcrypto' Active Record adapter

I need to store some confidential data in postgresql database. In order to do that, I used pgcrypto gem. I added this gem to Gemfile and I have changed adapter name in database.yml as pgcrypto. and executed the following command after bundle…
Gurunath
  • 341
  • 3
  • 17
1
vote
2 answers

Postgres 11.4 crypt extension issue in postgres

i am using pgcrypto extension for password encryption in my PostgreSQL db. i am using same key to encrypt all passwords. When i use same key in different passwords(different strings) it gives same output. Samples: db=# select…
SHARON XAVIER
  • 272
  • 5
  • 19
1
vote
0 answers

storing certain fields encrypted in postgres with pgcrypto

The postgres docs on "Encryption Options" say: Encryption For Specific Columns The pgcrypto module allows certain fields to be stored encrypted. This is useful if only some of the data is sensitive. The client supplies the decryption key and the…
jrochkind
  • 22,799
  • 12
  • 59
  • 74
1
vote
0 answers

How to encrypt data before inserting it in a bytea column

I'm trying to find a way to directly insert data through a bytea column directly. How should I do it? In our tables, we have several columns which need to be encrypted. We are currently using the PGCRYPTO module provided in PostgreSQL. However, we…
1
vote
1 answer

IndexError: tuple index out of range postgresql

I have been using the pgcrypto extension module's digest function to encode several values. I recently discovered that some of the URL values that I'm trying to encode contain '%,' which throw an IndexError: tuple index out of range. I have…
Life is complex
  • 15,374
  • 5
  • 29
  • 58
1
vote
1 answer

Should I be encrypting data in a CloudSQL database?

Google CloudSQL documentation states that the data is encrypted in transit and at rest. I'm using pgcrypto in a Django app to encrypt sensitive information. However I'm wondering if there's any point in doing this since it's already encrypted at…
1
vote
0 answers

encrypt in Postgresql

i have a problem with this: insert into usuario (usuario, clave) values ('alex', encrypt('11112222', 'password','3des')) The Result: ERROR: no exists the functión encrypt(unknown, unknown, unknown) SQL state: 42883 the extension pgcrypto is…
1
vote
1 answer

Automatic password hashing in PostgreSQL

I have been using PostgreSQL for the past few weeks and I have been loving it! I use crypt() and gen_salt() to generate the password hashes, by adding it to the insert query like so: crypt(:password, gen_salt('bf', 8)) Likewise for the select I use…
Loukas Avramidis
  • 519
  • 3
  • 10
  • 24
1
vote
1 answer

postgres 9.4 ,pgcrypto 0.4.1 , rails 4.2.0, ruby 2.2.0, quoting expected String, got Arel::Nodes::BindParam

problem when trying to create encrypted column. OS X 10.9.5 Created public/private keys with gnupg 2.0.22: gpg -a --export > myKey .key.pub gpg -a --export-secret-key myKey > .key.prv Any pointers on what might be going on here? I've got a…
user764389
  • 51
  • 1
  • 7