git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: demerphq <demerphq@gmail.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>,
	Hans Petter Selasky <hps@selasky.org>,
	git@vger.kernel.org
Subject: Re: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
Date: Sun, 15 Jan 2023 11:09:09 +0100	[thread overview]
Message-ID: <CANgJU+X0LZfpdh4HWFC6-Y=+G6Mv-wKiZWrB=JJwe6CnYKeORg@mail.gmail.com> (raw)
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/"

  parent reply	other threads:[~2023-01-15 10:09 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13 13:23 Gitorious should use CRC128 / 256 / 512 instead of SHA-1 Hans Petter Selasky
2023-01-14 23:59 ` brian m. carlson
2023-01-15  3:14   ` Junio C Hamano
2023-01-15 10:09   ` demerphq [this message]
2023-01-16  7:21   ` Hans Petter Selasky
2023-01-16  7:23   ` Hans Petter Selasky
2023-01-16 12:34     ` rsbecker
2023-01-16 14:01       ` Hans Petter Selasky
2023-01-16 15:06         ` Junio C Hamano
2023-01-15 13:53 ` Michal Suchánek
2023-01-16  7:17   ` Hans Petter Selasky
2023-01-16  9:13     ` Michal Suchánek
2023-01-16  9:55       ` Hans Petter Selasky
2023-01-16 12:31         ` rsbecker
2023-01-16 14:10           ` Hans Petter Selasky
2023-01-16 19:08         ` Michal Suchánek
  -- strict thread matches above, loose matches on Subject: below --
2023-01-13 12:59 Hans Petter Selasky
2023-01-13 13:30 ` Konstantin Khomoutov
2023-01-13 13:39   ` Hans Petter Selasky
2023-01-13 14:21     ` rsbecker
2023-01-13 14:42       ` Hans Petter Selasky
2023-01-13 15:45         ` Konstantin Ryabitsev
2023-01-13 15:50           ` Hans Petter Selasky
2023-01-13 15:56             ` rsbecker
2023-01-13 16:02               ` Hans Petter Selasky
2023-01-13 15:54           ` Hans Petter Selasky
2023-01-13 16:02             ` Konstantin Ryabitsev
2023-01-13 16:06               ` Hans Petter Selasky
2023-01-13 16:18                 ` Hans Petter Selasky
2023-01-13 16:36                   ` Konstantin Ryabitsev
2023-01-13 16:44                     ` Hans Petter Selasky
2023-01-13 16:49                       ` Konstantin Ryabitsev
2023-01-13 16:51                         ` Hans Petter Selasky
2023-01-13 16:27                 ` Konstantin Ryabitsev
2023-01-13 16:30                   ` Hans Petter Selasky
2023-01-13 16:35                   ` Hans Petter Selasky
2023-01-13 16:41                     ` Konstantin Ryabitsev
2023-01-13 16:45                       ` Hans Petter Selasky
2023-01-13 15:15       ` Hans Petter Selasky
2023-01-13 17:44       ` Philip Oakley
2023-01-13 15:30     ` Konstantin Khomoutov
2023-01-13 15:39     ` Konstantin Ryabitsev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANgJU+X0LZfpdh4HWFC6-Y=+G6Mv-wKiZWrB=JJwe6CnYKeORg@mail.gmail.com' \
    --to=demerphq@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=hps@selasky.org \
    --cc=sandals@crustytoothpaste.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).