<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/secure/lib/libcrypt, branch releng/14.4</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F14.4</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F14.4'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2023-08-16T17:54:42Z</updated>
<entry>
<title>Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-16T17:54:42Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1d386b48a555f61cb7325543adbbb5c3f3407a66'/>
<id>urn:sha1:1d386b48a555f61cb7325543adbbb5c3f3407a66</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-16T17:54:16Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b3e7694832e81d7a904a10f525f8797b753bf0d3'/>
<id>urn:sha1:b3e7694832e81d7a904a10f525f8797b753bf0d3</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
</content>
</entry>
<entry>
<title>crypt_r(3): fix reentrancy problems with DES</title>
<updated>2021-06-15T10:06:40Z</updated>
<author>
<name>Edward Tomasz Napierala</name>
<email>trasz@FreeBSD.org</email>
</author>
<published>2021-06-15T10:04:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7d681ad774f00cf06c4ef910add91e0f8a79f7ae'/>
<id>urn:sha1:7d681ad774f00cf06c4ef910add91e0f8a79f7ae</id>
<content type='text'>
This code was originally written for non-reentrant crypt(3).
In 5f521d7ba72, a thread-safe crypt_r(3) was introduced.  However,
it looks like the DES implementation is still not re-entrant;
routines like setup_salt() or des_setkey() still use global
variables.

Instead of something drastic, eg removing DES support altogether,
just mark those variables as thread-local.  This adds about 30kB
of data per thread.

Given that this only applies to DES, I think the impact is minimal.

Reviewed By:	markj
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D30674
</content>
</entry>
<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>Update the previous openssl fix. [12:01]</title>
<updated>2012-05-30T12:01:28Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2012-05-30T12:01:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=071183ef48062f3d4cd317aac2b7639dc2d70dc9'/>
<id>urn:sha1:071183ef48062f3d4cd317aac2b7639dc2d70dc9</id>
<content type='text'>
Fix a bug in crypt(3) ignoring characters of a passphrase. [12:02]

Security:	FreeBSD-SA-12:01.openssl (revised)
Security:	FreeBSD-SA-12:02.crypt
Approved by:	so (bz, simon)
</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>
</feed>
