Skip to contentSkip to conversation

Update sha1dc from upstream & optionally make it a submodule

PATCH Superseded Ævar Arnfjörð Bjarmason 3 participants 20 messages May 18, 2017 – May 25, 2017 Kbuild

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Update sha1dc from upstream & optionally make it a submodule

This series:

Ævar Arnfjörð Bjarmason (3):
sha1dc: update from upstream

* Fixes the Big-Endian detection on Solaris SPARC (and probably others) which broke the build as of 2.13.0 due to sha1dc being the dauflt.

* Includes a patch from upstream fixing unaligned access, which broke SPARC even more. This replaces Junio's "[PATCH] sha1dc: fix issues with a big endian platform" (<[email protected]>) with something which brings in upstream as-is.

* Most importantly: Uses upstream code as-is with no modifications, which is possible due to a pull request I sent them.

* This patch can be picked stand-alone without [23]/3.

sha1dc: use sha1collisiondetection as a submodule

* Since we can now use upstream code as-is let's use it as a submodule.

Yes there are still (solvable) UX issues with submodules, but there's no project better equipped to deal with them than git.git.

sha1dc: remove the unused sha1dc/ directory

* Sent as a separate patch for readability. Can be squashed into

     2/3.
 .gitmodules            |   4 +
 Makefile               |  13 +-
 hash.h                 |   2 +-
 sha1collisiondetection |   1 +
 sha1dc/LICENSE.txt     |  30 ----
 sha1dc/sha1.c          |  99 +++++++++-----
 sha1dc/sha1.h          | 122 -----------------
 sha1dc/ubc_check.c     | 363 -------------------------------------------------
 sha1dc/ubc_check.h     |  44 ------
 sha1dc_git.c           |  24 ++++
 sha1dc_git.h           |  19 +++
 11 files changed, 124 insertions(+), 597 deletions(-)
 create mode 100644 .gitmodules
 create mode 160000 sha1collisiondetection
 delete mode 100644 sha1dc/LICENSE.txt
 delete mode 100644 sha1dc/sha1.h
 delete mode 100644 sha1dc/ubc_check.c
 delete mode 100644 sha1dc/ubc_check.h
 create mode 100644 sha1dc_git.c
 create mode 100644 sha1dc_git.h
Signature · 1 line
2.13.0.303.g4ebf302169
#1 lore raw

PATCH 1/3 sha1dc: update from upstream

Update sha1dc from the latest version by the upstream maintainer[1].

This version includes a commit of mine which allows for replacing the local modifications done to the upstream files in git.git with macro definitions to monkeypatch it in place.

It also brings in a change[2] upstream made for the breakage 2.13.0 introduced on SPARC and other platforms that forbid unaligned access[3].

This means that the code customizations done since the initial import in commit 28dc98e343 ("sha1dc: add collision-detecting sha1 implementation", 2017-03-16) can be done purely via Makefile definitions and by including the content of our own sha1dc_git.[ch] in sha1dc/sha1.c via a macro.

1. https://github.com/cr-marcstevens/sha1collisiondetection/commit/b45fcefc71270d9a159028c22e6d36c3817da188
2. https://github.com/cr-marcstevens/sha1collisiondetection/commit/33a694a9ee1b79c24be45f9eab5ac0e1aeeaf271
3. "Git 2.13.0 segfaults on Solaris SPARC due to DC_SHA1=YesPlease
being on by default"
(https://public-inbox.org/git/CACBZZX6nmKK8af0-UpjCKWV4R+hV-uk2xWXVA5U+_UQ3VXU03g@mail.gmail.com/)

---
 Makefile           |  9 ++++-
 sha1dc/sha1.c      | 99 +++++++++++++++++++++++++++++++++++-------------------
 sha1dc/sha1.h      | 92 ++++++++++++++++++++++----------------------------
 sha1dc/ubc_check.c | 13 +++++--
 sha1dc/ubc_check.h | 14 ++++++--
 sha1dc_git.c       | 24 +++++++++++++
 sha1dc_git.h       | 19 +++++++++++
 7 files changed, 178 insertions(+), 92 deletions(-)
 create mode 100644 sha1dc_git.c
 create mode 100644 sha1dc_git.h
Makefile +8 -1
index e35542e631..ffa6da71b7 100644
@@ -1414,7 +1414,14 @@ else
 	DC_SHA1 := YesPlease
 	LIB_OBJS += sha1dc/sha1.o
 	LIB_OBJS += sha1dc/ubc_check.o
-	BASIC_CFLAGS += -DSHA1_DC
+	BASIC_CFLAGS += \
+		-DSHA1_DC \
+		-DSHA1DC_NO_STANDARD_INCLUDES \
+		-DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 \
+		-DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" \
+		-DSHA1DC_CUSTOM_TRAILING_INCLUDE_SHA1_C="\"sha1dc_git.c\"" \
+		-DSHA1DC_CUSTOM_TRAILING_INCLUDE_SHA1_H="\"sha1dc_git.h\"" \
+		-DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\""
 endif
 endif
 endif
sha1dc/sha1.c +65 -34

165 lines not on this page · raw message

sha1dc/sha1.h +40 -52

137 lines not on this page · raw message

sha1dc/ubc_check.c +11 -2
index 089dd4743d..b3beff2afb 100644
@@ -24,8 +24,13 @@
 // ubc_check has been verified against ubc_check_verify using the 'ubc_check_test' program in the tools section
 */
 
-#include "git-compat-util.h"
-#include "sha1dc/ubc_check.h"
+#ifndef SHA1DC_NO_STANDARD_INCLUDES
+#include <stdint.h>
+#endif
+#ifdef SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C
+#include SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C
+#endif
+#include "ubc_check.h"
 
 static const uint32_t DV_I_43_0_bit 	= (uint32_t)(1) << 0;
 static const uint32_t DV_I_44_0_bit 	= (uint32_t)(1) << 1;
@@ -361,3 +366,7 @@ if (mask) {
 
 	dvmask[0]=mask;
 }
+
+#ifdef SHA1DC_CUSTOM_TRAILING_INCLUDE_UBC_CHECK_C
+#include SHA1DC_CUSTOM_TRAILING_INCLUDE_UBC_CHECK_C
+#endif
sha1dc/ubc_check.h +11 -3
index b64c306d77..d7e17dc734 100644
@@ -20,13 +20,17 @@
 // thus one needs to do the recompression check for each DV that has its bit set
 */
 
-#ifndef UBC_CHECK_H
-#define UBC_CHECK_H
+#ifndef SHA1DC_UBC_CHECK_H
+#define SHA1DC_UBC_CHECK_H
 
 #if defined(__cplusplus)
 extern "C" {
 #endif
 
+#ifndef SHA1DC_NO_STANDARD_INCLUDES
+#include <stdint.h>
+#endif
+
 #define DVMASKSIZE 1
 typedef struct { int dvType; int dvK; int dvB; int testt; int maski; int maskb; uint32_t dm[80]; } dv_info_t;
 extern dv_info_t sha1_dvs[];
@@ -41,4 +45,8 @@ void ubc_check(const uint32_t W[80], uint32_t dvmask[DVMASKSIZE]);
 }
 #endif
 
-#endif /* UBC_CHECK_H */
+#ifdef SHA1DC_CUSTOM_TRAILING_INCLUDE_UBC_CHECK_H
+#include SHA1DC_CUSTOM_TRAILING_INCLUDE_UBC_CHECK_H
+#endif
+
+#endif
sha1dc_git.c new file +24 -0
new file mode 100644
index 0000000000..4d32b4f77e
@@ -0,0 +1,24 @@
+/*
+ * This code is included at the end of sha1dc/sha1.c with the
+ * SHA1DC_CUSTOM_TRAILING_INCLUDE_SHA1_C macro.
+ */
+
+void git_SHA1DCFinal(unsigned char hash[20], SHA1_CTX *ctx)
+{
+	if (!SHA1DCFinal(hash, ctx))
+		return;
+	die("SHA-1 appears to be part of a collision attack: %s",
+	    sha1_to_hex(hash));
+}
+
+void git_SHA1DCUpdate(SHA1_CTX *ctx, const void *vdata, unsigned long len)
+{
+	const char *data = vdata;
+	/* We expect an unsigned long, but sha1dc only takes an int */
+	while (len > INT_MAX) {
+		SHA1DCUpdate(ctx, data, INT_MAX);
+		data += INT_MAX;
+		len -= INT_MAX;
+	}
+	SHA1DCUpdate(ctx, data, len);
+}
sha1dc_git.h new file +19 -0
new file mode 100644
index 0000000000..a8a5c1da16
@@ -0,0 +1,19 @@
+/*
+ * This code is included at the end of sha1dc/sha1.h with the
+ * SHA1DC_CUSTOM_TRAILING_INCLUDE_SHA1_H macro.
+ */
+
+/*
+ * Same as SHA1DCFinal, but convert collision attack case into a verbose die().
+ */
+void git_SHA1DCFinal(unsigned char [20], SHA1_CTX *);
+
+/*
+ * Same as SHA1DCUpdate, but adjust types to match git's usual interface.
+ */
+void git_SHA1DCUpdate(SHA1_CTX *ctx, const void *data, unsigned long len);
+
+#define platform_SHA_CTX SHA1_CTX
+#define platform_SHA1_Init SHA1DCInit
+#define platform_SHA1_Update git_SHA1DCUpdate
+#define platform_SHA1_Final git_SHA1DCFinal
Signature · 1 line
2.13.0.303.g4ebf302169
#2 lore raw

PATCH 2/3 sha1dc: use sha1collisiondetection as a submodule

In reply to Ævar Arnfjörð Bjarmason

Replace the forked sha1dc directory with a copy of the upstream code imported as a submodule. This is the exact same code as now exists in the sha1dc/ directory.

The initial reason for copy/pasting the code into sha1dc and locally modifying it was that it needed to be altered to work with the git project.

The upstream project has accepted my code changes to allow us to use their code as-is, see the preceding commit for details. So import the code as a submodule instead, this will make it easier to keep up-to-date with any upstream fixes or improvements.

---
 .gitmodules            | 4 ++++
 Makefile               | 4 ++--
 hash.h                 | 2 +-
 sha1collisiondetection | 1 +
 4 files changed, 8 insertions(+), 3 deletions(-)
 create mode 100644 .gitmodules
 create mode 160000 sha1collisiondetection
.gitmodules new file +4 -0
new file mode 100644
index 0000000000..cbeebdab7a
@@ -0,0 +1,4 @@
+[submodule "sha1collisiondetection"]
+	path = sha1collisiondetection
+	url = https://github.com/cr-marcstevens/sha1collisiondetection.git
+	branch = master
Makefile +2 -2
index ffa6da71b7..d7f506e790 100644
@@ -1412,8 +1412,8 @@ ifdef APPLE_COMMON_CRYPTO
 	BASIC_CFLAGS += -DSHA1_APPLE
 else
 	DC_SHA1 := YesPlease
-	LIB_OBJS += sha1dc/sha1.o
-	LIB_OBJS += sha1dc/ubc_check.o
+	LIB_OBJS += sha1collisiondetection/lib/sha1.o
+	LIB_OBJS += sha1collisiondetection/lib/ubc_check.o
 	BASIC_CFLAGS += \
 		-DSHA1_DC \
 		-DSHA1DC_NO_STANDARD_INCLUDES \
hash.h +1 -1
index a11fc9233f..9d9892ac3e 100644
@@ -8,7 +8,7 @@
 #elif defined(SHA1_OPENSSL)
 #include <openssl/sha.h>
 #elif defined(SHA1_DC)
-#include "sha1dc/sha1.h"
+#include "sha1collisiondetection/lib/sha1.h"
 #else /* SHA1_BLK */
 #include "block-sha1/sha1.h"
 #endif
sha1collisiondetection new file +1 -0
new file mode 160000
index 0000000000..b45fcefc71
@@ -0,0 +1 @@
+Subproject commit b45fcefc71270d9a159028c22e6d36c3817da188
Signature · 1 line
2.13.0.303.g4ebf302169
#3 lore raw

Re: [PATCH 2/3] sha1dc: use sha1collisiondetection as a submodule

Quoted 14 lines · Ævar Arnfjörð Bjarmason

Replace the forked sha1dc directory with a copy of the upstream code imported as a submodule. This is the exact same code as now exists in the sha1dc/ directory.

The initial reason for copy/pasting the code into sha1dc and locally modifying it was that it needed to be altered to work with the git project.

The upstream project has accepted my code changes to allow us to use their code as-is, see the preceding commit for details. So import the code as a submodule instead, this will make it easier to keep up-to-date with any upstream fixes or improvements.

Quoted 8 lines
---
 .gitmodules            | 4 ++++
 Makefile               | 4 ++--
 hash.h                 | 2 +-
 sha1collisiondetection | 1 +
 4 files changed, 8 insertions(+), 3 deletions(-)
 create mode 100644 .gitmodules
 create mode 160000 sha1collisiondetection

I am not sure how prepared our .travis.yml is to deal with a submodule, I'd prefer to have this step broken down to two step process.

That is, [PATCH 2.1/3] first adds an otherwise unused submodule, so that people can optionally do "git submodule init && git submodule update" so that they can compare the contents of sha1dc/ that has been updated by [PATCH 1/3] with the up-to-date upstream. Then [PATCH 2.2/3] would update the Makefile and hash.h to use the code in the submodule.

I actually would want to see us proceed even more cautiously---if the latter-half, i.e. [PATCH 2.2/3], is arranged so that it uses the new sha1collisiondetection/ only when the submodule is initialized and populated, and otherwise it uses sha1dc/ as before, I would feel a lot safer. I wouldn't be this paranoid if this "let's start using submodule ourselves" were done to some optional corner (like compat/ or contrib/ somewhere), but this is the default hash function. I do want to have something like this to force us (and submodule folks) to get any kinks out, but I do not want to see many people not even be able to build while this new arrangement is eased in. Once people are comfortable with the new arrangement to use code from submodule, we can then take [PATCH 3/3] to remove the old sha1dc/ directory and the migration will be complete.

I also am not very happy with .gitmodules pointing at a single point of failure. It would be nice if you can arrange a couple of mirrors and have a comment in .gitmodules file to tell folks that they can use these alternates by insteadOf or some other mechanism.

Thanks.

#4 lore raw

v2 cover Update sha1dc from upstream & optionally make it a submodule

Quoted 36 lines · Junio C Hamano
Quoted 14 lines · Ævar Arnfjörð Bjarmason

Replace the forked sha1dc directory with a copy of the upstream code imported as a submodule. This is the exact same code as now exists in the sha1dc/ directory.

The initial reason for copy/pasting the code into sha1dc and locally modifying it was that it needed to be altered to work with the git project.

The upstream project has accepted my code changes to allow us to use their code as-is, see the preceding commit for details. So import the code as a submodule instead, this will make it easier to keep up-to-date with any upstream fixes or improvements.

Quoted 8 lines
---
 .gitmodules            | 4 ++++
 Makefile               | 4 ++--
 hash.h                 | 2 +-
 sha1collisiondetection | 1 +
 4 files changed, 8 insertions(+), 3 deletions(-)
 create mode 100644 .gitmodules
 create mode 160000 sha1collisiondetection

I am not sure how prepared our .travis.yml is to deal with a submodule, I'd prefer to have this step broken down to two step process.

That is, [PATCH 2.1/3] first adds an otherwise unused submodule, so that people can optionally do "git submodule init && git submodule update" so that they can compare the contents of sha1dc/ that has been updated by [PATCH 1/3] with the up-to-date upstream. Then [PATCH 2.2/3] would update the Makefile and hash.h to use the code in the submodule.

Quoted 13 lines

I actually would want to see us proceed even more cautiously---if the latter-half, i.e. [PATCH 2.2/3], is arranged so that it uses the new sha1collisiondetection/ only when the submodule is initialized and populated, and otherwise it uses sha1dc/ as before, I would feel a lot safer. I wouldn't be this paranoid if this "let's start using submodule ourselves" were done to some optional corner (like compat/ or contrib/ somewhere), but this is the default hash function. I do want to have something like this to force us (and submodule folks) to get any kinks out, but I do not want to see many people not even be able to build while this new arrangement is eased in. Once people are comfortable with the new arrangement to use code from submodule, we can then take [PATCH 3/3] to remove the old sha1dc/ directory and the migration will be complete.

Makes sense to take it slow. Hopefully this addresses your comments. I dropped the 3rd patch to remove sha1dc/ and the 2nd patch adds sha1collisiondetection/ as submodule, but it's not used unless you specify DC_SHA1_SUBMODULE in addition to DC_SHA1.

Both patches should be safe to include & not cause any disruption, but now those interested in making the submodule experience in git.git better can init/update & set DC_SHA1_SUBMODULE=Y to play with it.

Note that both patches update to a newer version of the upstream code. I sent them another pull request with some cleanups, one of which is to ignore .depends in their .gitignore file.

Quoted 4 lines

I also am not very happy with .gitmodules pointing at a single point of failure. It would be nice if you can arrange a couple of mirrors and have a comment in .gitmodules file to tell folks that they can use these alternates by insteadOf or some other mechanism.

I liked the suggestion to make the URL a relative path, but this would require you to maintain a mirror in the same places you push git.git to, is that something you'd be willing to do?

For now having no-mirror isn't a big issue with my new 2/2 since it'se something you have to opt-in to with a build flag, which I suspect only I/Brandon/Stefan & a few others will use.

Ævar Arnfjörð Bjarmason (2):
sha1dc: update from upstream
sha1dc: optionally use sha1collisiondetection as a submodule

 .gitmodules            |  4 +++
 Makefile               | 21 +++++++++++-
 hash.h                 |  4 +++
 sha1collisiondetection |  1 +
 sha1dc/sha1.c          | 91 +++++++++++++++++++++++++++++++++-----------------
 sha1dc/sha1.h          | 90 ++++++++++++++++++++++---------------------------
 sha1dc/ubc_check.c     | 13 ++++++--
 sha1dc/ubc_check.h     | 14 ++++++--
 sha1dc_git.c           | 24 +++++++++++++
 sha1dc_git.h           | 19 +++++++++++
 10 files changed, 193 insertions(+), 88 deletions(-)
 create mode 100644 .gitmodules
 create mode 160000 sha1collisiondetection
 create mode 100644 sha1dc_git.c
 create mode 100644 sha1dc_git.h
Signature · 1 line
2.13.0.303.g4ebf302169
#5 lore raw

PATCH v2 1/2 sha1dc: update from upstream

Update sha1dc from the latest version by the upstream maintainer[1].

This version includes a commit of mine which allows for replacing the local modifications done to the upstream files in git.git with macro definitions to monkeypatch it in place.

It also brings in a change[2] upstream made for the breakage 2.13.0 introduced on SPARC and other platforms that forbid unaligned access[3].

This means that the code customizations done since the initial import in commit 28dc98e343 ("sha1dc: add collision-detecting sha1 implementation", 2017-03-16) can be done purely via Makefile definitions and by including the content of our own sha1dc_git.[ch] in sha1dc/sha1.c via a macro.

1. https://github.com/cr-marcstevens/sha1collisiondetection/commit/cc465543b310e5f59a1d534381690052e8509b22
2. https://github.com/cr-marcstevens/sha1collisiondetection/commit/33a694a9ee1b79c24be45f9eab5ac0e1aeeaf271
3. "Git 2.13.0 segfaults on Solaris SPARC due to DC_SHA1=YesPlease
being on by default"
(https://public-inbox.org/git/CACBZZX6nmKK8af0-UpjCKWV4R+hV-uk2xWXVA5U+_UQ3VXU03g@mail.gmail.com/)

---
 Makefile           |  9 +++++-
 sha1dc/sha1.c      | 91 +++++++++++++++++++++++++++++++++++-------------------
 sha1dc/sha1.h      | 90 +++++++++++++++++++++++------------------------------
 sha1dc/ubc_check.c | 13 ++++++--
 sha1dc/ubc_check.h | 14 +++++++--
 sha1dc_git.c       | 24 ++++++++++++++
 sha1dc_git.h       | 19 ++++++++++++
 7 files changed, 172 insertions(+), 88 deletions(-)
 create mode 100644 sha1dc_git.c
 create mode 100644 sha1dc_git.h
Makefile +8 -1
index e35542e631..ffa6da71b7 100644
@@ -1414,7 +1414,14 @@ else
 	DC_SHA1 := YesPlease
 	LIB_OBJS += sha1dc/sha1.o
 	LIB_OBJS += sha1dc/ubc_check.o
-	BASIC_CFLAGS += -DSHA1_DC
+	BASIC_CFLAGS += \
+		-DSHA1_DC \
+		-DSHA1DC_NO_STANDARD_INCLUDES \
+		-DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 \
+		-DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" \
+		-DSHA1DC_CUSTOM_TRAILING_INCLUDE_SHA1_C="\"sha1dc_git.c\"" \
+		-DSHA1DC_CUSTOM_TRAILING_INCLUDE_SHA1_H="\"sha1dc_git.h\"" \
+		-DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\""
 endif
 endif
 endif
sha1dc/sha1.c +60 -31

150 lines not on this page · raw message

sha1dc/sha1.h +39 -51

134 lines not on this page · raw message

sha1dc/ubc_check.c +11 -2
index 089dd4743d..b3beff2afb 100644
@@ -24,8 +24,13 @@
 // ubc_check has been verified against ubc_check_verify using the 'ubc_check_test' program in the tools section
 */
 
-#include "git-compat-util.h"
-#include "sha1dc/ubc_check.h"
+#ifndef SHA1DC_NO_STANDARD_INCLUDES
+#include <stdint.h>
+#endif
+#ifdef SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C
+#include SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C
+#endif
+#include "ubc_check.h"
 
 static const uint32_t DV_I_43_0_bit 	= (uint32_t)(1) << 0;
 static const uint32_t DV_I_44_0_bit 	= (uint32_t)(1) << 1;
@@ -361,3 +366,7 @@ if (mask) {
 
 	dvmask[0]=mask;
 }
+
+#ifdef SHA1DC_CUSTOM_TRAILING_INCLUDE_UBC_CHECK_C
+#include SHA1DC_CUSTOM_TRAILING_INCLUDE_UBC_CHECK_C
+#endif
sha1dc/ubc_check.h +11 -3
index b64c306d77..d7e17dc734 100644
@@ -20,13 +20,17 @@
 // thus one needs to do the recompression check for each DV that has its bit set
 */
 
-#ifndef UBC_CHECK_H
-#define UBC_CHECK_H
+#ifndef SHA1DC_UBC_CHECK_H
+#define SHA1DC_UBC_CHECK_H
 
 #if defined(__cplusplus)
 extern "C" {
 #endif
 
+#ifndef SHA1DC_NO_STANDARD_INCLUDES
+#include <stdint.h>
+#endif
+
 #define DVMASKSIZE 1
 typedef struct { int dvType; int dvK; int dvB; int testt; int maski; int maskb; uint32_t dm[80]; } dv_info_t;
 extern dv_info_t sha1_dvs[];
@@ -41,4 +45,8 @@ void ubc_check(const uint32_t W[80], uint32_t dvmask[DVMASKSIZE]);
 }
 #endif
 
-#endif /* UBC_CHECK_H */
+#ifdef SHA1DC_CUSTOM_TRAILING_INCLUDE_UBC_CHECK_H
+#include SHA1DC_CUSTOM_TRAILING_INCLUDE_UBC_CHECK_H
+#endif
+
+#endif
sha1dc_git.c new file +24 -0
new file mode 100644
index 0000000000..4d32b4f77e
@@ -0,0 +1,24 @@
+/*
+ * This code is included at the end of sha1dc/sha1.c with the
+ * SHA1DC_CUSTOM_TRAILING_INCLUDE_SHA1_C macro.
+ */
+
+void git_SHA1DCFinal(unsigned char hash[20], SHA1_CTX *ctx)
+{
+	if (!SHA1DCFinal(hash, ctx))
+		return;
+	die("SHA-1 appears to be part of a collision attack: %s",
+	    sha1_to_hex(hash));
+}
+
+void git_SHA1DCUpdate(SHA1_CTX *ctx, const void *vdata, unsigned long len)
+{
+	const char *data = vdata;
+	/* We expect an unsigned long, but sha1dc only takes an int */
+	while (len > INT_MAX) {
+		SHA1DCUpdate(ctx, data, INT_MAX);
+		data += INT_MAX;
+		len -= INT_MAX;
+	}
+	SHA1DCUpdate(ctx, data, len);
+}
sha1dc_git.h new file +19 -0
new file mode 100644
index 0000000000..a8a5c1da16
@@ -0,0 +1,19 @@
+/*
+ * This code is included at the end of sha1dc/sha1.h with the
+ * SHA1DC_CUSTOM_TRAILING_INCLUDE_SHA1_H macro.
+ */
+
+/*
+ * Same as SHA1DCFinal, but convert collision attack case into a verbose die().
+ */
+void git_SHA1DCFinal(unsigned char [20], SHA1_CTX *);
+
+/*
+ * Same as SHA1DCUpdate, but adjust types to match git's usual interface.
+ */
+void git_SHA1DCUpdate(SHA1_CTX *ctx, const void *data, unsigned long len);
+
+#define platform_SHA_CTX SHA1_CTX
+#define platform_SHA1_Init SHA1DCInit
+#define platform_SHA1_Update git_SHA1DCUpdate
+#define platform_SHA1_Final git_SHA1DCFinal
Signature · 1 line
2.13.0.303.g4ebf302169
#6 lore raw

PATCH v2 2/2 sha1dc: optionally use sha1collisiondetection as a submodule

In reply to Ævar Arnfjörð Bjarmason

Add an option to use the sha1collisiondetection library from the submodule in sha1collisiondetection/ instead of in the copy in the sha1dc/ directory.

This allows us to try out the submodule in sha1collisiondetection without breaking the build for anyone who's not expecting them as we work out any kinks.

---
 .gitmodules            |  4 ++++
 Makefile               | 12 ++++++++++++
 hash.h                 |  4 ++++
 sha1collisiondetection |  1 +
 4 files changed, 21 insertions(+)
 create mode 100644 .gitmodules
 create mode 160000 sha1collisiondetection
.gitmodules new file +4 -0
new file mode 100644
index 0000000000..cbeebdab7a
@@ -0,0 +1,4 @@
+[submodule "sha1collisiondetection"]
+	path = sha1collisiondetection
+	url = https://github.com/cr-marcstevens/sha1collisiondetection.git
+	branch = master
Makefile +12 -0
index ffa6da71b7..6baad1669e 100644
@@ -144,6 +144,12 @@ all::
 # algorithm. This is slower, but may detect attempted collision attacks.
 # Takes priority over other *_SHA1 knobs.
 #
+# Define DC_SHA1_SUBMODULE in addition to DC_SHA1 to use the
+# sha1collisiondetection shipped as a submodule instead of the
+# non-submodule copy in sha1dc/. This is an experimental option used
+# by the git project to migrate to using sha1collisiondetection as a
+# submodule.
+#
 # Define OPENSSL_SHA1 environment variable when running make to link
 # with the SHA1 routine from openssl library.
 #
@@ -1412,8 +1418,14 @@ ifdef APPLE_COMMON_CRYPTO
 	BASIC_CFLAGS += -DSHA1_APPLE
 else
 	DC_SHA1 := YesPlease
+ifdef DC_SHA1_SUBMODULE
+	LIB_OBJS += sha1collisiondetection/lib/sha1.o
+	LIB_OBJS += sha1collisiondetection/lib/ubc_check.o
+	BASIC_CFLAGS += -DDC_SHA1_SUBMODULE
+else
 	LIB_OBJS += sha1dc/sha1.o
 	LIB_OBJS += sha1dc/ubc_check.o
+endif
 	BASIC_CFLAGS += \
 		-DSHA1_DC \
 		-DSHA1DC_NO_STANDARD_INCLUDES \
hash.h +4 -0
index a11fc9233f..bef3e630a0 100644
@@ -8,7 +8,11 @@
 #elif defined(SHA1_OPENSSL)
 #include <openssl/sha.h>
 #elif defined(SHA1_DC)
+#ifdef DC_SHA1_SUBMODULE
+#include "sha1collisiondetection/lib/sha1.h"
+#else
 #include "sha1dc/sha1.h"
+#endif
 #else /* SHA1_BLK */
 #include "block-sha1/sha1.h"
 #endif
sha1collisiondetection new file +1 -0
new file mode 160000
index 0000000000..cc465543b3
@@ -0,0 +1 @@
+Subproject commit cc465543b310e5f59a1d534381690052e8509b22
Signature · 1 line
2.13.0.303.g4ebf302169
#7 lore raw

Re: [PATCH v2 2/2] sha1dc: optionally use sha1collisiondetection as a submodule

Review

Quoted 6 lines · Ævar Arnfjörð Bjarmason
(quoted diff) +6 -0
+# Define DC_SHA1_SUBMODULE in addition to DC_SHA1 to use the
+# sha1collisiondetection shipped as a submodule instead of the
+# non-submodule copy in sha1dc/. This is an experimental option used
+# by the git project to migrate to using sha1collisiondetection as a
+# submodule.
+#

Yup, thanks.

I actually was envisioning something like this instead, though.

Makefile +4 -0
index 6baad1669e..8d33936a12 100644
@@ -989,6 +989,10 @@ EXTLIBS =
 
 GIT_USER_AGENT = git/$(GIT_VERSION)
 
+ifeq ($(wildcard sha1collisiondetection/lib/sha1.h),sha1collisiondetection/lib/sha1.h)
+DC_SHA1_SUBMODULE = auto
+endif
+
 include config.mak.uname
 -include config.mak.autogen
 -include config.mak

That way, a user can say "git submodule init/update" it to use it, and deinit it to use the frozen version.

But when somebody (like me?) feels strongly enough, such a change can always come on top of this patch, so let's have this manual-configuration-only version as our first step.

Thanks.

#8 lore raw

Re: [PATCH v2 2/2] sha1dc: optionally use sha1collisiondetection as a submodule

Quoted 3 lines · Junio C Hamano

But when somebody (like me?) feels strongly enough, such a change can always come on top of this patch, so let's have this manual-configuration-only version as our first step.

Just so that I have something I can come back to, here it is with a log message.

-- >8 --
Subject: [PATCH] sha1collisiondetection: automatically enable when submodule is populated

If a user wants to experiment with the version of collision detecting sha1 from the submodule, the user needed to not just populate the submodule but also needed to turn the knob.

A Makefile trick is easy enough to do so, so let's do this. When somebody with a copy of the submodule populated wants not to use it, that can be done by overriding it in config.mak or from the command line, e.g. "make DC_SHA1_SUBMODULE= all".

---
 Makefile | 4 ++++
 1 file changed, 4 insertions(+)
Makefile +4 -0
index 6baad1669e..8d33936a12 100644
@@ -989,6 +989,10 @@ EXTLIBS =
 
 GIT_USER_AGENT = git/$(GIT_VERSION)
 
+ifeq ($(wildcard sha1collisiondetection/lib/sha1.h),sha1collisiondetection/lib/sha1.h)
+DC_SHA1_SUBMODULE = auto
+endif
+
 include config.mak.uname
 -include config.mak.autogen
 -include config.mak
Signature · 1 line
2.13.0-440-g3ce6d2d5b8
#9 lore raw

Re: [PATCH v2 2/2] sha1dc: optionally use sha1collisiondetection as a submodule

Quoted 31 lines · Junio C Hamano
Quoted 3 lines · Junio C Hamano

But when somebody (like me?) feels strongly enough, such a change can always come on top of this patch, so let's have this manual-configuration-only version as our first step.

Just so that I have something I can come back to, here it is with a log message.

-- >8 --
Subject: [PATCH] sha1collisiondetection: automatically enable when submodule is populated

If a user wants to experiment with the version of collision detecting sha1 from the submodule, the user needed to not just populate the submodule but also needed to turn the knob.

A Makefile trick is easy enough to do so, so let's do this. When somebody with a copy of the submodule populated wants not to use it, that can be done by overriding it in config.mak or from the command line, e.g. "make DC_SHA1_SUBMODULE= all".

---
 Makefile | 4 ++++
 1 file changed, 4 insertions(+)
Makefile +0 -0
index 6baad1669e..8d33936a12 100644

Makefile EXTLIBS = · line 998

Quoted 10 lines
Makefile +4 -0
@@ -989,6 +989,10 @@ EXTLIBS =
 
 GIT_USER_AGENT = git/$(GIT_VERSION)
 
+ifeq ($(wildcard sha1collisiondetection/lib/sha1.h),sha1collisiondetection/lib/sha1.h)
+DC_SHA1_SUBMODULE = auto
+endif
+
 include config.mak.uname
 -include config.mak.autogen
 -include config.mak

I thought this should have something like this:

Makefile +1 -0
index 8d33936a12..bbcac648a4 100644
@@ -989,9 +989,11 @@ EXTLIBS =
 
 GIT_USER_AGENT = git/$(GIT_VERSION)
 
+ifndef DC_SHA1_SUBMODULE
 ifeq ($(wildcard

sha1collisiondetection/lib/sha1.h),sha1collisiondetection/lib/sha1.h)
DC_SHA1_SUBMODULE = auto
endif
+endif

include config.mak.uname
-include config.mak.autogen

I.e. so using sha1dc via DC_SHA1_SUBMODULE= even with the submodule checked-out would work, but experimenting with it now that seems to do the right thing, even though this is set unconditionally. There must be some Makefile magic I'm missing here.

But in any case it would make sense to squash something like this into your patch:

Makefile +2 -1
index 8d33936a12..4d9c49ae17 100644
@@ -148,7 +148,8 @@ all::
 # sha1collisiondetection shipped as a submodule instead of the
 # non-submodule copy in sha1dc/. This is an experimental option used
 # by the git project to migrate to using sha1collisiondetection as a
-# submodule.
+# submodule. Supplied implicitly if the sha1collisiondetection/
+# directory is found to be populated.
 #
 # Define OPENSSL_SHA1 environment variable when running make to link
 # with the SHA1 routine from openssl library.
#10 lore raw

Re: [PATCH v2 2/2] sha1dc: optionally use sha1collisiondetection as a submodule

Quoted 4 lines · Ævar Arnfjörð Bjarmason

I thought this should have something like this:
...
the right thing, even though this is set unconditionally. There must be some Makefile magic I'm missing here.

The magic you are missing is that to ifdef in $(MAKE), a variable that is not mentioned (undefined) and set to empty string are both the same. You'll fall into its else clause.

Quoted 8 lines

But in any case it would make sense to squash something like this into your patch:

Makefile +0 -0
index 8d33936a12..4d9c49ae17 100644

Makefile all:: · line 152

Quoted 6 lines
Makefile +2 -1
@@ -148,7 +148,8 @@ all::
 # sha1collisiondetection shipped as a submodule instead of the
 # non-submodule copy in sha1dc/. This is an experimental option used
 # by the git project to migrate to using sha1collisiondetection as a
-# submodule.
+# submodule. Supplied implicitly if the sha1collisiondetection/
+# directory is found to be populated.

Yeah, if it is populated, defaults to true, if it is not, defaults to false. Either case can be overriden from the command line or config.mak

#11 lore raw
In reply to Ævar Arnfjörð Bjarmason
Quoted 3 lines · Ævar Arnfjörð Bjarmason

I liked the suggestion to make the URL a relative path, but this would require you to maintain a mirror in the same places you push git.git to, is that something you'd be willing to do?

After thinking about this a bit more, I know what I think we want a bit better.

Relative URL (e.g. ../sha1collisiondetection that sits next to the copy of git.git) may be a good way to go. I can arrange to create necessary repository next to git.git on k.org and github.com but I need to double check about other places

Whether the submodule is referenced by a relative URL from the main project, the submodule should not come directly from the upstream, and various mirrors that sit next to git.git should not be blind and automated "mirrors". This is because I do not want us to trust the security measures of https://github.com/cr-marcstevens/ repository. The consumers already need to trust k.org/pub/scm/git/git.git and by ensuring k.org/pub/scm/git/sha1dc is managed the same way, they do not have to trust anything extra.

Another reason is that we want to make sure all commits in the submodule that we bind to the superproject (i.e. git.git) are always in the submodule, regardless of what our upstream does, and one way to do so is to have control over _our_ canonical repository for the submodule. In normal times, it will faithfully follow the upstream without doing anything else, but we'd keep the option of anchoring a submodule commit that is referenced by the superproject history with our own tag, if it is ever rewound away in the upstream history for whatever reason.

Thanks.

#12 lore raw
Quoted 6 lines · Junio C Hamano
Quoted 3 lines · Ævar Arnfjörð Bjarmason

I liked the suggestion to make the URL a relative path, but this would require you to maintain a mirror in the same places you push git.git to, is that something you'd be willing to do?

Quoted 7 lines

After thinking about this a bit more, I know what I think we want a bit better.

Relative URL (e.g. ../sha1collisiondetection that sits next to the copy of git.git) may be a good way to go. I can arrange to create necessary repository next to git.git on k.org and github.com but I need to double check about other places

And here we see another deficit with a single URL:
We have to abide by the same scheme at all hosting endpoints.

For example consider the host https://kernel.googlesource.com/pub/scm/git/git
that mirrors from kernel.org. It would be able to bind the submodule at https://kernel.googlesource.com/pub/scm/git/git/sha1dc
i.e. it would look like a subdirectory of the main git repo.

This is not an issue for our desired usecase, as all hosts can comply with the scheme that you outlined (url=../sha1...), but worth noting that in the long term we may want to have the ability to "configure" each remote individually by having out-of-history config options. I think we would want to solve that via a "refs/meta/gitmodules" branch that can be adapted per remote. (original idea from jrnieder@)

Quoted 4 lines

Whether the submodule is referenced by a relative URL from the main project, the submodule should not come directly from the upstream, and various mirrors that sit next to git.git should not be blind and automated "mirrors".

That sounds reasonable for our sanity.

Quoted 5 lines

This is because I do not want us to trust the
security measures of https://github.com/cr-marcstevens/ repository. The consumers already need to trust k.org/pub/scm/git/git.git and by ensuring k.org/pub/scm/git/sha1dc is managed the same way, they do not have to trust anything extra.

The trust would be transitive, as the said submodule is referenced via sha1, so all malicious actions upstream could perform are:
* denial of service: (by remove a commit that we pointed at in our history)
* denial of service 2: add a huge blob to their repo, such that anyone obtaining the submodule not carefully is annoyed by a super large repo.
* add additional malicious data (such as illegal numbers and algorithms) to a branch, which would be obtained by users cloning the submodule carelessly.

Quoted 5 lines

Another reason is that we want to make sure all commits in the submodule that we bind to the superproject (i.e. git.git) are always in the submodule, regardless of what our upstream does, and one way to do so is to have control over _our_ canonical repository for the submodule.

By having all repos under one entity of trust, we would not need to discuss all kinds of possible attacks as above.

Quoted 5 lines

In normal times, it will faithfully follow the upstream
without doing anything else, but we'd keep the option of anchoring a submodule commit that is referenced by the superproject history with our own tag, if it is ever rewound away in the upstream history for whatever reason.

That makes sense.

Thanks,
Stefan

#13 lore raw
Quoted 10 lines · Stefan Beller
Quoted 9 lines · Junio C Hamano
Quoted 3 lines · Ævar Arnfjörð Bjarmason

I liked the suggestion to make the URL a relative path, but this would require you to maintain a mirror in the same places you push git.git to, is that something you'd be willing to do?

After thinking about this a bit more, I know what I think we want a bit better.

Quoted 7 lines
Quoted 4 lines

Relative URL (e.g. ../sha1collisiondetection that sits next to the copy of git.git) may be a good way to go. I can arrange to create necessary repository next to git.git on k.org and github.com but I need to double check about other places

And here we see another deficit with a single URL:
We have to abide by the same scheme at all hosting endpoints.

FWIW, I do not see it a deficit. It is a price you may or may not be willing to pay for simplicity, and I think it is a reasonable trade-off.

The .gitmodules format can be enhanced to list multiple URLs quite easily. I think the current users all use the equivalent of "git config -f .gitmodules submodule.foo.url" to grab one value. Unless the user chooses to do anything special, they will continue to get the same behaviour whensuch an enhancement happens, which is a good thing.

But then, you need to design what users choose to do that is "something special". Should "git clone --recurse-submodules" have a way to control which one of the not-yet-known-before-cloning URLs that may be listed in .gitmodules? Will we have a way to say "For North American users, we recommend this URL, while Asians may want to fetch from this other URL" in .gitmodules and then the recursive clone have a way to say "I want the European option"? Would the recursive clone have a way to go interactive?

And from that point of view, "you'll find the submodules relative to the superproject" convention is one way (not necessarily the only way) to allow users not to care too much. The simplicity comes with price and that is perfectly acceptable.

Also a single URL scheme may still perfectly fine. .gitmodules may have new submodule.<name>.alternateURL fields and recursive clone can be told to optionally go interactive when such fields are present.

Or README can list alternate URLs and instruct the users to use the insteadOf if they want to go to mirrors instead. Those users who do care about picking particular mirror are likely not favor simplicity over flexibility, so they would not likely to do a recursive clone (after all, clone is a single-time operation) and it may be sufficient if they can clone the top-level, read README and then decide how and from where they get their submodules.

#14 lore raw
In reply to Junio C Hamano
Quoted 6 lines · Junio C Hamano
Quoted 3 lines · Ævar Arnfjörð Bjarmason

I liked the suggestion to make the URL a relative path, but this would require you to maintain a mirror in the same places you push git.git to, is that something you'd be willing to do?

Quoted 7 lines

After thinking about this a bit more, I know what I think we want a bit better.

Relative URL (e.g. ../sha1collisiondetection that sits next to the copy of git.git) may be a good way to go. I can arrange to create necessary repository next to git.git on k.org and github.com but I need to double check about other places

If the URL doesn't point to the canonical upstream how do we review a patch to update sha1dc here on list? Doesn't change from "'git am' this and it'll work" to "'git am' this and it'll fail, then do this submodule config modification dance, and run some other command....".

I haven't tried repointing a submodule temporarily (and locally) to another URL for such a use, how is that even done?

Quoted 8 lines

Whether the submodule is referenced by a relative URL from the main project, the submodule should not come directly from the upstream, and various mirrors that sit next to git.git should not be blind and automated "mirrors". This is because I do not want us to trust the security measures of https://github.com/cr-marcstevens/ repository. The consumers already need to trust k.org/pub/scm/git/git.git and by ensuring k.org/pub/scm/git/sha1dc is managed the same way, they do not have to trust anything extra.

I had the same comments Stefan pointed out below about this. So I won't repeat any of that...

Quoted 9 lines

Another reason is that we want to make sure all commits in the submodule that we bind to the superproject (i.e. git.git) are always in the submodule, regardless of what our upstream does, and one way to do so is to have control over _our_ canonical repository for the submodule. In normal times, it will faithfully follow the upstream without doing anything else, but we'd keep the option of anchoring a submodule commit that is referenced by the superproject history with our own tag, if it is ever rewound away in the upstream history for whatever reason.

If we were talking about any other project but git.git I'd say "yeah this makes sense".

But I think in our case we should keep in mind the main point of this exercise is for us to dogfood submodule usage, not just so we get whatever trivial benefits from updating the sha1collision/ directory from upstream, but so that we run into issues with submodules that we solve for all our users.

In this case you're basically concerned with:

* We have N mirrors, but the upstream submodule URL is just one URL,
so let's not point to that, but to our N mirrors

Could also be addressed with a combination of 'pullUrl' for submodules (inverse of pushUrl for push) to list the canonical one & list of mirrors (or use the relative URL).

* What if upstream say 5 years in the future rewinds their history,
github shuts down or whatever, can we check out and work with older versions of git.git?

Seems like it would be useful to have a way to ex-post-facto say "past history should use these URLs". i.e. if all git.git mirrors go down and we have to re-host, then you can just clone git.git and off you go, but the same isn't true of past submodule urls, or is it?

#15 lore raw
Quoted 4 lines · Ævar Arnfjörð Bjarmason

Seems like it would be useful to have a way to ex-post-facto say "past history should use these URLs". i.e. if all git.git mirrors go down and we have to re-host, then you can just clone git.git and off you go, but the same isn't true of past submodule urls, or is it?

I do not know how heavily you are used to use submodules, but I think submodule's URL is copied to the config of the superproject, and that URL is what will be used from there on, so "past history or future history will use that URL" is already the case, no?

#16 lore raw
Quoted 11 lines · Junio C Hamano
Quoted 4 lines · Ævar Arnfjörð Bjarmason

Seems like it would be useful to have a way to ex-post-facto say "past history should use these URLs". i.e. if all git.git mirrors go down and we have to re-host, then you can just clone git.git and off you go, but the same isn't true of past submodule urls, or is it?

I do not know how heavily you are used to use submodules, but I think submodule's URL is copied to the config of the superproject, and that URL is what will be used from there on, so "past history or future history will use that URL" is already the case, no?

I haven't used them much, just starting to get familiar with them now again.

I thought given your "if it is ever rewound away in the upstream history..." that if we e.g. pegged upstream to that github URL now that if that got rewound, anyone working with git.git in the future would be in for some pain if they needed to check out and test old tags.

But from what you're saying here that seems like a non-issue, i.e. in such a scenario we'd just mirror the original repo[1], change the URL in git.git to that, and then anyone could easily use older history since it would be pointing to the new mirror.

I.e. in the spirit of my last reply, this seems like deviating from the default workflow around submodules out of concern for an extremely unlikely scenario, which, if it happened, would be easily mitigated for both past & future git.git history.

1. Or likely just ask upstream kindly to push a tag with the old history.

#17 lore raw
Quoted 4 lines · Ævar Arnfjörð Bjarmason

But from what you're saying here that seems like a non-issue, i.e. in such a scenario we'd just mirror the original repo[1], change the URL in git.git to that, and then anyone could easily use older history since it would be pointing to the new mirror.

Those who cloned before such a switch will still have the URL they chose when they cloned and did "submodule init" on it, I think, so they need to explicitly choose to switch to the new URL. So I would not exactly say "seems like a non-issue"; it certainly is an easy thing to work around.

#18 lore raw

Re: [PATCH 2/3] sha1dc: use sha1collisiondetection as a submodule

In reply to Junio C Hamano
Quoted 25 lines · Junio C Hamano
Quoted 14 lines · Ævar Arnfjörð Bjarmason

Replace the forked sha1dc directory with a copy of the upstream code imported as a submodule. This is the exact same code as now exists in the sha1dc/ directory.

The initial reason for copy/pasting the code into sha1dc and locally modifying it was that it needed to be altered to work with the git project.

The upstream project has accepted my code changes to allow us to use their code as-is, see the preceding commit for details. So import the code as a submodule instead, this will make it easier to keep up-to-date with any upstream fixes or improvements.

Quoted 8 lines
---
 .gitmodules            | 4 ++++
 Makefile               | 4 ++--
 hash.h                 | 2 +-
 sha1collisiondetection | 1 +
 4 files changed, 8 insertions(+), 3 deletions(-)
 create mode 100644 .gitmodules
 create mode 160000 sha1collisiondetection
Quoted 3 lines

I am not sure how prepared our .travis.yml is to deal with a submodule, I'd prefer to have this step broken down to two step process.

I've since sent a v2 of this which addresses this by being more careful, but since then I found these Travis docs that seem to indicate that cloning the submodule will Just Work:
https://docs.travis-ci.com/user/common-build-problems/#Git-Submodules-are-not-updated-correctly

#19 lore raw

PATCH 3/3 sha1dc: remove the unused sha1dc/ directory

In reply to Ævar Arnfjörð Bjarmason

This has been made obsolete by the sha1collisiondetection submodule. See the preceding change for details.

---
 sha1dc/LICENSE.txt |  30 -----
 sha1dc/sha1.h      | 110 ----------------
 sha1dc/ubc_check.c | 372 -----------------------------------------------------
 sha1dc/ubc_check.h |  52 --------
 4 files changed, 564 deletions(-)
 delete mode 100644 sha1dc/LICENSE.txt
 delete mode 100644 sha1dc/sha1.h
 delete mode 100644 sha1dc/ubc_check.c
 delete mode 100644 sha1dc/ubc_check.h
sha1dc/LICENSE.txt deleted +0 -30
deleted file mode 100644
index 4a3e6a1b15..0000000000
@@ -1,30 +0,0 @@
-MIT License
-
-Copyright (c) 2017:
-    Marc Stevens
-    Cryptology Group
-    Centrum Wiskunde & Informatica
-    P.O. Box 94079, 1090 GB Amsterdam, Netherlands
-    [email protected]
-
-    Dan Shumow
-    Microsoft Research
-    [email protected]
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
sha1dc/sha1.h deleted +0 -110

110 lines not on this page · raw message

sha1dc/ubc_check.c deleted +0 -372

372 lines not on this page · raw message

sha1dc/ubc_check.h deleted +0 -52

52 lines not on this page · raw message

Signature · 1 line
2.13.0.303.g4ebf302169