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