aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/check/sha256.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-02-14Fix SHA-256 authors.Lasse Collin1-10/+4
The initial commit 5d018dc03549c1ee4958364712fb0c94e1bf2741 in 2007 had a comment in sha256.c that the code is based on Crypto++ Library 5.5.1. In 2009 the Authors list in sha256.c and the AUTHORS file was updated with information that the code had come from Crypto++ but via 7-Zip. I know I had viewed 7-Zip's SHA-256 code but back then the C code has been identical enough with Crypto++, so I don't why I thought the author info would need that extra step via 7-Zip for this single file. Another error is that I had mixed sha.* and shacal2.* files when checking for author info in Crypto++. The shacal2.* files aren't related to liblzma's sha256.c and thus Kevin Springle's code in Crypto++ isn't either.
2023-03-18Change a few HTTP URLs to HTTPS.Lasse Collin1-1/+1
The xz man page timestamp was intentionally left unchanged.
2014-08-03liblzma: SHA-256: Optimize the Maj macro slightly.Lasse Collin1-1/+1
The Maj macro is used where multiple things are added together, so making Maj a sum of two expressions allows some extra freedom for the compiler to schedule the instructions. I learned this trick from <http://www.hackersdelight.org/corres.txt>.
2014-08-03liblzma: SHA-256: Optimize the way rotations are done.Lasse Collin1-6/+11
This looks weird because the rotations become sequential, but it helps quite a bit on both 32-bit and 64-bit x86: - It requires fewer instructions on two-operand instruction sets like x86. - It requires one register less which matters especially on 32-bit x86. I hope this doesn't hurt other archs. I didn't invent this idea myself, but I don't remember where I saw it first.
2014-08-03liblzma: SHA-256: Remove the GCC #pragma that became unneeded.Lasse Collin1-5/+0
The unrolling in the previous commit should avoid the situation where a compiler may think that an uninitialized variable might be accessed.
2014-08-03liblzma: SHA-256: Unroll a little more.Lasse Collin1-9/+16
This way a branch isn't needed for each operation to choose between blk0 and blk2, and still the code doesn't grow as much as it would with full unrolling.
2014-08-03liblzma: SHA-256: Do the byteswapping without a temporary buffer.Lasse Collin1-12/+1
2014-01-12liblzma: Remove a useless C99ism from sha256.c.Lasse Collin1-1/+1
Unsurprisingly it makes no difference in compiled output.
2012-08-24A few typo fixes to comments and the xz man page.Lasse Collin1-1/+0
Thanks to Jim Meyering.
2011-04-05liblzma: Use TUKLIB_GNUC_REQ to check GCC version in sha256.c.Lasse Collin1-3/+3
2009-10-04Use a tuklib module for integer handling.Lasse Collin1-15/+3
This replaces bswap.h and integer.h. The tuklib module uses <byteswap.h> on GNU, <sys/endian.h> on *BSDs and <sys/byteorder.h> on Solaris, which may contain optimized code like inline assembly.
2009-05-02Use a GCC-specific #pragma instead of GCC-specificLasse Collin1-0/+5
-Wno-uninitialized to silence a bogus warning.
2009-04-13Put the interesting parts of XZ Utils into the public domain.Lasse Collin1-9/+14
Some minor documentation cleanups were made at the same time.
2008-08-28Sort of garbage collection commit. :-| Many things are stillLasse Collin1-16/+13
broken. API has changed a lot and it will still change a little more here and there. The command line tool doesn't have all the required changes to reflect the API changes, so it's easy to get "internal error" or trigger assertions.
2008-06-18Update the code to mostly match the new simpler file formatLasse Collin1-25/+28
specification. Simplify things by removing most of the support for known uncompressed size in most places. There are some miscellaneous changes here and there too. The API of liblzma has got many changes and still some more will be done soon. While most of the code has been updated, some things are not fixed (the command line tool will choke with invalid filter chain, if nothing else). Subblock filter is somewhat broken for now. It will be updated once the encoded format of the Subblock filter has been decided.
2007-12-09Imported to git.Lasse Collin1-0/+203