README 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. This is an implementation of a password hashing method, provided via the
  2. crypt(3) and a reentrant interface. It is fully compatible with
  3. OpenBSD's bcrypt.c for prefix "$2b$", originally by Niels Provos and
  4. David Mazieres. (Please refer to the included crypt(3) man page for
  5. information on minor compatibility issues for other bcrypt prefixes.)
  6. I've placed this code in the public domain, with fallback to a
  7. permissive license. Please see the comment in crypt_blowfish.c for
  8. more information.
  9. You can use the provided routines in your own packages, or link them
  10. into a C library. I've provided hooks for linking into GNU libc, but
  11. it shouldn't be too hard to get this into another C library. Note
  12. that simply adding this code into your libc is probably not enough to
  13. make your system use the new password hashing algorithm. Changes to
  14. passwd(1), PAM modules, or whatever else your system uses will likely
  15. be needed as well. These are not a part of this package, but see
  16. LINKS for a pointer to our tcb suite.
  17. Instructions on using the routines in one of the two common ways are
  18. given below. It is recommended that you test the routines on your
  19. system before you start. Type "make check" or "make check_threads"
  20. (if you have the POSIX threads library), then "make clean".
  21. 1. Using the routines in your programs.
  22. The available interfaces are in ow-crypt.h, and this is the file you
  23. should include. You won't need crypt.h. When linking, add all of the
  24. C files and x86.S (you can compile and link it even on a non-x86, it
  25. will produce no code in this case).
  26. 2. Building the routines into GNU C library.
  27. For versions 2.13 and 2.14 (and likely other nearby ones), extract the
  28. library sources as usual. Apply the patch for glibc 2.14 provided in
  29. this package. Enter crypt/ and rename crypt.h to gnu-crypt.h within
  30. that directory. Copy the C sources, header, and assembly (x86.S) files
  31. from this package in there as well (but be sure you don't overwrite the
  32. Makefile). Configure, build, and install the library as usual.
  33. For versions 2.2 to 2.3.6 (and likely also for some newer ones),
  34. extract the library sources and maybe its optional add-ons as usual.
  35. Apply the patch for glibc 2.3.6 provided in this package. Enter
  36. crypt/ and rename crypt.h to gnu-crypt.h within that directory. Copy
  37. the C sources, header, and assembly (x86.S) files from this package in
  38. there as well (but be sure you don't overwrite the Makefile).
  39. Configure, build, and install the library as usual.
  40. For versions 2.1 to 2.1.3, extract the library sources and the crypt
  41. and linuxthreads add-ons as usual. Apply the patch for glibc 2.1.3
  42. provided in this package. Enter crypt/sysdeps/unix/, and rename
  43. crypt.h to gnu-crypt.h within that directory. Copy C sources, header,
  44. and assembly (x86.S) files from this package in there as well (but be
  45. sure you don't overwrite the Makefile). Configure, build, and install
  46. the library as usual.
  47. Programs that want to use the provided interfaces will need to include
  48. crypt.h (but not ow-crypt.h directly). By default, prototypes for the
  49. new routines aren't defined (but the extra functionality of crypt(3)
  50. is indeed available). You need to define _OW_SOURCE to obtain the new
  51. routines as well.
  52. --
  53. Solar Designer <solar at openwall.com>
  54. $Owl: Owl/packages/glibc/crypt_blowfish/README,v 1.10 2014/07/07 15:19:04 solar Exp $