@@ -49,14 +49,14 @@ There are some other differences with and without OpenSSL:
4949----------------------------------------------------
5050 MD5 yes yes
5151 SHA1 yes yes
52- SHA256/ 384/512 yes since 0.9.8
52+ SHA224/256/ 384/512 yes yes (3)
5353 Any other digest algo no yes (1)
5454 Blowfish yes yes
5555 AES yes yes (2)
5656 DES/3DES/CAST5 no yes
5757 Raw encryption yes yes
5858 PGP Symmetric encryption yes yes
59- PGP Public-Key encryption no yes
59+ PGP Public-Key encryption yes yes
6060----------------------------------------------------
6161
62621. Any digest algorithm OpenSSL supports is automatically picked up.
@@ -67,6 +67,9 @@ There are some other differences with and without OpenSSL:
6767 compiled against older version, it will use built-in AES code,
6868 so it has AES always available.
6969
70+ 3. SHA2 algorithms were added to OpenSSL in version 0.9.8. For
71+ older versions, pgcrypto will use built-in code.
72+
7073
71742.2. NULL handling
7275~~~~~~~~~~~~~~~~~~~~
@@ -621,36 +624,47 @@ is equal to
621624 encrypt(data, 'fooz', 'bf-cbc/pad:pkcs')
622625
623626
624- 7. Credits
627+ 7. Random bytes
628+ -----------------
629+
630+ gen_random_bytes(count integer)
631+
632+ Returns `count` cryptographically strong random bytes as bytea value.
633+ There can be maximally 1024 bytes extracted at a time. This is to avoid
634+ draining the randomness generator pool.
635+
636+
637+ 8. Credits
625638------------
626639
627640I have used code from following sources:
628641
629- `--------------------`-------------------------`----------------------
642+ `--------------------`-------------------------`-------------------------------
630643 Algorithm Author Source origin
631- ----------------------------------------------------------------------
644+ -------------------------------------------------------------------------------
632645 DES crypt() David Burren and others FreeBSD libcrypt
633646 MD5 crypt() Poul-Henning Kamp FreeBSD libcrypt
634647 Blowfish crypt() Solar Designer www.openwall.com
635648 Blowfish cipher Niels Provos OpenBSD sys/crypto
636649 Rijndael cipher Brian Gladman OpenBSD sys/crypto
637650 MD5 and SHA1 WIDE Project KAME kame/sys/crypto
638651 SHA256/384/512 Aaron D. Gifford OpenBSD sys/crypto
639- ----------------------------------------------------------------------
652+ BIGNUM math Michael J. Fromberger dartmouth.edu/~sting/sw/imath
653+ -------------------------------------------------------------------------------
640654
641655
642- 8 . Legalese
656+ 9 . Legalese
643657-------------
644658
645659* I owe a beer to Poul-Henning.
646660* This product includes software developed by Niels Provos.
647661
648662
649- 9 . References/Links
650- ---------------------
663+ 10 . References/Links
664+ ----------------------
651665
652- 9 .1. Useful reading
653- ~~~~~~~~~~~~~~~~~~~~~
666+ 10 .1. Useful reading
667+ ~~~~~~~~~~~~~~~~~~~~~~
654668
655669http://www.gnupg.org/gph/en/manual.html[]::
656670 The GNU Privacy Handbook
@@ -668,8 +682,8 @@ http://www.interhack.net/people/cmcurtin/snake-oil-faq.html[]::
668682 Describes good and bad cryptography.
669683
670684
671- 9 .2. Technical references
672- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
685+ 10 .2. Technical references
686+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
673687
674688http://www.ietf.org/rfc/rfc2440.txt[]::
675689 OpenPGP message format
@@ -699,4 +713,4 @@ http://www.cs.ut.ee/~helger/crypto/[]::
699713 Collection of cryptology pointers.
700714
701715
702- // $PostgreSQL: pgsql/contrib/pgcrypto/README.pgcrypto,v 1.14 2005/11/03 02:54:07 tgl Exp $
716+ // $PostgreSQL: pgsql/contrib/pgcrypto/README.pgcrypto,v 1.15 2006/07/13 04:15:24 neilc Exp $
0 commit comments