Questions tagged [pgcrypto]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
62 views

(PostgreSQL pgcrypto) How to generate blowfish hash without salt?

In PostgreSQL, using the pgcrypto module, I can generate a slow hash with blowfish (or any supported algorithm) like this: crypt('SomeTextHere', gen_salt('bf')); However, it auto-generates a salt (...
Starscream512's user avatar
0 votes
1 answer
184 views

How exactly are the password hashing functions in the pgcrypto module different from the regular MD5 and other algorithms?

This is not technically a database question, but about the innards of Postgres's pgcrypto extension.The documentation says The algorithms in crypt() differ from the usual MD5 or SHA1 hashing ...
ahron's user avatar
  • 793
0 votes
0 answers
1k views

Postgres AES encryption with pgcrypto encrypt for text of length >15 characters is not compatible with other platforms

I am in a need of joining 2 tables with stringed identifiers, the key in first table is encrypted with AES ECB and the one in the second table is a raw form of that field in first table. I am trying ...
Kush's user avatar
  • 101
0 votes
0 answers
135 views

Is it possible to add encryption capabilities to an already existing table?

I'm using pgcrypto module for PostgresSQL, and in the document it was indicated that this line: CREATE EXTENSION pgcrypto; should be executed before creating the table which stores encrypted data. ...
user3554898's user avatar
5 votes
1 answer
19k views

Do I need to execute "create extension pgcrypto" everytime?

I have used crypt() in one of my functions to hash user password. But what I observed the next day I started my pc that the same thing failed as cryptographic functions became unavailable upon restart....
Arjun_TECH's user avatar
3 votes
4 answers
19k views

How to install pgcrypto extension in postgres 10 on CentOS 7

I'm in the process of creating a postgres database for production in CentOS 7. So I already installed (yum install postgresql10-server postgresql10 after adding the repos of course) and configured ...
George's user avatar
  • 33
4 votes
2 answers
4k views

Encryption with pgcrypto

I am working on encrypting a column in a postgre table using pgcrypto. The postgre version is 9.5.1. I have figured out how to encrypt using pgp_sym_encrypt() and decrypt using pgp_sym_decrypt(). My ...
Jason's user avatar
  • 339
3 votes
2 answers
263 views

Detect if `pg_crypto` in Postgres was built with strong random feature enabled

The source code for pg_crypto module mentions an option to build without cryptographically-strong random generation. /* Generate random bits. pg_backend_random() will do here, we don't promis UUIDs ...
Basil Bourque's user avatar
3 votes
1 answer
6k views

Need to encrypt certain columns in a table but also be able to sort and search

We've got a web app that needs to store sensitive data entered by the user. Currently we're exploring PostgreSQL in AWS. I'm aware of pgcryto and that we can hash contents of certain columns (as not ...
strangetimes's user avatar
19 votes
1 answer
43k views

psql 9.5: gen_random_uuid() not working

SELECT gen_random_uuid() produces output ERROR: function gen_random_uuid() does not exist SQL state: 42883 Hint: No function matches the given name and argument types. You might need to add ...
d9k's user avatar
  • 293
5 votes
1 answer
2k views

In RDS digest function is undefined after creating pgcrypto extension

On an AWS RDS instance, we have run CREATE EXTENSION pgcrypto; The extension gets created. Both queries: SELECT digest('a', 'sha256') FROM table_name; SELECT public.digest('a', 'sha256') FROM ...
chris's user avatar
  • 201
0 votes
0 answers
210 views

Getting PAM-compatible password hashes from pgcrypto

I want to keep user records in Postgres database and faced one issue which block me. It is password encryption. For example, this is correcetly encrypted password 12345 via default Ubuntu crypt ...
Alex G.P.'s user avatar
  • 101
7 votes
3 answers
6k views

Adding unsigned 256 bit integers in PostgreSQL

I was wondering if there would be any way to do the following in PostgreSQL: UPDATE cryptotable SET work = work + 'some big hexadecimal number' where work is an unsigned 256 bit number. Right now my ...
Olivier Lalonde's user avatar
1 vote
2 answers
2k views

Error installing pgcrypto extension [closed]

I want to install the pgcrypto extension on my postgresql installation on Windows. I found that I just have to call CREATE EXTENSION pgcrypto; but I've got an error : Syntax error on « CREATE » LINE ...
Maxime L's user avatar
3 votes
1 answer
4k views

How do I install pgcrypto on Windows?

I would like to install pgcrypto in Windows. I have a file C:\Program\PostgreSQL\9.0\share\contrib\pgcrypto.sql but when I try to run it in psql I get an error: C:: Permission denied How do I solve ...
Jonas's user avatar
  • 32.8k
24 votes
3 answers
59k views

How do I install pgcrypto in PostgreSQL 8.4?

I'm using Ubuntu Server 10.10 and I have installed PostgreSQL 8.4 using apt-get install postgresql. I would like to use the built-in sha1() function, but it seems that I have to install pgcrypto first....
Jonas's user avatar
  • 32.8k