OSDN Git Service

Big thanks to Solar Designer who pointed out a bug in bcrypt
authorBruce Momjian <bruce@momjian.us>
Sun, 23 Sep 2001 04:12:44 +0000 (04:12 +0000)
committerBruce Momjian <bruce@momjian.us>
Sun, 23 Sep 2001 04:12:44 +0000 (04:12 +0000)
commitab560228643cca4a3640db82f61dc0e2cabf2acd
treed905cd6ae2e9119f635ecc5679c321de2a667f81
parentb75814aee320ef2b67ad01ba72c266dbbf94db45
Big thanks to Solar Designer who pointed out a bug in bcrypt
salt generation code.  He also urged using better random source
and making possible to choose using bcrypt and xdes rounds more
easily.  So, here's patch:

* For all salt generation, use Solar Designer's own code.  This
  is mostly due fact that his code is more fit for get_random_bytes()
  style interface.
* New function: gen_salt(type, rounds).  This lets specify iteration
  count for algorithm.
* random.c: px_get_random_bytes() function.
  Supported randomness soure: /dev/urandom, OpenSSL PRNG, libc random()
  Default: /dev/urandom.
* Draft description of C API for pgcrypto functions.

New files: API, crypt-gensalt.c, random.c

Marko Kreen
13 files changed:
contrib/pgcrypto/API [new file with mode: 0644]
contrib/pgcrypto/Makefile
contrib/pgcrypto/README.pgcrypto
contrib/pgcrypto/crypt-blowfish.c
contrib/pgcrypto/crypt-gensalt.c [new file with mode: 0644]
contrib/pgcrypto/openssl.c
contrib/pgcrypto/pgcrypto.c
contrib/pgcrypto/pgcrypto.h
contrib/pgcrypto/pgcrypto.sql.in
contrib/pgcrypto/px-crypt.c
contrib/pgcrypto/px-crypt.h
contrib/pgcrypto/px.h
contrib/pgcrypto/random.c [new file with mode: 0644]