# Gitorious should use CRC128 / 256 / 512 instead of SHA-1

16 messages from 2023-01-13 to 2023-01-16. Participants: Hans Petter Selasky, brian m. carlson, Junio C Hamano, demerphq, Michal Suchánek, rsbecker@nexbridge.com.
Thread: https://gitlist.dev/t/59083

## Hans Petter Selasky, 2023-01-13 13:23

Subject: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
Message-ID: <9c0fda42-67ab-f406-489b-38a2d9bbcfc2@selasky.org>
URL: https://gitlist.dev/e/9c0fda42-67ab-f406-489b-38a2d9bbcfc2%40selasky.org

```
Hi,

Currently GIT only supports cryptographic hashes for its commit tags.

That means:

1) It's very difficult to edit the history without also recomputing the 
hash tags for all commits after the needed change-point, which then 
means references to a repository is broken.

2) Only a single bit error in the main repository can break everything!

3) Illicit contents may be present in binary blobs, which in the future 
may be need to be removed without warrant and the only way to do that is 
by rebasing and force pushing, which will break "everything". It can be 
everything from child-porn to expired distribution licenses.

Many people think that bit errors cannot happen because the memory uses 
ECC and the file system uses cryptographic hashes to verify the 
integrity of the data. But what many people forget about is that when 
copying data from memory to disk, typically using a DMA channel data is 
copied w/o any kind of integrity protection, because the integrity 
protection is not end-to-end. The integrity protection is only per-link.

Therefore I propose the following changes to GIT.

1) Use a CRC128 / 256 or 512 non-cryptographic based hashing algorithm 
as default.

2) Add support for a CRC fixup field, which usually is zero, but when 
merges are needed, it can be non-zero, to allow the hash-tag-value to 
remain the same! This also allows for easy conversion of existing GIT 
repositories to the new scheme.

3) All git objects should be uncompressed.

CRC-XXX can easily be used to correct multiple bit errors without any 
performance overhead.

--HPS

```

## brian m. carlson, 2023-01-14 23:59

Subject: Re: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
Message-ID: <Y8NB21PExmifhyeQ@tapette.crustytoothpaste.net>
URL: https://gitlist.dev/e/Y8NB21PExmifhyeQ%40tapette.crustytoothpaste.net
In-Reply-To: <9c0fda42-67ab-f406-489b-38a2d9bbcfc2@selasky.org>

```
On 2023-01-13 at 13:23:59, Hans Petter Selasky wrote:
> Hi,
> 
> Currently GIT only supports cryptographic hashes for its commit tags.
> 
> That means:
> 
> 1) It's very difficult to edit the history without also recomputing the hash
> tags for all commits after the needed change-point, which then means
> references to a repository is broken.

This is intentional.  Commit and tag signing requires an unbroken Merkle
tree-like construction that prevents the history from being modified by
signing a single commit or tag.

> 2) Only a single bit error in the main repository can break everything!

git fsck is designed to detect this, and by default it's run every time
the repository is repacked (such as by git gc).  But yes, this is a
problem, and changing to an algorithm which isn't cryptographically
secure won't change that.  Prudent users back up data to prevent data
loss.

> 3) Illicit contents may be present in binary blobs, which in the future may
> be need to be removed without warrant and the only way to do that is by
> rebasing and force pushing, which will break "everything". It can be
> everything from child-porn to expired distribution licenses.

This is a problem in every Merkle tree-like system.  Most repositories
have some sort of code review or access control that prevents people
from generally pushing inappropriate content.  For example, if somebody
proposed to push any sort of pornography or other inappropriate content
(e.g., a racist screed) to one of my repositories or one of my
employer's, I'd refuse to approve or merge such a change, because
that wouldn't be appropriate for the repository.

I don't feel this is enough of a problem that using a Merkle tree-like
construction is a bad idea, given the benefits it offers.

> Therefore I propose the following changes to GIT.
> 
> 1) Use a CRC128 / 256 or 512 non-cryptographic based hashing algorithm as
> default.

As the person who wrote the SHA-256 support, I'm pleased to report that
adding a new hash algorithm isn't very difficult anymore.  The largest
part of the work is updating all the tests.  I've tried very hard to
make this substantially easier for everyone.

However, Git is moving in the direction of stronger cryptographic
algorithms, rather than insecure hashing algorithms.  I don't think your
proposal is a good idea, nor do I think it's likely to be adopted.

If it were adopted, the signing of commits and tags would be
meaningless, and because it would be trivial to create collisions[0], there
would clearly be some pairs of objects which could not be stored.  This
would make Git much less useful, and it might allow users to attempt to
forge or replace content without being detected.

That being said, you are free to create your own fork of the code which
does so, provided you comply with the terms of the license.

> 2) Add support for a CRC fixup field, which usually is zero, but when merges
> are needed, it can be non-zero, to allow the hash-tag-value to remain the
> same! This also allows for easy conversion of existing GIT repositories to
> the new scheme.

For the same reason as above, I don't think this is a good idea.

> 3) All git objects should be uncompressed.

This would dramatically increase the size of most repositories.  I've
easily seen repositories where the uncompressed contents exceed 1 TB in
size yet the repository is only double-digit gigabytes, if that.  Most
people will find the increase in disk usage unacceptable, and I'm
certain that includes Git hosterse.

[0] CRC is linear and the following relations apply, which makes forgery
trivial (see https://en.wikipedia.org/wiki/Cyclic_redundancy_check):

CRC(x XOR y) = CRC(x) XOR CRC(y) XOR c for some c
CRC(x XOR y XOR z) = CRC(x) XOR CRC(y) XOR CRC(z)
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA

```

## Junio C Hamano, 2023-01-15 03:14

Subject: Re: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
Message-ID: <xmqqk01oij4y.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqk01oij4y.fsf%40gitster.g
In-Reply-To: <Y8NB21PExmifhyeQ@tapette.crustytoothpaste.net>

```
"brian m. carlson" <sandals@crustytoothpaste.net> writes:

>> 3) Illicit contents may be present in binary blobs, which in the future may
>> be need to be removed without warrant and the only way to do that is by
>> rebasing and force pushing, which will break "everything". It can be
>> everything from child-porn to expired distribution licenses.
>
> This is a problem in every Merkle tree-like system.  Most repositories
> have some sort of code review or access control that prevents people
> from generally pushing inappropriate content.  For example, if somebody
> proposed to push any sort of pornography or other inappropriate content
> (e.g., a racist screed) to one of my repositories or one of my
> employer's, I'd refuse to approve or merge such a change, because
> that wouldn't be appropriate for the repository.
>
> I don't feel this is enough of a problem that using a Merkle tree-like
> construction is a bad idea, given the benefits it offers.

While I agree with the primary thrust of your argument, this one is
a bit tricky to reason about.  External rules change and can declare
what has been accepted as appropriate inappropriate on a whim, long
after you reviewed the material coming into your history and decided
it was perfectly fine, under the then-prevailing definition of what
is and isn't appropriate.


```

## demerphq, 2023-01-15 10:09

Subject: Re: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
Message-ID: <CANgJU+X0LZfpdh4HWFC6-Y=+G6Mv-wKiZWrB=JJwe6CnYKeORg@mail.gmail.com>
URL: https://gitlist.dev/e/CANgJU%2BX0LZfpdh4HWFC6-Y%3D%2BG6Mv-wKiZWrB%3DJJwe6CnYKeORg%40mail.gmail.com
In-Reply-To: <Y8NB21PExmifhyeQ@tapette.crustytoothpaste.net>

```
On Sun, 15 Jan 2023 at 01:05, brian m. carlson
<sandals@crustytoothpaste.net> wrote:
>
> This is a problem in every Merkle tree-like system.  Most repositories
> have some sort of code review or access control that prevents people
> from generally pushing inappropriate content.  For example, if somebody
> proposed to push any sort of pornography or other inappropriate content
> (e.g., a racist screed) to one of my repositories or one of my
> employer's, I'd refuse to approve or merge such a change, because
> that wouldn't be appropriate for the repository.
>
> I don't feel this is enough of a problem that using a Merkle tree-like
> construction is a bad idea, given the benefits it offers.


[resend in plain text]

It isn't clear to me why this needs to be a problem at all. If the
Merkele tree contains data later in its chain that says "replace
Object X with Y", provided the replacement mechanism doesn't touch
commit objects, only blobs, then you can replace files in the history
with other files without altering the commit history.

Provided the toolchain validates that it has found a proper
"replacement instruction" in the history, it should be possible to
safely replace blobs without a full history rewrite.

The replacement mechanism could be structured so that you can only
"nuke" a file, eg, replace it with a zero byte blob, making it
somewhat less open to abuse, or it could allow arbitrary blobs to be
mapped to each other. So long as the mapping data is in the commit
history it should be as secure as the original mapping no? Git could
be taught to warn the user "Checking out a rewritten blob X as Y, see
012deadbeef for the rewrite instruction." when it happened.

Again, provided this does not touch the *commit* tree, just raw blobs,
I dont see why you can't have an object replacement facility.  Am I
missing something?

Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

```

## Michal Suchánek, 2023-01-15 13:53

Subject: Re: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
Message-ID: <20230115135245.GB16547@kitsune.suse.cz>
URL: https://gitlist.dev/e/20230115135245.GB16547%40kitsune.suse.cz
In-Reply-To: <9c0fda42-67ab-f406-489b-38a2d9bbcfc2@selasky.org>

```
Hello,

On Fri, Jan 13, 2023 at 02:23:59PM +0100, Hans Petter Selasky wrote:
> Hi,
> 
> Currently GIT only supports cryptographic hashes for its commit tags.
> 
> That means:
> 
> 1) It's very difficult to edit the history without also recomputing the hash
> tags for all commits after the needed change-point, which then means
> references to a repository is broken.

That also makes it difficult to alter the repository intentionally
without anyone noticing. With SHA1 being somewhat weak it may be
possible to alter repository content although I am not aware of any
practical attacks shown so far. For that reason using stronger hashes is
planned in the future.

> 2) Only a single bit error in the main repository can break everything!
> 
> 3) Illicit contents may be present in binary blobs, which in the future may
> be need to be removed without warrant and the only way to do that is by
> rebasing and force pushing, which will break "everything". It can be
> everything from child-porn to expired distribution licenses.

It's good to avoid spam getting into your repository. If you really need
to alter it long into the past you still can. Everyone will notice that
you did, and that's an intentional feature. In some situations it is
understandably an annoyance but there's so much you can do. At least
tags should remain stable.

> Many people think that bit errors cannot happen because the memory uses ECC
> and the file system uses cryptographic hashes to verify the integrity of the
> data. But what many people forget about is that when copying data from
> memory to disk, typically using a DMA channel data is copied w/o any kind of
> integrity protection, because the integrity protection is not end-to-end.
> The integrity protection is only per-link.

So long as all links have integrity protection it's end-to-end.

Integrity checks for CPU chaches, buses, and IO protocols do exist.

It's not that errors cannot happen, they are very unlikely.

In the very rare case that such error happens so long as non-corrupted
version of the object can be supplied by anyone who has a copy of the
repository it is recoverable.

For old objects this should be your backup system.

For new objects the worst case is that the history is rolled back so the
missing object is not needed.

Thanks

Michal

```

## Hans Petter Selasky, 2023-01-16 07:17

Subject: Re: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
Message-ID: <b1984123-569a-c290-8048-158c1c5e08b4@selasky.org>
URL: https://gitlist.dev/e/b1984123-569a-c290-8048-158c1c5e08b4%40selasky.org
In-Reply-To: <20230115135245.GB16547@kitsune.suse.cz>

```
On 1/15/23 14:53, Michal Suchánek wrote:
>> Many people think that bit errors cannot happen because the memory uses ECC
>> and the file system uses cryptographic hashes to verify the integrity of the
>> data. But what many people forget about is that when copying data from
>> memory to disk, typically using a DMA channel data is copied w/o any kind of
>> integrity protection, because the integrity protection is not end-to-end.
>> The integrity protection is only per-link.
 >
> So long as all links have integrity protection it's end-to-end.
 >

Hi Michael,

You clearly don't see what this is about! Only if the same CRC mechanism 
is end-to-end, you don't have any good integrity mechanism at all!

Let me try to explain what this is about in very simple words. Because 
memcpy() does not copy the ECC CRC values along with the data, it is an 
unsafe memory copy mechanism, which may introduce bit-errors without 
noticing. It does not help to only have ECC RAM or for that sake protect 
the PCI links.

--HPS

```

## Hans Petter Selasky, 2023-01-16 07:21

Subject: Re: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
Message-ID: <02e6b8f4-ac5f-fdf5-cea8-58013a3f693d@selasky.org>
URL: https://gitlist.dev/e/02e6b8f4-ac5f-fdf5-cea8-58013a3f693d%40selasky.org
In-Reply-To: <Y8NB21PExmifhyeQ@tapette.crustytoothpaste.net>

```
On 1/15/23 00:59, brian m. carlson wrote:
>> 3) Illicit contents may be present in binary blobs, which in the future may
>> be need to be removed without warrant and the only way to do that is by
>> rebasing and force pushing, which will break "everything". It can be
>> everything from child-porn to expired distribution licenses.
> This is a problem in every Merkle tree-like system.  Most repositories
> have some sort of code review or access control that prevents people
> from generally pushing inappropriate content.  For example, if somebody
> proposed to push any sort of pornography or other inappropriate content
> (e.g., a racist screed) to one of my repositories or one of my
> employer's, I'd refuse to approve or merge such a change, because
> that wouldn't be appropriate for the repository.
> 
> I don't feel this is enough of a problem that using a Merkle tree-like
> construction is a bad idea, given the benefits it offers.
> 

Yeah, right. And of course you have all the tools to decode those 
megabyte big firmware blobs from intel supporting wireless cards all 
over the place to see what is actually inside there, that they are not 
using some 3rd party code which licence will expire at some point, and 
then you need to remove those binaries.

--HPS

```

## Hans Petter Selasky, 2023-01-16 07:23

Subject: Re: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
Message-ID: <3b0af57c-a144-b0e4-d353-6028b3939291@selasky.org>
URL: https://gitlist.dev/e/3b0af57c-a144-b0e4-d353-6028b3939291%40selasky.org
In-Reply-To: <Y8NB21PExmifhyeQ@tapette.crustytoothpaste.net>

```
On 1/15/23 00:59, brian m. carlson wrote:
> However, Git is moving in the direction of stronger cryptographic
> algorithms, rather than insecure hashing algorithms.  I don't think your
> proposal is a good idea, nor do I think it's likely to be adopted.

I disagree. There is no need for signing in a version control system. It 
just makes it harder to change things, like the right-to-repair. In my 
eyes there is a high chance of abuse, by vendors that do no want others 
to flash or edit their device firmwares.

--HPS

```

## Michal Suchánek, 2023-01-16 09:13

Subject: Re: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
Message-ID: <20230116091346.GC16547@kitsune.suse.cz>
URL: https://gitlist.dev/e/20230116091346.GC16547%40kitsune.suse.cz
In-Reply-To: <b1984123-569a-c290-8048-158c1c5e08b4@selasky.org>

```
On Mon, Jan 16, 2023 at 08:17:58AM +0100, Hans Petter Selasky wrote:
> On 1/15/23 14:53, Michal Suchánek wrote:
> > > Many people think that bit errors cannot happen because the memory uses ECC
> > > and the file system uses cryptographic hashes to verify the integrity of the
> > > data. But what many people forget about is that when copying data from
> > > memory to disk, typically using a DMA channel data is copied w/o any kind of
> > > integrity protection, because the integrity protection is not end-to-end.
> > > The integrity protection is only per-link.
> >
> > So long as all links have integrity protection it's end-to-end.
> >
> 
> Hi Michael,
> 
> You clearly don't see what this is about! Only if the same CRC mechanism is
> end-to-end, you don't have any good integrity mechanism at all!
> 
> Let me try to explain what this is about in very simple words. Because
> memcpy() does not copy the ECC CRC values along with the data, it is an
> unsafe memory copy mechanism, which may introduce bit-errors without
> noticing. It does not help to only have ECC RAM or for that sake protect the
> PCI links.
The ECC protects against 1bit errors - so long as only 1 bit is flipped
along that path it is corrected.

If you have bigger errors ECC can sometimes detect them and your system
crashes or whatever, and sometimes they go unnoticed.

It does not make sense to copy around that CRC. It is used to recover
the corrupted bit, and when that data is copied to a new location a new
CRC is calculated that can detect an error in that location. Copying
that checksum around would only accumulate the errors.

Of course, that assumes that the corruption happens only in the cheaper
external long-term storage, and data does not get corrupted as it goes
through your CPU where it is stored only a few CPU cycles at a time. It
is mostly the case but when you need extreme reliability system-level
schemes that mitigate this possibility do exist.

Thanks

Michal

```

## Hans Petter Selasky, 2023-01-16 09:55

Subject: Re: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
Message-ID: <6a398405-e5f8-0b78-e463-41d79e49e78b@selasky.org>
URL: https://gitlist.dev/e/6a398405-e5f8-0b78-e463-41d79e49e78b%40selasky.org
In-Reply-To: <20230116091346.GC16547@kitsune.suse.cz>

```
On 1/16/23 10:13, Michal Suchánek wrote:
> when that data is copied to a new location a new
> CRC is calculated that can detect an error in that location.

Yes, that is correct, but what is "copying data"? Are you saying that 
copying data is always error free?

--HPS

```

## rsbecker@nexbridge.com, 2023-01-16 12:31

Subject: RE: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
Message-ID: <017801d929a6$6f8271b0$4e875510$@nexbridge.com>
URL: https://gitlist.dev/e/017801d929a6%246f8271b0%244e875510%24%40nexbridge.com
In-Reply-To: <6a398405-e5f8-0b78-e463-41d79e49e78b@selasky.org>

```
On January 16, 2023 4:56 AM, Hans Petter Selasky wrote:
>On 1/16/23 10:13, Michal Suchánek wrote:
>> when that data is copied to a new location a new CRC is calculated
>> that can detect an error in that location.
>
>Yes, that is correct, but what is "copying data"? Are you saying that copying data is
>always error free?

Not in all possible computing devices, no. But in certain high-reliability and mission critical systems, there are parity checks and communication mechanisms that verify the integrity of data transfers memory-to-memory, memory-to-register, and over inter-CPU bus, and memory-to-disk-storage checks. The result of a corruption on one of my systems would result in a CPU halt rather than blindly accepting the result, taking the faulty processor offline until the cause is investigated and then reloaded or repaired. This applies to any component, including disks, CLIMs, DMA, and anything else in the architecture.


```

## rsbecker@nexbridge.com, 2023-01-16 12:34

Subject: RE: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
Message-ID: <017901d929a6$ec180f50$c4482df0$@nexbridge.com>
URL: https://gitlist.dev/e/017901d929a6%24ec180f50%24c4482df0%24%40nexbridge.com
In-Reply-To: <3b0af57c-a144-b0e4-d353-6028b3939291@selasky.org>

```
On January 16, 2023 2:24 AM, Hans Petter Selasky wrote:
>On 1/15/23 00:59, brian m. carlson wrote:
>> However, Git is moving in the direction of stronger cryptographic
>> algorithms, rather than insecure hashing algorithms.  I don't think
>> your proposal is a good idea, nor do I think it's likely to be adopted.
>
>I disagree. There is no need for signing in a version control system. It just makes it
>harder to change things, like the right-to-repair. In my eyes there is a high chance
>of abuse, by vendors that do no want others to flash or edit their device
>firmwares.

The two matters are completely isolated and distinct. In the OpenSource community, anyone typically has the right to modify. Please refer to the GPLv3, ECLIPSE, and MIT licenses for example. Those are the governing documents that permit modification and define intellectual property rights. Please consult those licenses with regards to right-to-repair statements that have no legal bearing on git or any other GPL-governed software product. In my view, the issue raised is a red herring that keeps getting brought up, which does not contribute positively to this request's discussion, but would presumably would increase the hit rate on web searches, to which this reply unfortunately contributes.

The assertion of no need for signing can apply to a centralized version control system, like SVN, because users are authenticated centrally, and the contribution can be made definitive without a separate signature, providing no one with root authority on the server hacks the repository. In the architecture of a distributed version control system (specifically git for this discussion), there is no evidence of origin of changes because the commit identity is cooperative rather than being enforced by a central authority and hacking the repository by root is detectible. The assertion of signing as abuse of rights is also an opinion that, so far, has no supporting evidence given. Perhaps a paper in a refereed journal might give this position some credibility.

My point is that signing is critical in a DVCS and a major function point used by DevOps architects for adopting git in new organizations. In the regulated world, FinTech, FDA, Aviation, etc., signing contributes to the evidence of origin of changes required by PCI and SWIFT (ref: section 6 in each regulation). Without signed tags (which the establishes the change origins for releases for production use), deployment becomes less certain and less acceptable to the audit community with whom I interact on a regular basis.

--Randall



```

## Hans Petter Selasky, 2023-01-16 14:01

Subject: Re: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
Message-ID: <85788356-14b1-6afb-c78c-0ab889bbbb59@selasky.org>
URL: https://gitlist.dev/e/85788356-14b1-6afb-c78c-0ab889bbbb59%40selasky.org
In-Reply-To: <017901d929a6$ec180f50$c4482df0$@nexbridge.com>

```
On 1/16/23 13:34, rsbecker@nexbridge.com wrote:
> On January 16, 2023 2:24 AM, Hans Petter Selasky wrote:
>> On 1/15/23 00:59, brian m. carlson wrote:
>>> However, Git is moving in the direction of stronger cryptographic
>>> algorithms, rather than insecure hashing algorithms.  I don't think
>>> your proposal is a good idea, nor do I think it's likely to be adopted.
>>
>> I disagree. There is no need for signing in a version control system. It just makes it
>> harder to change things, like the right-to-repair. In my eyes there is a high chance
>> of abuse, by vendors that do no want others to flash or edit their device
>> firmwares.
> 

Hi,

> The two matters are completely isolated and distinct. In the OpenSource community, anyone typically has the right to modify. Please refer to the GPLv3, ECLIPSE, and MIT licenses for example. Those are the governing documents that permit modification and define intellectual property rights. Please consult those licenses with regards to right-to-repair statements that have no legal bearing on git or any other GPL-governed software product. In my view, the issue raised is a red herring that keeps getting brought up, which does not contribute positively to this request's discussion, but would presumably would increase the hit rate on web searches, to which this reply unfortunately contributes.

The use of cryptographic hash tags, allows one party to stay in control 
of and monetize a project, actually by doing nothing more than 
rebranding an existing product.

> The assertion of no need for signing can apply to a centralized version control system, like SVN, because users are authenticated centrally, and the contribution can be made definitive without a separate signature, providing no one with root authority on the server hacks the repository. In the architecture of a distributed version control system (specifically git for this discussion), there is no evidence of origin of changes because the commit identity is cooperative rather than being enforced by a central authority and hacking the repository by root is detectible. The assertion of signing as abuse of rights is also an opinion that, so far, has no supporting evidence given. Perhaps a paper in a refereed journal might give this position some credibility.

 From what I've read the GPLv3 goes pretty far to also provide flashing 
rights for software, but what use is that, when flashing the unsigned 
software on your Samsung phone, for example, some fuse breaks in the 
hardware, and then you can no longer use certain apps on your phone?

> 
> My point is that signing is critical in a DVCS and a major function point used by DevOps architects for adopting git in new organizations. In the regulated world, FinTech, FDA, Aviation, etc., signing contributes to the evidence of origin of changes required by PCI and SWIFT (ref: section 6 in each regulation). Without signed tags (which the establishes the change origins for releases for production use), deployment becomes less certain and less acceptable to the audit community with whom I interact on a regular basis.
> 

It's very clear to me, that supporting signing straight off the VCS, 
will not help the opensource and right-to-repair community at all. It's 
just ripe for abuse, like I say.

Hacking is prevented by using a secure copy mechanism between the 
servers, which you can upgrade separately. You already see the problem, 
SHA-1 is not good enough to prevent hacking. Why not just separate the 
hacking preventing measures and the needs of a good VCS?

--HPS

```

## Hans Petter Selasky, 2023-01-16 14:10

Subject: Re: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
Message-ID: <31a33eac-5f1b-969a-6e34-2fc18e989293@selasky.org>
URL: https://gitlist.dev/e/31a33eac-5f1b-969a-6e34-2fc18e989293%40selasky.org
In-Reply-To: <017801d929a6$6f8271b0$4e875510$@nexbridge.com>

```
On 1/16/23 13:31, rsbecker@nexbridge.com wrote:
> On January 16, 2023 4:56 AM, Hans Petter Selasky wrote:
>> On 1/16/23 10:13, Michal Suchánek wrote:
>>> when that data is copied to a new location a new CRC is calculated
>>> that can detect an error in that location.
>>
>> Yes, that is correct, but what is "copying data"? Are you saying that copying data is
>> always error free?
> 
> Not in all possible computing devices, no. But in certain high-reliability and mission critical systems, there are parity checks and communication mechanisms that verify the integrity of data transfers memory-to-memory, memory-to-register, and over inter-CPU bus, and memory-to-disk-storage checks. The result of a corruption on one of my systems would result in a CPU halt rather than blindly accepting the result, taking the faulty processor offline until the cause is investigated and then reloaded or repaired. This applies to any component, including disks, CLIMs, DMA, and anything else in the architecture.
> 

Hi,

I doesn't matter if the system is high-reliability or not. The problem 
is exactly the same.

If you have a CPU register which you add to another CPU register, then 
you need to recompute the parity information on the destination CPU 
register. That basically means you always trust the output of the CPU 
adder. There is simply no relationship between input parity and output 
parity in the linear adder case.

Whenever "parity" information is lost, it opens up the possiblity of 
irrecoverable errors.

That's why I say, that GIT would be better of in that regard with an 
end-to-end, CRC parity mechanism.

--HPS

```

## Junio C Hamano, 2023-01-16 15:06

Subject: Re: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
Message-ID: <xmqqbkmyecym.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqbkmyecym.fsf%40gitster.g
In-Reply-To: <85788356-14b1-6afb-c78c-0ab889bbbb59@selasky.org>

```
Hans Petter Selasky <hps@selasky.org> writes:

> From what I've read the GPLv3 goes pretty far to also provide flashing
> rights for software, but what use is that, when flashing the unsigned
> software on your Samsung phone, for example, some fuse breaks in the
> hardware, and then you can no longer use certain apps on your phone?

It smells that you are conflating the signing of source material and
the sealing of tivoized hardware that use cryptographic signature to
tell what binaries are allowed to run on it.

The signing implemented by the software we the Git development
community build is not about the latter.  The source used to build
binaries for your tivoized hardware can come from a VCS that is
deliberately designed to allow object name collisions, and your
build would just be locked out the same unless you have the signing
key that pleases the hardware.  Use of Git there would not make the
story any different, I am afraid.



```

## Michal Suchánek, 2023-01-16 19:08

Subject: Re: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
Message-ID: <20230116190807.GF16547@kitsune.suse.cz>
URL: https://gitlist.dev/e/20230116190807.GF16547%40kitsune.suse.cz
In-Reply-To: <6a398405-e5f8-0b78-e463-41d79e49e78b@selasky.org>

```
On Mon, Jan 16, 2023 at 10:55:34AM +0100, Hans Petter Selasky wrote:
> On 1/16/23 10:13, Michal Suchánek wrote:
> > when that data is copied to a new location a new
> > CRC is calculated that can detect an error in that location.
> 
> Yes, that is correct, but what is "copying data"? Are you saying that
> copying data is always error free?

Maybe you should not cut out the answer to your qestion?

Thanks

Michal

```
