git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Migrating away from SHA-1?

From
Joey Hess <id@joeyh.name>
Date
Apr 14, 2016, 16:47 UTC
Message-ID
<20160414164751.GA3255@kitenet.net>
In-Reply-To
<20160414015324.GA16656@thunk.org>
Theodore Ts'o wrote:
> OK, so how does this map to git?  First of all, from a collision
> perspective, the two blobs have to map into valid C code

Git provides other places to hide the colliding blobs; the best seems to be as an added header in the commit object, or as trailing data after a \0 in the commit message. git is very good at hiding such potentially colliding data from the user, as https://github.com/joeyh/supercollider demonstrates.

commit 24f30db5790b209fa412ce81c5ef2bf8af5fd4d7
Author: Joey Hess <joey@kitenet.net>
Date:   Fri Sep 9 11:49:21 2011 -0400
    an innocent commit
    
    If this were a sha1 colliding attack, there would be some sort of binary
    garbage below. Which there isn't. So this can be safely merged.

joey@darkstar:~/tmp/supercollider>git cat-file -p 24f30db5790b209fa412ce81c5ef2bf8af5fd4d7 tree 735a7633237c07b398856005de3bc9ea00446747 author Joey Hess <joey@kitenet.net> 1315583361 -0400 committer Joey Hess <joey@kitenet.net> 1315583361 -0400

an innocent commit

If this were a sha1 colliding attack, there would be some sort of binary garbage below. Which there isn't. So this can be safely merged.

??b???[?i??ͯ?t? 2??????os?<????h?+,M?mY?e?EW?iv$???J??U}n~???L??????f???ě??3>?Q??H?޸*zl?RA˂q?E ?E7???\?m???U?>MU GY?d)?ȼ??'g?~D??ɯhQ????/"E??X?m???^͸??S?D??;w6(?`??>?縘?AѲ?*!??@v????>?8??2?!??=*?J  ???ynH???c?w?\??K7???N?6?????A5?FM?wZ?~?pKY?R???s7??(?ƶ?_"??m%????1a??ʀ??K[ t????!A0?ΈfT.?T?w?򁛵ƌ ?р???aco?V/2??nَ? ?}?6?_?z?{

(The other possibility would be to hide the colliding blob in the tree object, but that seems unlikely.)

-- 
see shy jo
Previous: Theodore Ts'oNext: David Turner
Message 8 of 21 in “Migrating away from SHA-1?”
  1. H. Peter AnvinApr 12, 2016
  2. Stefan BellerApr 12, 2016
  3. H. Peter AnvinApr 12, 2016
  4. Jeff KingApr 12, 2016
  5. David TurnerApr 12, 2016
  6. Jeff KingApr 12, 2016
  7. Theodore Ts'oApr 14, 2016
  8. Joey HessApr 14, 2016
  9. David TurnerApr 14, 2016
  10. H. Peter AnvinApr 14, 2016
  11. Theodore Ts'oApr 14, 2016
  12. Jeff KingApr 15, 2016
  13. Junio C HamanoApr 15, 2016
  14. Jeff KingApr 15, 2016
  15. Jeff KingApr 12, 2016
  16. Junio C HamanoApr 13, 2016
  17. Jeff KingApr 13, 2016
  18. H. Peter AnvinApr 13, 2016
  19. Duy NguyenApr 13, 2016
  20. H. Peter AnvinApr 13, 2016
  21. brian m. carlsonApr 15, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.