Questions tagged [pgcrypto]

The pgcrypto module provides cryptographic functions for PostgreSQL.

The pgcrypto module provides cryptographic functions for PostgreSQL.

102 questions
15
votes
3 answers

Database column encryption postgres

How to encrypt column in postgres database using pgcrypto addon ? I am using postgres 9.3 and i need to encrypt one of my column , does postgres also support Aes encryption or by any mean i can achieve it ?
Nitin
  • 197
  • 1
  • 1
  • 9
9
votes
1 answer

PostgreSQL: Encrypt Column With pgcrypto

I need to encrypt some columns in a PostgreSQL 9.6 database. The data being encrypted is inherently sensitive; however, the data are not passwords or other authentication credentials. This data will need to be decrypted for statistical analysis and…
losthorse
  • 1,530
  • 1
  • 13
  • 33
9
votes
1 answer

Bind to pgcrypto from python

I'd like to call some pgcrypto functions from python. Namely px_crypt. I can't seem to figure out the right object files to link it seems. Here's my code: #include #include "postgres.h" #include "pgcrypto/px-crypt.h" static…
Oin
  • 6,951
  • 2
  • 31
  • 55
7
votes
1 answer

Postgres pgcrypto privliledges

I intsalled the pgcrypto extension as the superuser like this: CREATE EXTENSION pgcrypto; As the superuser, I tested it, and it works find: select gen_salt('bf'); gen_salt ------------------------------- …
Doo Dah
  • 3,979
  • 13
  • 55
  • 74
6
votes
1 answer

uuid v5 in Postgres

Does Postgres (or a Postgres extension) have a uuid v5 function (ie one that takes in a UUID name space and a string to produce a new UUID)? If not a native function, how would one write this function?
Alex Rothberg
  • 10,243
  • 13
  • 60
  • 120
6
votes
1 answer

Is it possible to variabilize the password in Hibernate @ColumnTransformer for pgcrypto?

I'm working on a postgresql base that use pgcrypto to encrypt some columns of the base. Java side, I use JPA to "map" my classes to my database. Currently, to encrypt and decrypt fields in java I use @ColumnTransformer. Example : @Column(name =…
Valentin Rochet
  • 137
  • 1
  • 11
4
votes
1 answer

how to grant execute to pgcrypto digest function to user

Using postgresql 9.6 I enabled pgcrypto using create extension pgcrypto using the postgres user. Now i want to grant execute rights to my other db user. Unfortunately i am not able to do it. Is this possible or do you have to be a superuser to use…
Dan
  • 2,209
  • 3
  • 23
  • 44
4
votes
1 answer

Encrypting in Java and Decrypting in Postgres (using pgcrypto module)

I am using following code to encrypt and decrypt in Java and it seems to working fine: import javax.crypto.Cipher; import javax.crypto.SecretKey; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; import…
Rakesh Goyal
  • 3,117
  • 8
  • 39
  • 69
4
votes
1 answer

pgp_sym_encrypt and decrypt an entire column in postgresql

I would like to encrypt an area_code column in my postgreSQL database with aes 256 encryption. Here is what happens.. I am able to encrypt it easily but I am not able to decrypt it. Here is the encryption query that works fine: update mytable t1 set…
Subha Yoganandan
  • 325
  • 1
  • 6
  • 13
4
votes
1 answer

How to encrypt in a pgcrypto compatible way in python

For a project I am working on I would like to use a pgcrypto compatible encryption in python. And specific the public key encryption part. The problem I have is that most (all) of the implementations make use of subprocess like approaches to fork…
Wouter
  • 371
  • 2
  • 12
3
votes
0 answers

Encrypting a Postgres column at the application level using AWS KMS

Problem I need to store encrypted data in a Postgres column. I know of pgcrypto, however I haven't used it before and don't have a lot of time to research and understand it (which I'd like to, given the data I will be storing in the…
Chris
  • 7,996
  • 11
  • 66
  • 98
3
votes
1 answer

Ruby on Rails + Postgres Migration removing enable_extension "pgcrypto" from schema.rb on every db:migrate

This line is being removed from my schema.rb file every time I migrate; enable_extension "pgcrypto" ... but I have no idea why! No where am I dropping the extension and there is a migration that adds it very early in the stack of migrations (months…
Jason Ellis
  • 625
  • 2
  • 8
  • 19
3
votes
1 answer

How do I use pgcrypto with knex inside a .select statement? (Postgres database)

I'm currently using knex to connect my node.js sever to a postgres database and I have started using pgcrypto to encrypt some of my data. I am a bit late to the game with encrypting my data, so I have several queries I'll need to update, and am…
Psyk
  • 33
  • 3
3
votes
1 answer

Function pgp_sym_encrypt(numeric, unknown) does not exist

I am using https://github.com/incuna/django-pgcrypto-fields for pgcrypto in my Django project. It's working fine with inserting, updating fields. But when I am trying something like MyTable.objects.filter(some_code=somecode).update( …
Manoj ahirwar
  • 1,062
  • 1
  • 10
  • 24
3
votes
0 answers

Is there any way to get the output of pgp_sym_encrypt of pgcrypto using Pycryptodome?

I have a pandas dataframe where some columns are already encrypted using pgp_sym_encrypt of postgres. The password used in that encryption is known to me and the encryption is done using aes256 algorithm. After some data manipulation, I have added…
MSS
  • 3,306
  • 1
  • 19
  • 50
1
2 3 4 5 6 7