<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/secure/lib/libcrypt/crypt-blowfish.c, branch releng/12.2</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.2</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.2'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2016-08-10T15:16:28Z</updated>
<entry>
<title>Make libcrypt thread-safe. Add crypt_r(3).</title>
<updated>2016-08-10T15:16:28Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2016-08-10T15:16:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5f521d7ba72145092ea23ff6081d8791ad6c1f9d'/>
<id>urn:sha1:5f521d7ba72145092ea23ff6081d8791ad6c1f9d</id>
<content type='text'>
glibc has a pretty nice function called crypt_r(3), which is nothing
more than crypt(3), but thread-safe. It accomplishes this by introducing
a 'struct crypt_data' structure that contains a buffer that is large
enough to hold the resulting string.

Let's go ahead and also add this function. It would be a shame if a
useful function like this wouldn't be usable in multithreaded apps.
Refactor crypt.c and all of the backends to no longer declare static
arrays, but write their output in a provided buffer.

There is no need to do any buffer length computation here, as we'll just
need to ensure that 'struct crypt_data' is large enough, which it is.
_PASSWORD_LEN is defined to 128 bytes, but in this case I'm picking 256,
as this is going to be part of the actual ABI.

Differential Revision:	https://reviews.freebsd.org/D7306
</content>
</entry>
<entry>
<title>Add compatibility with $2y$ bcrypt hashes</title>
<updated>2015-06-16T23:57:29Z</updated>
<author>
<name>Allan Jude</name>
<email>allanjude@FreeBSD.org</email>
</author>
<published>2015-06-16T23:57:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a3b20e50a92f92e15eaf191c1fd84f223f411043'/>
<id>urn:sha1:a3b20e50a92f92e15eaf191c1fd84f223f411043</id>
<content type='text'>
crypt_blowfish and many implementations based on it (Apache, PHP, PostgreSQL) implemented $2y$ before OpenBSD went with $2b$. This changes marks them as equivalent.

http://www.openwall.com/lists/announce/2011/07/17/1

This change is required for applications that use the base crypt() implementation (including nginx) to be able to validate $2y$ hashes

Reviewed by:	eadler
Approved by:	delphij
MFC after:	1 week
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D2742
</content>
</entry>
<entry>
<title>Switch using the new $2b$ format by default, when bcrypt is used.</title>
<updated>2014-05-14T00:50:31Z</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2014-05-14T00:50:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=185e05ee1a28a5fd897416874d5c71eb69198341'/>
<id>urn:sha1:185e05ee1a28a5fd897416874d5c71eb69198341</id>
<content type='text'>
MFC after:	2 weeks
Relnotes:	default Blowfish crypt(3) format have been changed to $2b$.
</content>
</entry>
<entry>
<title>Refresh our implementation of OpenBSD's Blowfish password format.</title>
<updated>2014-02-25T23:03:48Z</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2014-02-25T23:03:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=43e3038611943925a3a9560242b9218a68a8fb6f'/>
<id>urn:sha1:43e3038611943925a3a9560242b9218a68a8fb6f</id>
<content type='text'>
Notable changes:

 - Support of $2b$ password format to address a problem where very
   long passwords (more than 256 characters, when an integer
   overflow would happen and cause the length to wrap at 256).
 - Updated pseudo code in comments to reflect the reality.
 - Removed our local shortcut of processing magic string and rely
   on the centralized and tigntened validation.
 - Diff reduction from upstream.

For now we are still generating the older $02a$ format of password
but we will migrate to the new format once the format is formally
finalized.

MFC after:	1 month
</content>
</entry>
<entry>
<title>Return NULL on error rather than ":", per the crypt(3) man page.</title>
<updated>2012-02-22T01:23:14Z</updated>
<author>
<name>Kevin Lo</name>
<email>kevlo@FreeBSD.org</email>
</author>
<published>2012-02-22T01:23:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=19ab58bfe3daf34d714195dcbd0f91e480924f7e'/>
<id>urn:sha1:19ab58bfe3daf34d714195dcbd0f91e480924f7e</id>
<content type='text'>
Discussed in: http://www.openwall.com/lists/oss-security/2011/11/15/3
</content>
</entry>
<entry>
<title>Strip the private blowfish code down to only that which is</title>
<updated>2003-06-02T19:17:24Z</updated>
<author>
<name>Mark Murray</name>
<email>markm@FreeBSD.org</email>
</author>
<published>2003-06-02T19:17:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c8fa8e25d77016f36e63790f2ceccb90613ccb2e'/>
<id>urn:sha1:c8fa8e25d77016f36e63790f2ceccb90613ccb2e</id>
<content type='text'>
required to make crypt(3) blowfish "$2a$..." hashes. Lint and
warnsify.
</content>
</entry>
<entry>
<title>No functional change, but big code cleanup. WARNS, lint(1) and style(9).</title>
<updated>2002-03-06T17:18:09Z</updated>
<author>
<name>Mark Murray</name>
<email>markm@FreeBSD.org</email>
</author>
<published>2002-03-06T17:18:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f2ac424af7b980ba4d858ecfd1644ce197d6869d'/>
<id>urn:sha1:f2ac424af7b980ba4d858ecfd1644ce197d6869d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>__FBSDID()  (second half of src/lib/libcrypt changes)</title>
<updated>2001-10-23T10:23:32Z</updated>
<author>
<name>Peter Wemm</name>
<email>peter@FreeBSD.org</email>
</author>
<published>2001-10-23T10:23:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=68344a95478e7f7a30cc2d93820595aad7e7bc5b'/>
<id>urn:sha1:68344a95478e7f7a30cc2d93820595aad7e7bc5b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add OpenBSD-style blowfish password hashing. This makes one less</title>
<updated>2001-03-11T16:05:43Z</updated>
<author>
<name>Mark Murray</name>
<email>markm@FreeBSD.org</email>
</author>
<published>2001-03-11T16:05:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5c1296168babf97c51ff030872cddb7f9857474f'/>
<id>urn:sha1:5c1296168babf97c51ff030872cddb7f9857474f</id>
<content type='text'>
gratuitous difference between us and our sister project.

This was given to me _ages_ ago. May apologies to Paul for the length
of time its taken me to commit.

Obtained from:	Niels Provos &lt;provos@physnet.uni-hamburg.de&gt;/OpenBSD
Submitted by:	Paul Herman &lt;pherman@frenchfries.net&gt;
</content>
</entry>
</feed>
