Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ds74A-0004NJ-BU for pgsql-bugs@arkaria.postgresql.org; Wed, 13 Sep 2017 12:46:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ds749-0002tF-Qk for pgsql-bugs@arkaria.postgresql.org; Wed, 13 Sep 2017 12:46:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ds749-0002so-5G for pgsql-bugs@postgresql.org; Wed, 13 Sep 2017 12:46:53 +0000 Received: from resqmta-ch2-11v.sys.comcast.net ([2001:558:fe21:29:69:252:207:43]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ds742-0004ez-UQ for pgsql-bugs@postgresql.org; Wed, 13 Sep 2017 12:46:52 +0000 Received: from resomta-ch2-07v.sys.comcast.net ([69.252.207.103]) by resqmta-ch2-11v.sys.comcast.net with ESMTP id s73uduLFcky16s73wdQKQX; Wed, 13 Sep 2017 12:46:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1505306800; bh=sBkKR0O+kn1YNS3dDFqeQCGcUuS5gPlT3PadKu1T1H4=; h=Received:Received:From:Mime-Version:Content-Type:Subject:Date:To: Message-Id; b=Ps8MffkRf+usTYuTf1DDOEzNDoB7TTOAvdgHOKIn+QQrtDoYDHaD90+Az0OJj6UEB iPddQ7O1uAnqBBskRvyDbDS7nzgovdq09nBt3wna60odDTcRhahZ2ePcJB2g6080Js 6f7xMRR6VNe+UKhLwt8DvbhHTG/+9ue7EQj8gBH5e51B4xB7eqzgik82GcskuzEzzS Qq+rSkch5RnhHUXp9znhSswgxWuHmrlEE4gM5UbtcVU870hABRziTGYw05e7+Zx077 lPOPJ2xHrzZEIsbtJSAGQSc5tHlJyO8q6vP/UCdPyPYxas0hxaZaxVxQI+2yPKBqfP R6my5Ts+qcVyw== Received: from [192.168.42.10] ([73.33.92.169]) by resomta-ch2-07v.sys.comcast.net with SMTP id s73udrZhxabRQs73vdZs64; Wed, 13 Sep 2017 12:46:40 +0000 From: Lou Picciano Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_F565E4A4-A8A8-4BDC-9B2A-F2BABBE044DD" X-Priority: 3 Subject: Re: about pgcrypto, not support "des" Date: Wed, 13 Sep 2017 08:46:37 -0400 References: To: pengchong , pgsql-bugs@postgresql.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3273) X-CMAE-Envelope: MS4wfP6SPAaqgyoBflj2isYOwxuJ9fMqfiNKqo2O28LsNQu1hRQlLrVrPvJdQ+m/D5yEScZv4RCVZcyKFmkswudWJ53FBJp4c6f8pZUblJjZiDjigX16llC+ 9TwlBC4lJK7rpbP8exREM9J+/7EB1cyLVIasPl2Eh2KYIZpV5wb/T5PVvXPXQ2rcROJS51opgvG0yHc/afVtuPUpEt3vhqJuTEQ= List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --Apple-Mail=_F565E4A4-A8A8-4BDC-9B2A-F2BABBE044DD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your OpenSSL implementation would have to be built with DES support, for = starters. Is it? Having said that, you may wish to avoid DES anyway.The DES algorithm is = widely accepted to be =E2=80=98weak=E2=80=99. Check notes by Craig Ringer and others on this. Lou Picciano > On Sep 13, 2017, at 3:13 AM, pengchong wrote: >=20 > hello,everybody: >=20 > psql.bin (9.5.9) > Type "help" for help. >=20 > dafc=3D> \dx pgcrypto=20 > List of installed extensions > Name | Version | Schema | Description =20 > ----------+---------+--------+------------------------- > pgcrypto | 1.2 | public | cryptographic functions > (1 row) >=20 >=20 > dafc=3D> select digest('test','des'); > ERROR: Cannot use "des": No such hash algorithm >=20 > uname -a > Linux ic-test.hadoop 2.6.32-131.0.15.el6.x86_64 #1 SMP Tue May 10 = 15:42:40 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux >=20 > openssl version > OpenSSL 1.1.0e 16 Feb 2017 >=20 > pg_config=20 > BINDIR =3D /opt/PostgreSQL/9.5/bin > DOCDIR =3D /opt/PostgreSQL/9.5/doc/postgresql > HTMLDIR =3D /opt/PostgreSQL/9.5/doc/postgresql > INCLUDEDIR =3D /opt/PostgreSQL/9.5/include > PKGINCLUDEDIR =3D /opt/PostgreSQL/9.5/include/postgresql > INCLUDEDIR-SERVER =3D /opt/PostgreSQL/9.5/include/postgresql/server > LIBDIR =3D /opt/PostgreSQL/9.5/lib > PKGLIBDIR =3D /opt/PostgreSQL/9.5/lib/postgresql > LOCALEDIR =3D /opt/PostgreSQL/9.5/share/locale > MANDIR =3D /opt/PostgreSQL/9.5/share/man > SHAREDIR =3D /opt/PostgreSQL/9.5/share/postgresql > SYSCONFDIR =3D /opt/PostgreSQL/9.5/etc/postgresql > PGXS =3D /opt/PostgreSQL/9.5/lib/postgresql/pgxs/src/makefiles/pgxs.mk > CONFIGURE =3D '--enable-debug' '--with-libs=3D/opt/local/Current/lib' = '--with-includes=3D/opt/local/Current/include/libxml2:/opt/local/Current/i= nclude' = '--prefix=3D/mnt/hgfs/pginstaller.auto/server/staging/linux-x64.build' = '--with-ldap' '--with-openssl' '--with-perl' '--with-python' = '--with-tcl' = '--with-tclconfig=3D/opt/local/EnterpriseDB/LanguagePack/9.5/Tcl-8.5/lib' = '--with-pam' '--enable-thread-safety' '--with-libxml' '--with-ossp-uuid' = '--docdir=3D/mnt/hgfs/pginstaller.auto/server/staging/linux-x64.build/doc/= postgresql' '--with-libxslt' '--with-libedit-preferred' '--with-gssapi' = 'LD_LIBRARY_PATH=3D/opt/local/Current/lib' 'CFLAGS=3D-O2 = -DMAP_HUGETLB=3D0x40000' > CC =3D gcc > CPPFLAGS =3D -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 = -I/opt/local/Current/include > CFLAGS =3D -Wall -Wmissing-prototypes -Wpointer-arith = -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute = -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 = -DMAP_HUGETLB=3D0x40000 > CFLAGS_SL =3D -fPIC > LDFLAGS =3D -L../../../src/common -L/opt/local/Current/lib = -Wl,--as-needed = -Wl,-rpath,'/mnt/hgfs/pginstaller.auto/server/staging/linux-x64.build/lib'= ,--enable-new-dtags > LDFLAGS_EX =3D=20 > LDFLAGS_SL =3D=20 > LIBS =3D -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto = -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm=20 > VERSION =3D PostgreSQL 9.5.9 >=20 >=20 >=20 > ------------------ >=20 > =E5=BD=AD=E5=86=B2 > =E5=A4=A9=E6=B4=A5=E9=80=9A=E5=8D=A1=E6=99=BA=E8=83=BD=E7=BD=91=E7=BB=9C= =E7=A7=91=E6=8A=80=E8=82=A1=E4=BB=BD=E6=9C=89=E9=99=90=E5=85=AC=E5=8F=B8/=E5= =9B=BD=E9=99=85=E4=BA=8B=E4=B8=9A=E9=83=A8 > =E5=A4=A9=E6=B4=A5 >=20 > = =E5=A3=B0=E6=98=8E=EF=BC=9A=E6=9C=AC=E9=82=AE=E4=BB=B6=E5=8F=8A=E5=85=B6=E9= =99=84=E4=BB=B6=E6=89=80=E5=8C=85=E5=90=AB=E7=9A=84=E4=BF=A1=E6=81=AF=E5=B1= =9E=E5=A4=A9=E6=B4=A5=E9=80=9A=E5=8D=A1=E6=99=BA=E8=83=BD=E7=BD=91=E7=BB=9C= =E7=A7=91=E6=8A=80=E8=82=A1=E4=BB=BD=E6=9C=89=E9=99=90=E5=85=AC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D=98=E3=80=81=E5=A4=8D=E5=88=B6=E3=80=81=E5=88=A9=E7= =94=A8=E5=92=8C=E6=B3=84=E9=9C=B2=E6=9C=AC=E9=82=AE=E4=BB=B6=E5=8F=8A=E9=99= =84=E4=BB=B6=E7=9A=84=E4=BB=BB=E4=BD=95=E5=86=85=E5=AE=B9=EF=BC=8C=E4=BB=A5= =E7=A1=AE=E4=BF=9D=E6=82=A8=E6=97=A0=E9=9C=80=E4=B8=BA=E6=AD=A4=E6=89=BF=E6= =8B=85=E6=B3=95=E5=BE=8B=E8=B4=A3=E4=BB=BB=E3=80=82 > =20 --Apple-Mail=_F565E4A4-A8A8-4BDC-9B2A-F2BABBE044DD Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Your OpenSSL implementation would have to be built with DES = support, for starters. Is it?

Having said that, you may wish to avoid DES anyway.The DES = algorithm is widely accepted to be =E2=80=98weak=E2=80=99.

Check notes by Craig = Ringer and others on this.

Lou Picciano


On Sep 13, 2017, at 3:13 AM, pengchong <pengchong@tcps.com.cn> wrote:

hello,everybody:

psql.bin = (9.5.9)
Type "help" for help.

dafc=3D>= ; \dx pgcrypto 
        =      List of installed extensions
   Name   | Version | Schema |     =   Description       
----------+---------+--------+-------------------------
 pgcrypto | 1.2     | public | = cryptographic functions
(1 row)


dafc=3D> select = digest('test','des');
ERROR:  Cannot use "des": No such hash = algorithm

uname -a
Linux = ic-test.hadoop 2.6.32-131.0.15.el6.x86_64 #1 SMP Tue May 10 15:42:40 EDT = 2011 x86_64 x86_64 x86_64 GNU/Linux

openssl = version
OpenSSL 1.1.0e  16 Feb = 2017

pg_config 
BINDIR =3D = /opt/PostgreSQL/9.5/bin
DOCDIR =3D = /opt/PostgreSQL/9.5/doc/postgresql
HTMLDIR =3D = /opt/PostgreSQL/9.5/doc/postgresql
INCLUDEDIR =3D = /opt/PostgreSQL/9.5/include
PKGINCLUDEDIR =3D = /opt/PostgreSQL/9.5/include/postgresql
INCLUDEDIR-SERVER =3D = /opt/PostgreSQL/9.5/include/postgresql/server
LIBDIR = =3D /opt/PostgreSQL/9.5/lib
PKGLIBDIR =3D = /opt/PostgreSQL/9.5/lib/postgresql
LOCALEDIR =3D = /opt/PostgreSQL/9.5/share/locale
MANDIR =3D = /opt/PostgreSQL/9.5/share/man
SHAREDIR =3D = /opt/PostgreSQL/9.5/share/postgresql
SYSCONFDIR =3D = /opt/PostgreSQL/9.5/etc/postgresql
PGXS =3D = /opt/PostgreSQL/9.5/lib/postgresql/pgxs/src/makefiles/pgxs.mk
CONFIGURE =3D '--enable-debug' = '--with-libs=3D/opt/local/Current/lib' = '--with-includes=3D/opt/local/Current/include/libxml2:/opt/local/Current/i= nclude' = '--prefix=3D/mnt/hgfs/pginstaller.auto/server/staging/linux-x64.build' = '--with-ldap' '--with-openssl' = '--with-perl' '--with-python' '--with-tcl' = '--with-tclconfig=3D/opt/local/EnterpriseDB/LanguagePack/9.5/Tcl-8.5/lib' = '--with-pam' '--enable-thread-safety' '--with-libxml' '--with-ossp-uuid' = '--docdir=3D/mnt/hgfs/pginstaller.auto/server/staging/linux-x64.build/doc/= postgresql' '--with-libxslt' '--with-libedit-preferred' '--with-gssapi' = 'LD_LIBRARY_PATH=3D/opt/local/Current/lib' 'CFLAGS=3D-O2 = -DMAP_HUGETLB=3D0x40000'
CC =3D gcc
CPPFLAGS =3D -D_GNU_SOURCE = -I/opt/local/Current/include/libxml2 = -I/opt/local/Current/include
CFLAGS =3D -Wall = -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement = -Wendif-labels -Wmissing-format-attribute -Wformat-security = -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=3D0x40000
CFLAGS_SL =3D -fPIC
LDFLAGS =3D = -L../../../src/common -L/opt/local/Current/lib -Wl,--as-needed = -Wl,-rpath,'/mnt/hgfs/pginstaller.auto/server/staging/linux-x64.build/lib'= ,--enable-new-dtags
LDFLAGS_EX =3D 
LDFLAGS_SL =3D 
LIBS =3D -lpgcommon = -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit = -lrt -lcrypt -ldl -lm 
VERSION =3D PostgreSQL = 9.5.9



------------------

=E5=BD=AD=E5=86=B2

=E5=A4=A9=E6=B4=A5=E9=80=9A=E5=8D=A1=E6=99=BA=E8=83=BD=E7=BD=91= =E7=BB=9C=E7=A7=91=E6=8A=80=E8=82=A1=E4=BB=BD=E6=9C=89=E9=99=90=E5=85=AC=E5= =8F=B8/=E5=9B=BD=E9=99=85=E4=BA=8B=E4=B8=9A=E9=83=A8

=E5=A4=A9=E6=B4=A5

=E5=A3=B0=E6=98=8E=EF=BC=9A=E6=9C=AC=E9=82=AE=E4=BB=B6=E5=8F=8A= =E5=85=B6=E9=99=84=E4=BB=B6=E6=89=80=E5=8C=85=E5=90=AB=E7=9A=84=E4=BF=A1=E6= =81=AF=E5=B1=9E=E5=A4=A9=E6=B4=A5=E9=80=9A=E5=8D=A1=E6=99=BA=E8=83=BD=E7=BD= =91=E7=BB=9C=E7=A7=91=E6=8A=80=E8=82=A1=E4=BB=BD=E6=9C=89=E9=99=90=E5=85=AC= =E5=8F=B8=E3=80=81=E6=88=96=E8=80=85=E4=B8=8E=E5=A4=A9=E6=B4=A5=E9=80=9A=E5= =8D=A1=E6=99=BA=E8=83=BD=E7=BD=91=E7=BB=9C=E7=A7=91=E6=8A=80=E8=82=A1=E4=BB= =BD=E6=9C=89=E9=99=90=E5=85=AC=E5=8F=B8=E5=BE=80=E6=9D=A5=E5=AE=A2=E6=88=B7= =E7=9A=84=E5=95=86=E4=B8=9A=E7=A7=98=E5=AF=86=EF=BC=8C=E4=BB=85=E9=99=90=E4= =BA=8E=E5=8F=91=E7=BB=99=E4=B8=8A=E9=9D=A2=E7=9A=84=E4=BA=BA=E6=88=96=E7=BE= =A4=E7=BB=84=E3=80=82=E5=9C=A8=E6=9C=AA=E7=BB=8F=E8=AE=B8=E5=8F=AF=E7=9A=84= =E6=83=85=E5=86=B5=E4=B8=8B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