summaryrefslogtreecommitdiff
path: root/lib/libcrypt/crypt.3
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Chase r261913: hardcoded default crypt(3) algorithm is SHA-512 when DESXin LI2019-05-271-2/+2
| | | | | | | | | | is not available. Submitted by: Ali Mashtizadeh <ali mashtizadeh.com> MFC after: 3 days Notes: svn path=/head/; revision=348302
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Make libcrypt thread-safe. Add crypt_r(3).Ed Schouten2016-08-101-2/+19
| | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=303920
* use .Mt to mark up email addresses consistently (part3)Baptiste Daroussin2014-06-231-1/+1
| | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de> Notes: svn path=/head/; revision=267773
* various formating fixes, use NUL for NUL bytes..John-Mark Gurney2014-03-091-29/+37
| | | | | | | | | | | | | | | | | | drop out dated perf numbers (can't imagine people are still running Pentium MMX 166's anymore)... bump date... drop max length of salt of 8 since _PASSWORD_LEN is now large, 128.. and state the max length of the salt depends upon the module, sha-{256,512} have a max salt of 16.. recommend 8 characters of salt instead of just 2... MFC after: 1 week Notes: svn path=/head/; revision=262945
* Stop using auth_getval() now that it always returns NULL. Instead,Dag-Erling Smørgrav2012-06-121-8/+0
| | | | | | | | | | hardcode the default to what it would be if we didn't hardcode it, i.e. DES if supported and MD5 otherwise. MFC after: 3 weeks Notes: svn path=/head/; revision=236967
* mdoc: minor Bl improvements.Joel Dahl2012-06-021-1/+1
| | | | Notes: svn path=/head/; revision=236438
* Make the item numbers match the crypt magic numberEitan Adler2012-04-111-0/+2
| | | | | | | | | | PR: docs/166497 Submitted by: Mike Kelly <pioto@pioto.org> Approved by: cperciva MFC after: 1 week Notes: svn path=/head/; revision=234132
* Remove superfluous paragraph macro.Joel Dahl2012-03-251-4/+0
| | | | Notes: svn path=/head/; revision=233462
* Document SHA256/512 modes.Mark Murray2011-04-091-2/+8
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=220498
* cipher(3) is gone.Ceri Davies2007-04-041-1/+0
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=168361
* Fixed the misplaced $FreeBSD$.Ruslan Ermilov2005-02-091-3/+1
| | | | Notes: svn path=/head/; revision=141580
* Sort sections.Ruslan Ermilov2005-01-201-15/+15
| | | | Notes: svn path=/head/; revision=140505
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-11/+21
| | | | Notes: svn path=/head/; revision=131504
* The .Fn functionPhilippe Charnier2003-06-081-2/+5
| | | | Notes: svn path=/head/; revision=116027
* Add a new hash type. This "NT-hash" is compatible with the passwordMark Murray2003-06-021-3/+16
| | | | | | | | | | hashing scheme used in Microsoft's NT machines. IT IS NOT SECURE! DON'T USE IT! This is for the use of competent sysadmins only! Submitted by: Michael Bretterklieber Notes: svn path=/head/; revision=115720
* english(4) police.Jens Schweikhardt2002-12-271-1/+1
| | | | Notes: svn path=/head/; revision=108317
* crypt(3) incorrectly documents md5 salt, fixed.Tom Rhodes2002-04-091-1/+1
| | | | | | | | | PR: 36782 No objections from: ru MFC after: 3 days Notes: svn path=/head/; revision=94318
* s/crypt_format/crypt_default/ to match reality.Ruslan Ermilov2001-12-131-1/+1
| | | | | | | | PR: docs/32787 Spotted by: Pete Carah <pete@altadena.net> Notes: svn path=/head/; revision=87788
* mdoc(7) police: Use the new .In macro for #include statements.Ruslan Ermilov2001-10-011-1/+1
| | | | Notes: svn path=/head/; revision=84306
* Remove out-of-date "cannot be exported from USA" notice.Mark Murray2001-08-151-2/+0
| | | | Notes: svn path=/head/; revision=81733
* Remove whitespace at EOL.Dima Dorfman2001-07-151-1/+1
| | | | Notes: svn path=/head/; revision=79754
* mdoc(7) police: removed punctuation after the last SEE ALSO xref.Ruslan Ermilov2001-07-101-1/+1
| | | | Notes: svn path=/head/; revision=79557
* mdoc(7) police: removed HISTORY info from the .Os call.Ruslan Ermilov2001-07-101-1/+1
| | | | Notes: svn path=/head/; revision=79531
* mdoc(7) police: remove extraneous .Pp before and/or after .Sh.Dima Dorfman2001-07-091-1/+0
| | | | Notes: svn path=/head/; revision=79454
* Remove duplicate words.Dima Dorfman2001-06-241-2/+2
| | | | Notes: svn path=/head/; revision=78686
* mdoc(7) police: ``It'' macro does not take argument in -enum lists.Ruslan Ermilov2001-03-161-2/+2
| | | | | | | | | | (In -mdocNG, this only causes warning. In current implementation, it is fatal.) Pointy hat to: markm (for not checking stderr) Notes: svn path=/head/; revision=74339
* Add OpenBSD-style blowfish password hashing. This makes one lessMark Murray2001-03-111-5/+13
| | | | | | | | | | | | | 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 <provos@physnet.uni-hamburg.de>/OpenBSD Submitted by: Paul Herman <pherman@frenchfries.net> Notes: svn path=/head/; revision=74106
* Prepare for mdoc(7)NG.Ruslan Ermilov2000-12-291-2/+2
| | | | Notes: svn path=/head/; revision=70481
* Reflect rev 1.18 in crypt.c. Note that this section is somewhatPeter Wemm2000-12-281-3/+5
| | | | | | | mangled and could do with some word-smithing. Notes: svn path=/head/; revision=70422
* Merge into a single US-exportable libcrypt, which only providesPeter Wemm2000-12-281-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | one-way hash functions for authentication purposes. There is no more "set the libcrypt->libXXXcrypt" nightmare. - Undo the libmd.so hack, use -D to hide the md5c.c internals. - Remove the symlink hacks in release/Makefile - the algorthm is set by set_crypt_format() as before. If this is not called, it tries to heuristically figure out the hash format, and if all else fails, it uses the optional auth.conf entry to chose the overall default hash. - Since source has non-hidden crypto in it there may be some issues with having the source it in some countries, so preserve the "secure/*" division. You can still build a des-free libcrypt library if you want to badly enough. This should not be a problem in the US or exporting from the US as freebsd.org had notified BXA some time ago. That makes this stuff re-exportable by anyone. - For consistancy, the default in absence of any other clues is md5. This is to try and minimize POLA across buildworld where folk may suddenly be activating des-crypt()-hash support. Since the des hash may not always be present, it seemed sensible to make the stronger md5 algorithm the default. All things being equal, no functionality is lost. Reviewed-by: jkh (flame-proof suit on) Notes: svn path=/head/; revision=70419
* logRuslan Ermilov2000-11-221-2/+3
| | | | Notes: svn path=/head/; revision=69026
* Add working and easy crypt(3)-switching. Yes, we need a whole new APIBrian Feldman2000-08-221-8/+43
| | | | | | | | | | | | | | | | | for crypt(3) by now. In any case: Add crypt_set_format(3) + documentation to -lcrypt. Add login_setcryptfmt(3) + documentation to -lutil. Support for switching crypt formats in passwd(8). Support for switching crypt formats in pw(8). The simple synopsis is: edit login.conf; add a passwd_format field set to "des" or "md5"; go nuts :) Reviewed by: peter Notes: svn path=/head/; revision=64918
* Oops, remove vestigial reference to SHS passwords.Kris Kennaway2000-04-221-3/+2
| | | | Notes: svn path=/head/; revision=59524
* Introduce .Lb macro to libcrypt manpage.Alexey Zelkin2000-04-221-19/+54
| | | | | | | | | | Make it more mdoc(7) compliant: . use .Tn for DES, MD5 andSHS. . Replace double quotes with .Dq macro . use An/Aq scheme for listing authors Notes: svn path=/head/; revision=59504
* A bunch of factual corrections.Mark Murray2000-01-181-7/+4
| | | | Notes: svn path=/head/; revision=56251
* Fixed missing include in synopsis.Bruce Evans2000-01-131-0/+1
| | | | Notes: svn path=/head/; revision=55897
* Fixed a formatting error in the prototype for crypt().Bruce Evans1999-12-231-2/+2
| | | | Notes: svn path=/head/; revision=55042
* Big code cleanup. (Inspired by Brandon Gillespie). Also move asMark Murray1999-09-201-0/+203
| | | | | | | much as possible away from secure/ to make extending easier. Notes: svn path=/head/; revision=51462
* The new crypt code broke "make world". Back it out.Mark Murray1999-01-231-201/+0
| | | | Notes: svn path=/head/; revision=43092
* Rewrite of crypt library to be more modular, and addition of theBrandon Gillespie1999-01-211-0/+201
Secure Hashing Algorithm - 1 (SHA-1), along with the further refinement of what $x$salt$hash means. With this new crypt the following are all acceptable: $1$ $MD5$ $SHA1$ Note: $2$ is used by OpenBSD's Blowfish, which I considered adding as $BF$, but there is no actual need for it with SHA-1. However, somebody wishing to add OpenBSD password support could easilly add it in now. There is also a malloc_crypt() available in the library now, which behaves exactly the same as crypt(), but it uses a malloced buffer instead of a static buffer. However, this is not standard so will likely not be used much (at all). Also, for those interested I did a brief speed test Pentium 166/MMX, which shows the DES crypt to do approximately 2640 crypts a CPU second, MD5 to do about 62 crypts a CPU second and SHA1 to do about 18 crypts a CPU second. Reviewed by: Mark Murray Notes: svn path=/head/; revision=42981