Improving support for signed revisions

Adrian Buehlmann adrian at cadifra.com
Sun May 10 07:48:03 CDT 2009


On 10.05.2009 13:56, Lasse Kliemann wrote:
> * Message by -Martin Geisler- from Sat 2009-05-09:
>  
>> But do remember that when I sign a changeset I am really signing the
>> changeset *plus* all its ancestors.
>>
>> The signature is on the changeset hash, and the hash is the root hash of
>> a hash-tree that includes all the ancestors. This implies that I don't
>> have to sign all the intermediate changesets for you to trust them.
> 
> I've got the suspicion that this can make matters even more 
> dangerous. It depends on how one is supposed to interpret a 
> signature.

The signature just says that it was you who had that exact dag
of history in a clone when signing it. That's all.

It's the same as signing a sheet of paper: You can sign whatever
story you want. hg verify and the signature just allow third
parties to verify that those lies are unchanged when they clone
them (provided their computer and their copy of Mercurial was
not compromised).

What signing means is up to you. You could write that into a file
you added in the changeset right before the signature changeset
("I hereby certify, that .... "). But pullers would then still have
to assume that you wouldn't have signed that revision of the file, if
it contained a lie. So you will have to tell them outside Mercurial
what your signature means (you could send them a signed email
containing a dump of the .sigs file and your statements).

When signing a paper, most people verifying the signature assume
that you have read the paper and in many cases agreed to the
statements made on it.

For a Mercurial repo, third parties will assume that you have
"read and agreed" in some way to the whole history of the repo, up
to the revision you are signing.

A changeset is not a patch. If you want, you could sign individual
patch files. But this has nothing to do with Mercurial then any
more.

With Mercurial, you don't sign individual changes. You sign the
whole history up to a specific revision of a repo.



More information about the Mercurial mailing list