summaryrefslogtreecommitdiff
path: root/lib/libmd
Commit message (Collapse)AuthorAgeFilesLines
* MFC r314709,r314790,r314794:Bryan Drewery2017-03-221-0/+7
| | | | | | | | | | | | | | r314709: Fix bootstrapping mtree after r313404 for older systems. r314790: Added comments for why nmtree/libmd are bootstrapped. r314794: Fix bootstrapping libmd on older systems after r314709. PR: 217673 Notes: svn path=/stable/10/; revision=315731
* MFC r300903: Implement SHA-512 truncated (224 and 256 bits)Andriy Gapon2017-02-273-10/+76
| | | | Notes: svn path=/stable/10/; revision=314332
* MFC r285417: Add new include path for sha256.hAndriy Gapon2017-02-271-1/+2
| | | | Notes: svn path=/stable/10/; revision=314330
* MFC r292782: Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.cAndriy Gapon2017-02-275-423/+77
| | | | | | | | | | cperciva's libmd implementation is 5-30% faster The same was done for SHA256 previously in r263218 Approved by: secteam Notes: svn path=/stable/10/; revision=314327
* MFC r282774: Unbreak MIPS build following r282726 (MFCed in r314144)Andriy Gapon2017-02-237-4/+43
| | | | Notes: svn path=/stable/10/; revision=314184
* fixup r314143, MFC of r285366 didn't remove files that it should haveAndriy Gapon2017-02-232-393/+0
| | | | Notes: svn path=/stable/10/; revision=314182
* MFC r282736: Unbreak build following rev. 282726 (MFC-ed as r314144)Andriy Gapon2017-02-236-0/+130
| | | | Notes: svn path=/stable/10/; revision=314157
* MFC r282726: Ensure libmd symbols do not clash with libcryptoAndriy Gapon2017-02-2314-1/+195
| | | | | | | | | | | | | Add a prefix to all symbols in libmd to avoid incompatibilites with same-named, but not binary compatible, symbols from libcrypto. Also introduce Weak aliases to avoid the need to rebuild dependent binaries and a major version bump. PR: 199119 Notes: svn path=/stable/10/; revision=314144
* MFC r263215,r263218,r285366: replace the kernel sha256 codeAndriy Gapon2017-02-231-1/+1
| | | | | | | | | | | | | | | | | | r263215 copy these files from lib/libmd in preperation for moving these files into the kernel... r263218 replace the kernel's version w/ cperciva's implementation... r285366 Complete the move that was started w/ r263218.. Note that the last change is out of order with r282726 that I am going to merge as well. Many thanks to cperciva for the more efficient code and to jmg for integrating it into the kernel. Notes: svn path=/stable/10/; revision=314143
* MFC r281928:Enji Cooper2015-05-181-1/+1
| | | | | | | | | | | | | | | | | Avoid an infinite loop by ensuring that the amount of bytes read is greater than 0 in MDXFileChunk when calculating the checksum This edgecase can be triggered if the file is truncated while the checksum is being calculated (i.e. the EOF is reached) Differential Revision: https://reviews.freebsd.org/D2351 (patch by darius) PR: 196694 Reviewed by: delphij, ngie Submitted by: Daniel O'Connor <darius@dons.net.au> Sponsored by: EMC / Isilon Storage Division Notes: svn path=/stable/10/; revision=283054
* MFC r263863:Glen Barber2014-03-314-8/+4
| | | | | | | | | Dereference nonexistent md2(3) manual. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=263955
* Remove the RFC 1319 MD2 Message-Digest Algorithm routines from libmd.David E. O'Brien2012-04-285-309/+6
| | | | | | | | | | | | | 1. The licensing terms for the MD2 routines from RFC is not under a BSD-like license. Instead it is only granted for non-commercial Internet Privacy-Enhanced Mail. 2. MD2 is quite deprecated as it is no longer considered a cryptographically strong algorithm. Discussed with: so (cperciva), core Notes: svn path=/head/; revision=234746
* Rewrite HISTORY: The SHA256 code first appeared in 6.0, and the SHA512Colin Percival2011-06-272-2/+2
| | | | | | | code in 9.0; neither existed in FreeBSD 4.0. Notes: svn path=/head/; revision=223582
* Add SHA512 (Actually, this is Colin Percival's code for SHA256, withMark Murray2011-04-097-163/+705
| | | | | | | | | | | | | relevant constants changed). While I'm here clean up the tests and Makefile. PR: misc/124164 Submitted by: KIMURA Yasuhiro < yasu utahime org > MFC after: 1 month Notes: svn path=/head/; revision=220496
* Fix some leftover binaries and shared libraries in the system that stillDimitry Andric2011-02-151-2/+5
| | | | | | | | | | | | | | | | | | have an executable stack, due to linking in hand-assembled .S or .s files, that have no .GNU-stack sections: RWX --- --- /lib/libcrypto.so.6 RWX --- --- /lib/libmd.so.5 RWX --- --- /lib/libz.so.6 RWX --- --- /lib/libzpool.so.2 RWX --- --- /usr/lib/liblzma.so.5 These were found using scanelf, from the sysutils/pax-utils port. Reviewed by: kib Notes: svn path=/head/; revision=218723
* Build lib/ with WARNS=6 by default.Ed Schouten2010-01-021-0/+2
| | | | | | | | | | | | Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and lower it when needed. I'm setting WARNS?=0 for secure/. It seems secure/ includes the Makefile.inc provided by lib/. I'm not going to touch that directory. Most of the code there is contributed anyway. Notes: svn path=/head/; revision=201381
* Remove reference to no longer existing document.Poul-Henning Kamp2009-01-091-5/+0
| | | | | | | Spotted by: Bjoern Voigt <bjoern@cs.tu-berlin.de> Notes: svn path=/head/; revision=186941
* Make the "test" target test the compiled version, instead of thePoul-Henning Kamp2008-12-021-7/+7
| | | | | | | installed version of the md library. Notes: svn path=/head/; revision=185568
* Use unsigned comparisons. Prior to this commit, SHA1_Update andColin Percival2007-05-142-2/+4
| | | | | | | | | | | | | | | | | | | | | | RIPEMD160_Update were broken when all of the following conditions applied: (1) The platform is i386. (2) The program calling *_Update is statically linked to libmd. (3) The buffer provided to *_Update is aligned modulo 4 bytes. (4) The buffer extends beyond 2GB. Due to the design of this code, SHA1_Update and RIPEMD160_Update will still be broken if conditions (1)-(3) apply AND the buffer extends beyond 4GB (i.e., there is an integer overflow in computing "data + len"). Since this remaining bug simply replaces SIGSEGV with a bogus hash (and non-broken programs should never provide such operands) I don't consider it to be a serious problem. MFC After: 1 week PR: kern/102795 Notes: svn path=/head/; revision=169547
* Fix an 11 year old mistake: Let the hash functions take a void* insteadPoul-Henning Kamp2006-01-1714-28/+35
| | | | | | | of unsigned char* argument. Notes: svn path=/head/; revision=154479
* -mdoc sweep.Ruslan Ermilov2005-11-171-1/+1
| | | | Notes: svn path=/head/; revision=152551
* Correct type.Pawel Jakub Dawidek2005-09-141-4/+4
| | | | | | | OK'ed by: cperciva Notes: svn path=/head/; revision=150125
* Removed redundnt empty line.Ruslan Ermilov2005-06-161-1/+0
| | | | | | | Approved by: re (blanket) Notes: svn path=/head/; revision=147444
* Markup fixes.Ruslan Ermilov2005-06-161-1/+2
| | | | | | | Approved by: re Notes: svn path=/head/; revision=147434
* In light of the recent 2^69 operation collision-finding attack on SHA1,Colin Percival2005-03-095-6/+522
| | | | | | | | | | | add support for SHA256. Tested on: i386, sparc64 Tested using: NIST test vectors, built-in tests X-MFC-after: 5.4-RELEASE Notes: svn path=/head/; revision=143334
* The third parameter to SHA_Update and SHA1_Update is a "size_t", not aColin Percival2005-03-091-2/+2
| | | | | | | "unsigned int". Notes: svn path=/head/; revision=143326
* Expand contractions.Ruslan Ermilov2005-02-151-1/+1
| | | | Notes: svn path=/head/; revision=141946
* Expand *n't contractions.Ruslan Ermilov2005-02-133-7/+7
| | | | Notes: svn path=/head/; revision=141846
* Sort sections.Ruslan Ermilov2005-01-203-9/+9
| | | | Notes: svn path=/head/; revision=140505
* Eliminate double whitespace.Ruslan Ermilov2004-07-032-2/+2
| | | | Notes: svn path=/head/; revision=131539
* Backed out rev.1.6 and subsequent copying of it (bogus addition ofBruce Evans2004-02-261-6/+6
| | | | | | | | | | | | | | | | -static to CFLAGS). It just turned rev.1.5 into an obfuscated no-op. As explained in the log for rev.1.5, testing should be done in the host environment but there is a problem in cross-compilation environments. As not explained in the log for rev.1.6, there was apparently a practical problem with cross-compiling (makeworld should have set -static in LDFLAGS but apparently didn't). Cross-compilation was especially complicated because the relevant programs are test programs that were run at beforeinstall time -- dynamic libraries might or might not exist depending on the build options. The complications became moot in rev.1.8 when beforeinstall was renamed "test". Notes: svn path=/head/; revision=126267
* Assorted mdoc(7) fixes:Hiten Pandya2003-10-093-20/+41
| | | | | | | | | | | | | - fix hard sentence breaks - sprinkle a few .Vt's where neccessary - remove incorrect use of `\-' - proper quoting using .Dq, instead of manual ``...'' Approved by: des@ (mentor) Reviewed by: ru@ Notes: svn path=/head/; revision=120957
* style.Makefile(5)David E. O'Brien2003-08-181-1/+1
| | | | Notes: svn path=/head/; revision=119071
* Stage 3 of dynamic root support. Make all the libraries needed to runGordon Tetlow2003-08-171-0/+1
| | | | | | | | | binaries in /bin and /sbin installed in /lib. Only the versioned files reside in /lib, the .so symlink continues to live /usr/lib so the toolchain doesn't need to be modified. Notes: svn path=/head/; revision=119017
* Rename local variables to not mask global names of same name. ThisMark Murray2003-06-053-28/+29
| | | | | | | fixes lots of lint(1) warnings. Notes: svn path=/head/; revision=115872
* The .Fn functionPhilippe Charnier2003-03-242-9/+18
| | | | Notes: svn path=/head/; revision=112541
* Initiate deorbit burn for the i386-only a.out related support. Moves arePeter Wemm2002-09-171-2/+0
| | | | | | | | | | | | | | | | | | under way to move the remnants of the a.out toolchain to ports. As the comment in src/Makefile said, this stuff is deprecated and one should not expect this to remain beyond 4.0-REL. It has already lasted WAY beyond that. Notable exceptions: gcc - I have not touched the a.out generation stuff there. ldd/ldconfig - still have some code to interface with a.out rtld. old as/ld/etc - I have not removed these yet, pending their move to ports. some includes - necessary for ldd/ldconfig for now. Tested on: i386 (extensively), alpha Notes: svn path=/head/; revision=103436
* Get this file closer to style(9).Poul-Henning Kamp2002-09-081-51/+55
| | | | Notes: svn path=/head/; revision=103098
* Fix a bug where calling MD5File(3) with a zero-length file generated anBruce A. Mah2002-09-061-0/+1
| | | | | | | | | error, due to an uninitialized variable. Reviewed by: phk, archie Notes: svn path=/head/; revision=103038
* Add missing const's.Maxime Henrion2002-06-241-1/+1
| | | | Notes: svn path=/head/; revision=98753
* Improve the handling of Encode and Decode operations in MD5.Poul-Henning Kamp2002-06-221-22/+15
| | | | | | | | | | | | | Use memcpy for all little-endian architectures, sys/kern/md5c.c indicates this should be safe for all currently supported LE archs. Change the Encode and Decode functions for other archs to use le32toh() and htole32() functions instead of explicit byte shuffling. On sparc64 this gives md5(1) about 8% speed increase. Notes: svn path=/head/; revision=98615
* Don't build manuals at inappropriate time.Ruslan Ermilov2002-04-101-13/+5
| | | | | | | Collapse generation of md[245].3 manpages. Notes: svn path=/head/; revision=94367
* Modernize my email address.Poul-Henning Kamp2002-03-253-4/+4
| | | | Notes: svn path=/head/; revision=93151
* Modernize my email address.Poul-Henning Kamp2002-03-251-1/+1
| | | | Notes: svn path=/head/; revision=93149
* Remove __P() usage.David E. O'Brien2002-03-211-1/+1
| | | | Notes: svn path=/head/; revision=92917
* Remove 'register' keyword.David E. O'Brien2002-03-213-15/+15
| | | | Notes: svn path=/head/; revision=92913
* mdoc(7) police: Use the new .In macro for #include statements.Ruslan Ermilov2001-10-013-6/+6
| | | | Notes: svn path=/head/; revision=84306
* add __FBSDID()s to libmdMatthew Dillon2001-09-3010-14/+30
| | | | Notes: svn path=/head/; revision=84211
* mdoc(7) police:Ruslan Ermilov2001-08-071-1/+2
| | | | | | | | | | Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text. Not only this slows down the mdoc(7) processing significantly, but it also has an undesired (in this case) effect of disabling hyphenation within the entire enclosed block. Notes: svn path=/head/; revision=81251
* Remove whitespace at EOL.Dima Dorfman2001-07-153-13/+13
| | | | Notes: svn path=/head/; revision=79754