The NetBSD Project

CVS log for src/lib/libcrypt/bcrypt.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / libcrypt

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.21 / (download) - annotate - [select for diffs], Wed Mar 25 21:02:26 2020 UTC (3 months, 2 weeks ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, HEAD
Changes since 1.20: +4 -7 lines
Diff to previous 1.20 (colored)

Revert putting a $ as the final character for blowfish. It is not required by
MCF and we want to be compatible.

Revision 1.20 / (download) - annotate - [select for diffs], Wed Mar 25 18:36:29 2020 UTC (3 months, 2 weeks ago) by christos
Branch: MAIN
Changes since 1.19: +9 -6 lines
Diff to previous 1.19 (colored)

Add missing trailing $ for blowfish

Revision 1.19 / (download) - annotate - [select for diffs], Wed Aug 28 17:47:07 2013 UTC (6 years, 10 months ago) by riastradh
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, is-mlppp-base, is-mlppp, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

Publish explicit_memset and consttime_memequal in userland libc.

Remove the double-underscore from the userland versions, and do the
weak alias dance instead, now that these are public parts of libc.

As discussed on tech-userlevel:

https://mail-index.netbsd.org/tech-userlevel/2013/06/24/msg007843.html
(option 3)

Revision 1.18 / (download) - annotate - [select for diffs], Mon Jun 24 04:21:20 2013 UTC (7 years ago) by riastradh
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.

consttime_memequal is the same as the old consttime_bcmp.
explicit_memset is to memset as explicit_bzero was to bcmp.

Passes amd64 release and i386/ALL, but I'm sure I missed some spots,
so please let me know.

Revision 1.17 / (download) - annotate - [select for diffs], Thu Aug 30 12:16:49 2012 UTC (7 years, 10 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

Add "consttime_bcmp" and "explicit_bzero" functions for both kernel
abd userland, as proposed on tech-security, with explicit_bzero using
a volatile function pointer as suggested by Alan Barrett.
Both do what the name says. For userland, both are prefixed by "__"
to keep them out of the user namespace.
Change some memset/memcmp uses to the new functions where it makes
sense -- these are just some examples, more to come.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Mar 21 05:33:26 2012 UTC (8 years, 3 months ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4
Changes since 1.15: +3 -5 lines
Diff to previous 1.15 (colored)

Use C89 functions definitions.
Remove use of __P

Revision 1.15 / (download) - annotate - [select for diffs], Wed Dec 28 03:12:38 2011 UTC (8 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.14: +7 -5 lines
Diff to previous 1.14 (colored)

clamp length to 72 (73) characters.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Dec 27 23:33:41 2011 UTC (8 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.13: +14 -14 lines
Diff to previous 1.13 (colored)

- go back to returning NULL, we are going to wrap crypt instead.
- limit length of key to 253 to prevent truncation.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Dec 27 22:01:26 2011 UTC (8 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

we want to check against "*0" not "*\0"

Revision 1.12 / (download) - annotate - [select for diffs], Tue Dec 27 19:36:10 2011 UTC (8 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.11: +19 -18 lines
Diff to previous 1.11 (colored)

Instead of returning ":" on error, return "*0" or "*1" which will always result
in logged password entries, even if the calling program decides to blindly
use them. Discussed in: http://www.openwall.com/lists/oss-security/2011/11/15/3

Revision 1.11 / (download) - annotate - [select for diffs], Mon Dec 26 21:51:53 2011 UTC (8 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

Return ":1" on error instead of ":", so that sloppy password creation programs
don't end up confusing libc or the other way around. From Solar Designer

Revision 1.10 / (download) - annotate - [select for diffs], Mon May 16 10:45:56 2011 UTC (9 years, 1 month ago) by drochner
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache
Changes since 1.9: +12 -9 lines
Diff to previous 1.9 (colored)

-fix maximum length of salt (missing prefix, rounding error)
-clip number of rounds at 31 -- this is log2 of the real number,
 and anything larger would break exponentation
-catch possible atoi() error where log2(rounds) is parsed in the
 salt prefix
-zero crypto state on exit
from Open/FreeBSD

Revision 1.9 / (download) - annotate - [select for diffs], Fri Oct 27 19:39:11 2006 UTC (13 years, 8 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, mjf-devfs2-base, mjf-devfs2, matt-premerge-20091211, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-premerge-20101231, matt-mips64-base2, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.8: +4 -4 lines
Diff to previous 1.8 (colored)

gently add some "const", and avoid some casts
compiles with WARNS=4 now (on i386 and alpha)

Revision 1.8 / (download) - annotate - [select for diffs], Tue Oct 24 22:49:19 2006 UTC (13 years, 8 months ago) by mlelstv
Branch: MAIN
Changes since 1.7: +6 -2 lines
Diff to previous 1.7 (colored)

don't segfault on NULL pointer if number of rounds is
not specified in passwd.conf.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jan 12 05:27:35 2005 UTC (15 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.6: +24 -14 lines
Diff to previous 1.6 (colored)

fix compile issue and de-lint

Revision 1.6 / (download) - annotate - [select for diffs], Wed Jan 12 03:32:52 2005 UTC (15 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.5: +7 -9 lines
Diff to previous 1.5 (colored)

- change the gensalt functions to take an optional string instead of
  the number of rounds.
- make pw_gensalt() more generic, so that it does not depend in libutil.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Jan 11 23:02:16 2005 UTC (15 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.4: +4 -2 lines
Diff to previous 1.4 (colored)

add local prototype for old salt function

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jan 11 22:39:21 2005 UTC (15 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.3: +36 -15 lines
Diff to previous 1.3 (colored)

Write __gensalt_blowfish function that does not use static storage and
can return an error. Make the old bcrypt_gensalt() function use that.
XXX: should gc bcrypt_gensalt(). What uses it?

Revision 1.3 / (download) - annotate - [select for diffs], Wed Aug 6 08:34:32 2003 UTC (16 years, 11 months ago) by jdolecek
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Branch point for: netbsd-1-6
Changes since 1.2: +4 -1 lines
Diff to previous 1.2 (colored)

add __RCSID()

Revision 1.2 / (download) - annotate - [select for diffs], Thu Apr 17 00:31:04 2003 UTC (17 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

hrink the Blowfish routines down to only what we need for __bcrypt(),
and don't export any of the Blowfish functionality outside bcrypt.c.

Revision 1.1 / (download) - annotate - [select for diffs], Fri May 24 04:02:49 2002 UTC (18 years, 1 month ago) by itojun
Branch: MAIN
CVS Tags: fvdl_fs64_base

support bcrypt password.  can be chosen by "blowfish" keyword in passwd.conf.
from openbsd

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>