Re: [GENERAL] pgcrypto encrypt

2017-09-19 Thread Stephen Cook
On 2017-09-19 15:42, Jeff Janes wrote: > On Tue, Sep 19, 2017 at 12:20 PM, Bruce Momjian > wrote: > > On Wed, Sep  6, 2017 at 04:19:52PM -0400, Stephen Cook wrote: > > Hello! > > > > Is there a way to decrypt data encrypted with the pgcrypto "encrypt" >

Re: [GENERAL] pgcrypto encrypt

2017-09-19 Thread Bruce Momjian
On Tue, Sep 19, 2017 at 12:42:40PM -0700, Jeff Janes wrote: > On Tue, Sep 19, 2017 at 12:20 PM, Bruce Momjian wrote: > > On Wed, Sep  6, 2017 at 04:19:52PM -0400, Stephen Cook wrote: > > Hello! > > > > Is there a way to decrypt data encrypted with the pgcrypto "encrypt" > > fu

Re: [GENERAL] pgcrypto encrypt

2017-09-19 Thread Jeff Janes
On Tue, Sep 19, 2017 at 12:20 PM, Bruce Momjian wrote: > On Wed, Sep 6, 2017 at 04:19:52PM -0400, Stephen Cook wrote: > > Hello! > > > > Is there a way to decrypt data encrypted with the pgcrypto "encrypt" > > function, outside the database? Assuming that I know the key etc... > > Yes, I think s

Re: [GENERAL] pgcrypto encrypt

2017-09-19 Thread Bruce Momjian
On Wed, Sep 6, 2017 at 04:19:52PM -0400, Stephen Cook wrote: > Hello! > > Is there a way to decrypt data encrypted with the pgcrypto "encrypt" > function, outside the database? Assuming that I know the key etc... Yes, I think so. pgcrypto uses openssl and gpg internally, so using those tools sh

[GENERAL] pgcrypto encrypt

2017-09-06 Thread Stephen Cook
Hello! Is there a way to decrypt data encrypted with the pgcrypto "encrypt" function, outside the database? Assuming that I know the key etc... Thanks! -- Stephen -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql

Re: [GENERAL] pgcrypto

2015-09-23 Thread Jeff Janes
On Wed, Sep 23, 2015 at 8:46 AM, Ramesh T wrote: > Hi, > i created extension pgcrypto on public with postgres user.But > while trying to use from my own schma suppose qa. > > when i run digest in function in my qa > > CREATE OR REPLACE FUNCTION sha1(bytea) returns text AS $$ > SEL

[GENERAL] pgcrypto

2015-09-23 Thread Ramesh T
Hi, i created extension pgcrypto on public with postgres user.But while trying to use from my own schma suppose qa. when i run digest in function in my qa CREATE OR REPLACE FUNCTION sha1(bytea) returns text AS $$ SELECT encode(digest($1, 'sha1'), 'hex') $$ LANGUAGE SQL STRICT

[GENERAL] pgcrypto pgp_pub_decrypt() fails with secret key password

2010-09-12 Thread Eric Lukather
Hi, I have pgcrypto working fine with gpg keys that do *not* have a passphrase. But, if I try the exact same gpg -a --export commands and application code with gpg keys that are generated *with* a passphrase, then I get the following pgp_pub_decrypt() error within psql: \set pubkey `sed

Re: [GENERAL] pgcrypto in separate schema

2010-06-15 Thread Magnus Hagander
On Tue, Jun 15, 2010 at 19:02, Brad Nicholson wrote: > I want to put the functions from pgcrypto into a separate schema, but > pgcrypto.sql is explicitly setting the search path to public.  Is there > a reason it does this that I should be aware of? Is it fine to change > that and install the func

[GENERAL] pgcrypto in separate schema

2010-06-15 Thread Brad Nicholson
I want to put the functions from pgcrypto into a separate schema, but pgcrypto.sql is explicitly setting the search path to public. Is there a reason it does this that I should be aware of? Is it fine to change that and install the functions in a separate schema? -- Brad Nicholson 416-673-4106 D

[GENERAL] pgcrypto contrib

2008-11-13 Thread Robert Fitzpatrick
I am trying to develop a trigger that will post a new account into a table in another db sing dblink that is part of the egroupware web app that uses tripledes as the algorithm. I can't seem to find a combination for gen_salt that produces the correct crypt password, however, my knowledge in this a

Re: [GENERAL] pgcrypto and dblink

2008-04-14 Thread Robert Treat
On Thursday 10 April 2008 16:49, Roberts, Jon wrote: > > > I am moving from Windows to Solaris and I need pgcrypto and dblink. > > > Where are these? I don't see anything in the configure that > > suggests > > > it > > > > > is even an option. > > > > They're not handled by 'configure'. They ar

Re: [GENERAL] pgcrypto and dblink

2008-04-10 Thread Chris Browne
[EMAIL PROTECTED] ("Roberts, Jon") writes: > I am moving from Windows to Solaris and I need pgcrypto and dblink. > Where are these? I don't see anything in the configure that suggests it > is even an option. They are part of the set of "contrib" functions. You head to directory "contrib", and, i

Re: [GENERAL] pgcrypto and dblink

2008-04-10 Thread Roberts, Jon
> > I am moving from Windows to Solaris and I need pgcrypto and dblink. > > Where are these? I don't see anything in the configure that suggests > it > > is even an option. > > They're not handled by 'configure'. They are in the 'contrib' > directory in the source tree, and you install them by

Re: [GENERAL] pgcrypto and dblink

2008-04-10 Thread Douglas McNaught
On Thu, Apr 10, 2008 at 3:46 PM, Roberts, Jon <[EMAIL PROTECTED]> wrote: > I am moving from Windows to Solaris and I need pgcrypto and dblink. > Where are these? I don't see anything in the configure that suggests it > is even an option. They're not handled by 'configure'. They are in the 'con

Re: [GENERAL] pgcrypto and dblink

2008-04-10 Thread Rodrigo Gonzalez
Roberts, Jon escribió: I am moving from Windows to Solaris and I need pgcrypto and dblink. Where are these? I don't see anything in the configure that suggests it is even an option. Jon They are contribs, you have to install them after pgsql smime.p7s Description: S/MIME Cryptographic

[GENERAL] pgcrypto and dblink

2008-04-10 Thread Roberts, Jon
I am moving from Windows to Solaris and I need pgcrypto and dblink. Where are these? I don't see anything in the configure that suggests it is even an option. Jon -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.o

Re: [GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-12-05 Thread Marko Kreen
On 11/29/07, Stefan Niantschur <[EMAIL PROTECTED]> wrote: > SELECT > pgp_pub_decrypt(dearmor(armor(pgp_pub_encrypt(armor(pgp_sym_encrypt('geheim'::text,'test'::text)),dearmor((SELECT > ens_pubkey FROM ens_user WHERE ens_userid = > 10112)::text,dearmor((SELECT ens_privkey FROM ens_user WHERE > e

Re: [GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-12-03 Thread Stefan Niantschur
Am Montag, 3. Dezember 2007 schrieben Sie: > On 12/3/07, Stefan Niantschur <[EMAIL PROTECTED]> wrote: > > I finally made it. I created a brand-new key, reworked the query and > > voila. > > > > It seems that the GnuPG key has to be created with > > paramter --cipher-algo=blowfish before it can be u

Re: [GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-12-03 Thread Marko Kreen
On 12/3/07, Stefan Niantschur <[EMAIL PROTECTED]> wrote: > I finally made it. I created a brand-new key, reworked the query and voila. > > It seems that the GnuPG key has to be created with > paramter --cipher-algo=blowfish before it can be used together with pgcrypto. > The generated key with the

Re: [GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-12-03 Thread Stefan Niantschur
Am Montag, 3. Dezember 2007 schrieb Marko Kreen: Hi Marko, I finally made it. I created a brand-new key, reworked the query and voila. It seems that the GnuPG key has to be created with paramter --cipher-algo=blowfish before it can be used together with pgcrypto. The generated key with the def

Re: [GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-12-03 Thread Marko Kreen
On 12/3/07, Stefan Niantschur <[EMAIL PROTECTED]> wrote: > > Or at least send key parameters (gpg --list-keys output). > > pub 1024D/0476AD06 2007-11-27 [verfällt: 2008-11-26] > uid Test User (Probebenutzer) <[EMAIL PROTECTED]> > sub 2048g/879D6C41 2007-11-27 [verfällt: 2008-11-26] Elgamal 2048 wo

Re: [GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-12-03 Thread Stefan Niantschur
Am Fri, 30 Nov 2007 12:06:37 +0200 schrieb "Marko Kreen" <[EMAIL PROTECTED]>: Hi Marko, first of all, thank you for your help. Please find my answers below: > On 11/29/07, Stefan Niantschur <[EMAIL PROTECTED]> wrote: > > I have a table with userids and public keys. I want to write a > > functio

Re: [GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-11-30 Thread Marko Kreen
On 11/29/07, Stefan Niantschur <[EMAIL PROTECTED]> wrote: > I have a table with userids and public keys. I want to write a function > which does a select and returns the result pgp encrypted. > > However, I have some problems: Could you send the keys you have problems with? If actual keys then of

[GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-11-29 Thread Stefan Niantschur
Hi, I have a table with userids and public keys. I want to write a function which does a select and returns the result pgp encrypted. However, I have some problems: SELECT encode(decode((SELECT ens_pubkey FROM ens_user)::text,'escape'),'escape'::text)::text; -> returns the public key, => ok SELE

[GENERAL] pgcrypto digest_exists replacement?

2007-10-02 Thread Nasby Jim
I see that digest_exists is now gone, but I haven't been able to find anything in the lists about why... I was actually going to make use of that; is there anything that replaces it? -- Decibel! [EMAIL PROTECTED] (512) 569-9461 ---(end of broadcast)-

Re: [GENERAL] pgcrypto: is an IV needed with pgp_sym_encrypt()?

2007-09-18 Thread Bill Moseley
On Tue, Sep 18, 2007 at 11:26:17AM +0300, Marko Kreen wrote: > Few bytes being same is normal. Those are PGP packet header, > telling "this is symmetrically encrypted session key packet, > with length X" plus some more details. I see. So, you are saying no need to generate my own IV to prepend t

Re: [GENERAL] pgcrypto: is an IV needed with pgp_sym_encrypt()?

2007-09-18 Thread Marko Kreen
On 9/18/07, Bill Moseley <[EMAIL PROTECTED]> wrote: > I'm just starting with pgcrypto, and I'm curious if it's > needed/recommended to use an initialization vector/value (IV) with > the pgp_sym_encrypt() function. > > The docs hint that an IV is used automatically, but encrypting plain > text that

[GENERAL] pgcrypto: is an IV needed with pgp_sym_encrypt()?

2007-09-17 Thread Bill Moseley
I'm just starting with pgcrypto, and I'm curious if it's needed/recommended to use an initialization vector/value (IV) with the pgp_sym_encrypt() function. The docs hint that an IV is used automatically, but encrypting plain text that starts the same seems to result in initial common cipher text.

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-06-07 Thread Bruce Momjian
HEAD only appears in 8.2, but 8.1.X means it will appear in 8.1.5. --- Joe Kramer wrote: > If it was commited to HEAD, it will appear in 8.1.5, right? > > On 5/30/06, Bruce Momjian wrote: > > > > Patch applied to CVS HEAD

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-06-07 Thread Joe Kramer
If it was commited to HEAD, it will appear in 8.1.5, right? On 5/30/06, Bruce Momjian wrote: Patch applied to CVS HEAD and 8.1.X. Thanks. --- Marko Kreen wrote: > On 5/9/06, Joe Kramer <[EMAIL PROTECTED]> wrote: > > O

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-30 Thread Bruce Momjian
Patch applied to CVS HEAD and 8.1.X. Thanks. --- Marko Kreen wrote: > On 5/9/06, Joe Kramer <[EMAIL PROTECTED]> wrote: > > On 5/9/06, Marko Kreen <[EMAIL PROTECTED]> wrote: > > > The fact that Fedora pgcrypto is linked wi

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-10 Thread Marko Kreen
On 5/10/06, Bruno Wolff III <[EMAIL PROTECTED]> wrote: On Tue, May 09, 2006 at 22:17:21 +0300, Joe Kramer <[EMAIL PROTECTED]> wrote: > > Right on! SHA2 should fallback the same as AES! Note that it's SHA256, not SHA2. It's SHA224/256/384/512, which together are more easily referred as SHA2.

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-10 Thread Bruno Wolff III
On Tue, May 09, 2006 at 22:17:21 +0300, Joe Kramer <[EMAIL PROTECTED]> wrote: > > Right on! SHA2 should fallback the same as AES! Note that it's SHA256, not SHA2. SHA-1 is really a fix of the original SHA (sometimes referred to as SHA-0). ---(end of broadcast)-

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-09 Thread Joe Kramer
On 5/9/06, Marko Kreen <[EMAIL PROTECTED]> wrote: On 5/9/06, Joe Kramer <[EMAIL PROTECTED]> wrote:> On 5/9/06, Marko Kreen <[EMAIL PROTECTED]> wrote:> > The fact that Fedora pgcrypto is linked with OpenSSL that does not > > support SHA256 is not a bug, just a fact.>> It's not Fedora only, same prob

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-09 Thread Marko Kreen
On 5/9/06, Joe Kramer <[EMAIL PROTECTED]> wrote: On 5/9/06, Marko Kreen <[EMAIL PROTECTED]> wrote: > The fact that Fedora pgcrypto is linked with OpenSSL that does not > support SHA256 is not a bug, just a fact. It's not Fedora only, same problem with Gentoo/portage. I think it's problem for all

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-09 Thread Joe Kramer
On 5/9/06, Marko Kreen <[EMAIL PROTECTED]> wrote: On 5/9/06, Joe Kramer <[EMAIL PROTECTED]> wrote:> Thanks, but I need it to work out-of-the-box, with standard installation of> RedHat or Gentoo and standard PostgreSQL rpm. >>  I am developing application with PortgreSQL and I can't tell customer to

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-09 Thread Marko Kreen
On 5/9/06, Joe Kramer <[EMAIL PROTECTED]> wrote: Thanks, but I need it to work out-of-the-box, with standard installation of RedHat or Gentoo and standard PostgreSQL rpm. I am developing application with PortgreSQL and I can't tell customer to "Recompile PostgreSQL and see if it works then try

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-09 Thread Joe Kramer
Thanks, but I need it to work out-of-the-box, with standard installation of RedHat or Gentoo and standard PostgreSQL rpm. I am developing application with PortgreSQL and I can't tell customer to "Recompile PostgreSQL and see if it works then try to use non-openssl pgcrypto or try to compile open

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-09 Thread Marko Kreen
On 5/9/06, Joe Kramer <[EMAIL PROTECTED]> wrote: Fedora core has OpenSSL 0.9.7 installed by default. And it's not possible to install 0.9.8 because of glibc conflict. I suspect pgcrypto looks for SHA256 in OpeSSL lib when it should use built-in. SHA256 is working fine on Windows but on Redhat it

[GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-09 Thread Joe Kramer
Hello,Pgcrypto SHA 256/384/512 algorithm don't work on RedHat: db=# SELECT digest('test', 'sha1');     digest --  \251J\217\345\314\261\233\246\034L\010s\323\221\351\207\230/\273\323 (1 row) db=# SELECT

Re: [GENERAL] pgcrypto-crypt

2006-04-06 Thread Chris
AKHILESH GUPTA wrote: how do we compare the existing data in the table with the entered one? same way as anything else, for example: select * from users where passwd=md5('my_password'); is there any other function which we can use here for both cases encryption as well as for decryption at t

Re: [GENERAL] pgcrypto-crypt

2006-04-06 Thread chris smith
On 4/6/06, AKHILESH GUPTA <[EMAIL PROTECTED]> wrote: > dear all, > i want to encrypt and decrypt one of the fields in my table (i.e-password > field) > i have searched and with the help of pgcrypto package, using function > "crypt", i am able to encrypt my data, > but there is nothing which i fo

[GENERAL] pgcrypto-crypt

2006-04-06 Thread AKHILESH GUPTA
dear all, i want to encrypt and decrypt one of the fields in my table (i.e-password field) i have searched and with the help of pgcrypto package, using function "crypt", i am able to encrypt my data, but there is nothing which i found to decrypt that same data, plz anybody give me the function to d

Re: [GENERAL] pgcrypto : how to get SHA1(string) as a 40-char string, NOT binary string?

2005-07-13 Thread Michael Fuhr
On Wed, Jul 13, 2005 at 12:45:19AM -0700, Miles Keaton wrote: > I have the contrib/pgcrypto installed. > I want to get the 40-character hash from SHA1 > > Example: SELECT digest('blue', 'sha1') would be: > 4c9a82ce72ca2519f38d0af0abbb4cecb9fceca9 > > I was surprised and disappointed to get a bina

[GENERAL] pgcrypto : how to get SHA1(string) as a 40-char string, NOT binary string?

2005-07-13 Thread Miles Keaton
I have the contrib/pgcrypto installed. I want to get the 40-character hash from SHA1 Example: SELECT digest('blue', 'sha1') would be: 4c9a82ce72ca2519f38d0af0abbb4cecb9fceca9 I was surprised and disappointed to get a binary-hash back. Does anyone know how to get the regular 40-character string b

[GENERAL] pgcrypto/encrypt insertion failes due to \\ (2 slah being next to each other)

2004-08-15 Thread Ismail Seyfi
Hi,   I am currently using pgcrypto functions (encrypt(), decrypt()) on postgresql 7.4.1. There seems to be a problem when ever I try to insert a string that contains “\\” (2 slashes next to each other”). it gives an error message saying that it is not a valid entry for type bytea. I am u