Pg 9.1.3 pg_crypto question

From: Aaron Burnett <aburnett(at)bzzagent(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Pg 9.1.3 pg_crypto question
Date: 2012-04-10 20:02:27
Message-ID: CBA9EDF3.14E23%aburnett@bzzagent.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi,

Finally upgrading from 8.2.5 to 9.1.3 (got the latest release as of
3/12/2012)

OS: Ubuntu 11.10

The only issue I am encountering is in the pg_crypto/decrypt_iv/decode
No errors in the log, but here's what I am seeing on both 8.2.5 and 9.1.3,
I am hoping someone can help me out here:

8.2.5#
8.2.5=# select encode(encrypt_iv(text2bytea('Hello There'),
decode('bcRJvbqeWMPDXMtIP8pPOQ==', 'base64'), '0000000000000000',
'aes-cbc'), 'base64');
encode
--------------------------
rkMRWpnnbjaFoHyLmCD/bg==
(1 row)

8.2.5=# select decrypt_iv(decode('rkMRWpnnbjaFoHyLmCD/bg==', 'base64'),
decode('bcRJvbqeWMPDXMtIP8pPOQ==', 'base64'), '0000000000000000',
'aes-cbc');
decrypt_iv
-------------
Hello There
(1 row)

So, the 8.2.5 is working as it always has.

9.1.3 is just not decrypting nor throwing errors.

9.1.3#
9.1.3# select encode(encrypt_iv(text2bytea('Hello There'),
decode('bcRJvbqeWMPDXMtIP8pPOQ==', 'base64'), '0000000000000000',
'aes-cbc'), 'base64');
encode
--------------------------
rkMRWpnnbjaFoHyLmCD/bg==
(1 row)

9.1.3# select decrypt_iv(decode('rkMRWpnnbjaFoHyLmCD/bg==', 'base64'),
decode('bcRJvbqeWMPDXMtIP8pPOQ==', 'base64'), '0000000000000000',
'aes-cbc');
decrypt_iv
--------------------------
\x48656c6c6f205468657265
(1 row)

Thanking you in advance,

Aaron

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kenneth Tilton 2012-04-10 20:07:39 efficient trigger function selection?
Previous Message John R Pierce 2012-04-10 18:53:54 Re: measure time intervals