sha1dc: add collision-detecting sha1 implementation
authorJeff King <peff@peff.net>
Thu, 16 Mar 2017 22:07:31 +0000 (18:07 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Mar 2017 22:16:40 +0000 (15:16 -0700)
commit28dc98e343ca4eb370a29ceec4c19beac9b5c01e
tree5624dd8c50f29c6781d5225f9b757926c695e07d
parentf18f816cb1586e9aab3e30a7144768e0d282d305
sha1dc: add collision-detecting sha1 implementation

This is pulled straight from:

  https://github.com/cr-marcstevens/sha1collisiondetection

with no modifications yet (though I've pulled in only the
subset of files necessary for Git to use).

This is commit 007905a93c973f55b2daed6585f9f6c23545bf66.

Further updates can be done like:

  git checkout -b vendor-sha1dc $this_commit
  cp /path/to/sha1dc/{LICENSE.txt,lib/*} sha1dc/
  git add -A sha1dc
  git commit -m "update sha1dc"

  git checkout -b update-sha1dc origin
  git merge vendor-sha1dc

Thanks to both Marc and Dan for making the code fit our
needs by doing both optimization work, cutting down on the
object size, and doing some syntactic changes to work better
with git. And to Linus for kicking off the "diet" work that
removed some of the unused code.

The license of the sha1dc code is the MIT license, which is
obviously compatible with the GPLv2 of git.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1dc/LICENSE.txt [new file with mode: 0644]
sha1dc/sha1.c [new file with mode: 0644]
sha1dc/sha1.h [new file with mode: 0644]
sha1dc/ubc_check.c [new file with mode: 0644]
sha1dc/ubc_check.h [new file with mode: 0644]