[{"data":1,"prerenderedAt":554},["ShallowReactive",2],{"navigation_docs":3,"-algorithms-tiger":244,"-algorithms-tiger-surround":549},[4,52],{"title":5,"path":6,"stem":7,"children":8,"icon":51},"Guide","\u002Fguide","1.guide\u002F01.index",[9,11,15,19,23,27,31,35,39,43,47],{"title":10,"path":6,"stem":7},"Getting Started",{"title":12,"path":13,"stem":14},"Hashing","\u002Fguide\u002Fhashing","1.guide\u002F02.hashing",{"title":16,"path":17,"stem":18},"HMAC and verify","\u002Fguide\u002Fverify","1.guide\u002F03.verify",{"title":20,"path":21,"stem":22},"Salted KDFs","\u002Fguide\u002Fkdf","1.guide\u002F04.kdf",{"title":24,"path":25,"stem":26},"Length extension","\u002Fguide\u002Fextend","1.guide\u002F05.extend",{"title":28,"path":29,"stem":30},"Identify a hash","\u002Fguide\u002Fidentify","1.guide\u002F06.identify",{"title":32,"path":33,"stem":34},"Search for a transform","\u002Fguide\u002Fsearch","1.guide\u002F07.search",{"title":36,"path":37,"stem":38},"CLI","\u002Fguide\u002Fcli","1.guide\u002F08.cli",{"title":40,"path":41,"stem":42},"Agents","\u002Fguide\u002Fagents","1.guide\u002F09.agents",{"title":44,"path":45,"stem":46},"Custom algorithms","\u002Fguide\u002Fcustom","1.guide\u002F10.custom",{"title":48,"path":49,"stem":50},"Playground","\u002Fguide\u002Fplayground","1.guide\u002F11.playground","i-lucide-book-open",{"title":53,"path":54,"stem":55,"children":56,"icon":243},"Algorithms","\u002Falgorithms","2.algorithms\u002F00.index",[57,59,63,67,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127,131,135,139,143,147,151,155,159,163,167,171,175,179,183,187,191,195,199,203,207,211,215,219,223,227,231,235,239],{"title":58,"path":54,"stem":55},"Every algorithm",{"title":60,"path":61,"stem":62},"SHA-256","\u002Falgorithms\u002Fsha256","2.algorithms\u002F01.sha256",{"title":64,"path":65,"stem":66},"SHA-384","\u002Falgorithms\u002Fsha384","2.algorithms\u002F02.sha384",{"title":68,"path":69,"stem":70},"SHA-512","\u002Falgorithms\u002Fsha512","2.algorithms\u002F03.sha512",{"title":72,"path":73,"stem":74},"SHA-224","\u002Falgorithms\u002Fsha224","2.algorithms\u002F04.sha224",{"title":76,"path":77,"stem":78},"SHA-512\u002F224","\u002Falgorithms\u002Fsha512-224","2.algorithms\u002F05.sha512-224",{"title":80,"path":81,"stem":82},"SHA-512\u002F256","\u002Falgorithms\u002Fsha512-256","2.algorithms\u002F06.sha512-256",{"title":84,"path":85,"stem":86},"SHA-512Half","\u002Falgorithms\u002Fsha512-half","2.algorithms\u002F07.sha512-half",{"title":88,"path":89,"stem":90},"SHA3-256","\u002Falgorithms\u002Fsha3-256","2.algorithms\u002F08.sha3-256",{"title":92,"path":93,"stem":94},"SHA3-512","\u002Falgorithms\u002Fsha3-512","2.algorithms\u002F09.sha3-512",{"title":96,"path":97,"stem":98},"Keccak-256","\u002Falgorithms\u002Fkeccak256","2.algorithms\u002F10.keccak256",{"title":100,"path":101,"stem":102},"BLAKE2b","\u002Falgorithms\u002Fblake2b","2.algorithms\u002F11.blake2b",{"title":104,"path":105,"stem":106},"BLAKE2b-256","\u002Falgorithms\u002Fblake2b-256","2.algorithms\u002F12.blake2b-256",{"title":108,"path":109,"stem":110},"BLAKE2b-224","\u002Falgorithms\u002Fblake2b-224","2.algorithms\u002F13.blake2b-224",{"title":112,"path":113,"stem":114},"BLAKE2s","\u002Falgorithms\u002Fblake2s","2.algorithms\u002F14.blake2s",{"title":116,"path":117,"stem":118},"BLAKE3","\u002Falgorithms\u002Fblake3","2.algorithms\u002F15.blake3",{"title":120,"path":121,"stem":122},"BLAKE-256","\u002Falgorithms\u002Fblake256","2.algorithms\u002F16.blake256",{"title":124,"path":125,"stem":126},"RIPEMD-160","\u002Falgorithms\u002Fripemd160","2.algorithms\u002F17.ripemd160",{"title":128,"path":129,"stem":130},"RIPEMD-320","\u002Falgorithms\u002Fripemd320","2.algorithms\u002F18.ripemd320",{"title":132,"path":133,"stem":134},"HASH160","\u002Falgorithms\u002Fhash160","2.algorithms\u002F19.hash160",{"title":136,"path":137,"stem":138},"HASH256","\u002Falgorithms\u002Fhash256","2.algorithms\u002F20.hash256",{"title":140,"path":141,"stem":142},"Whirlpool","\u002Falgorithms\u002Fwhirlpool","2.algorithms\u002F21.whirlpool",{"title":144,"path":145,"stem":146},"MD5","\u002Falgorithms\u002Fmd5","2.algorithms\u002F22.md5",{"title":148,"path":149,"stem":150},"MD4","\u002Falgorithms\u002Fmd4","2.algorithms\u002F23.md4",{"title":152,"path":153,"stem":154},"MD2","\u002Falgorithms\u002Fmd2","2.algorithms\u002F24.md2",{"title":156,"path":157,"stem":158},"NTLM","\u002Falgorithms\u002Fntlm","2.algorithms\u002F25.ntlm",{"title":160,"path":161,"stem":162},"SHA-1","\u002Falgorithms\u002Fsha1","2.algorithms\u002F26.sha1",{"title":164,"path":165,"stem":166},"SHA-0","\u002Falgorithms\u002Fsha0","2.algorithms\u002F27.sha0",{"title":168,"path":169,"stem":170},"RIPEMD-128","\u002Falgorithms\u002Fripemd128","2.algorithms\u002F28.ripemd128",{"title":172,"path":173,"stem":174},"RIPEMD-256","\u002Falgorithms\u002Fripemd256","2.algorithms\u002F29.ripemd256",{"title":176,"path":177,"stem":178},"HAVAL","\u002Falgorithms\u002Fhaval","2.algorithms\u002F30.haval",{"title":180,"path":181,"stem":182},"Tiger","\u002Falgorithms\u002Ftiger","2.algorithms\u002F31.tiger",{"title":184,"path":185,"stem":186},"CRC-32","\u002Falgorithms\u002Fcrc32","2.algorithms\u002F32.crc32",{"title":188,"path":189,"stem":190},"CRC-64","\u002Falgorithms\u002Fcrc64","2.algorithms\u002F33.crc64",{"title":192,"path":193,"stem":194},"CRC-24","\u002Falgorithms\u002Fcrc24","2.algorithms\u002F34.crc24",{"title":196,"path":197,"stem":198},"CRC-16\u002FXMODEM","\u002Falgorithms\u002Fcrc16-xmodem","2.algorithms\u002F35.crc16-xmodem",{"title":200,"path":201,"stem":202},"Adler-32","\u002Falgorithms\u002Fadler32","2.algorithms\u002F36.adler32",{"title":204,"path":205,"stem":206},"xxHash","\u002Falgorithms\u002Fxxhash","2.algorithms\u002F37.xxhash",{"title":208,"path":209,"stem":210},"FNV-1a (64-bit)","\u002Falgorithms\u002Ffnv1a","2.algorithms\u002F38.fnv1a",{"title":212,"path":213,"stem":214},"scrypt","\u002Falgorithms\u002Fscrypt","2.algorithms\u002F39.scrypt",{"title":216,"path":217,"stem":218},"PBKDF2","\u002Falgorithms\u002Fpbkdf2","2.algorithms\u002F40.pbkdf2",{"title":220,"path":221,"stem":222},"HKDF","\u002Falgorithms\u002Fhkdf","2.algorithms\u002F41.hkdf",{"title":224,"path":225,"stem":226},"EVP_BytesToKey","\u002Falgorithms\u002Fevp-bytestokey","2.algorithms\u002F42.evp-bytestokey",{"title":228,"path":229,"stem":230},"Argon2id","\u002Falgorithms\u002Fargon2id","2.algorithms\u002F43.argon2id",{"title":232,"path":233,"stem":234},"Argon2i","\u002Falgorithms\u002Fargon2i","2.algorithms\u002F44.argon2i",{"title":236,"path":237,"stem":238},"Argon2d","\u002Falgorithms\u002Fargon2d","2.algorithms\u002F45.argon2d",{"title":240,"path":241,"stem":242},"bcrypt","\u002Falgorithms\u002Fbcrypt","2.algorithms\u002F46.bcrypt","i-lucide-library",{"id":245,"title":180,"body":246,"description":542,"extension":543,"links":544,"meta":545,"navigation":546,"path":181,"seo":547,"stem":182,"__hash__":548},"docs\u002F2.algorithms\u002F31.tiger.md",{"type":247,"value":248,"toc":537},"minimark",[249,253,257,325,328,336,339,344,347,416,419,430,433,437,448,484,493,497,500,514,533],[250,251],"algorithm-facts",{"name":252},"tiger",[254,255,256],"p",{},"Ross Anderson and Eli Biham brought Tiger to FSE 1996. MD5 and SHA-1 worked 32 bits at a time. Tiger went straight for 64. Three 64-bit words of state, three passes of eight rounds, four S-boxes of 256 words. On a 200 MHz Alpha it did 132 Mbit\u002Fs, by the authors' own count. Fast, for 1996.",[258,259,264],"pre",{"className":260,"code":261,"language":262,"meta":263,"style":263},"language-ts shiki shiki-themes hashes hashes hashes","create(\"tiger\").hash(\"abc\").digest; \u002F\u002F \"2aab1484e8c158f2bfb8c5ff41b57a525129131c957b5f93\"\ncreate(\"tiger\").hash(\"\").digest; \u002F\u002F \"3293ac630c13f0245f92bbb1766e16167a4e58492dde73f3\"\n","ts","",[265,266,267,302],"code",{"__ignoreMap":263},[268,269,272,276,280,284,287,290,292,295,298],"span",{"class":270,"line":271},"line",1,[268,273,275],{"class":274},"sK71F","create",[268,277,279],{"class":278},"s38Sx","(",[268,281,283],{"class":282},"shU9J","\"tiger\"",[268,285,286],{"class":278},").",[268,288,289],{"class":274},"hash",[268,291,279],{"class":278},[268,293,294],{"class":282},"\"abc\"",[268,296,297],{"class":278},").digest; ",[268,299,301],{"class":300},"scIB-","\u002F\u002F \"2aab1484e8c158f2bfb8c5ff41b57a525129131c957b5f93\"\n",[268,303,305,307,309,311,313,315,317,320,322],{"class":270,"line":304},2,[268,306,275],{"class":274},[268,308,279],{"class":278},[268,310,283],{"class":282},[268,312,286],{"class":278},[268,314,289],{"class":274},[268,316,279],{"class":278},[268,318,319],{"class":282},"\"\"",[268,321,297],{"class":278},[268,323,324],{"class":300},"\u002F\u002F \"3293ac630c13f0245f92bbb1766e16167a4e58492dde73f3\"\n",[254,326,327],{},"Where do those S-boxes come from? Tiger itself. Every word starts as eight copies of its own index byte. Then Tiger hashes one 64-byte sentence over and over, and each state swaps bytes around the boxes. The boxes it shuffles are the ones it hashes with. A hash that pulls itself up by its own bootstraps. And the sentence? The paper's title and its authors:",[258,329,334],{"className":330,"code":332,"language":333,"meta":263},[331],"language-text","Tiger - A Fast New Hash Function, by Ross Anderson and Eli Biham\n","text",[265,335,332],{"__ignoreMap":263},[254,337,338],{},"This package does the same on the first Tiger you ask for, instead of shipping 1024 numbers. It costs a few milliseconds, once. And it lands on the authors' boxes, or not a single vector would match.",[340,341,343],"h2",{"id":342},"which-tiger-is-this","Which Tiger is this?",[254,345,346],{},"The original. Tiger has relatives, and all of them fit in 24 bytes:",[348,349,350,369],"table",{},[351,352,353],"thead",{},[354,355,356,360,363],"tr",{},[357,358,359],"th",{},"Name",[357,361,362],{},"What changes",[357,364,365,368],{},[265,366,367],{},"abc"," starts with",[370,371,372,386,399],"tbody",{},[354,373,374,378,381],{},[375,376,377],"td",{},"Tiger (this one)",[375,379,380],{},"nothing",[375,382,383],{},[265,384,385],{},"2aab1484",[354,387,388,391,394],{},[375,389,390],{},"Tiger2",[375,392,393],{},"the padding opens with 0x80, like MD5, not 0x01",[375,395,396],{},[265,397,398],{},"f68d7bc5",[354,400,401,404,411],{},[375,402,403],{},"Tiger printed as words",[375,405,406,407,410],{},"each 64-bit word printed as a number, the way the authors' ",[265,408,409],{},"testtiger"," does",[375,412,413],{},[265,414,415],{},"f258c1e8",[254,417,418],{},"Same input, three answers. The first is Tiger. The second is another hash. The third is Tiger read backwards, eight bytes at a time. This package prints bytes, like NESSIE and PHP do.",[254,420,421,422,425,426,429],{},"So ",[265,423,424],{},"create(\"tiger2\")"," throws instead of quietly handing you Tiger. ",[265,427,428],{},"identifyDigest"," puts Tiger first for a 24-byte digest and lists Tiger2 as one it can't compute. Got a digest that matches neither? Flip every 8-byte group and try again.",[254,431,432],{},"Tiger\u002F128 and Tiger\u002F160 are just the first 16 and 20 bytes. No starting values of their own, so cut the digest yourself.",[340,434,436],{"id":435},"what-about-tth","What about TTH?",[254,438,439,440,443,444,447],{},"Seen ",[265,441,442],{},"urn:tree:tiger:"," in a magnet link? That's a Tiger Tree Hash, the one Direct Connect and Gnutella clients swap. A file gets cut into 1024-byte leaves. Each leaf is hashed behind a zero byte, each pair of hashes behind a one byte, up to a single root. A file under 1 KiB is one leaf, so its TTH is Tiger of ",[265,445,446],{},"0x00"," and the file:",[258,449,451],{"className":260,"code":450,"language":262,"meta":263,"style":263},"create(\"tiger\").hash(Uint8Array.fromHex(\"00616263\")).digest;\n\u002F\u002F \"0487ca26443f59cfbc780f3ca0ce509c8c352c27c5dcca20\"\n",[265,452,453,479],{"__ignoreMap":263},[268,454,455,457,459,461,463,465,468,471,473,476],{"class":270,"line":271},[268,456,275],{"class":274},[268,458,279],{"class":278},[268,460,283],{"class":282},[268,462,286],{"class":278},[268,464,289],{"class":274},[268,466,467],{"class":278},"(Uint8Array.",[268,469,470],{"class":274},"fromHex",[268,472,279],{"class":278},[268,474,475],{"class":282},"\"00616263\"",[268,477,478],{"class":278},")).digest;\n",[268,480,481],{"class":270,"line":304},[268,482,483],{"class":300},"\u002F\u002F \"0487ca26443f59cfbc780f3ca0ce509c8c352c27c5dcca20\"\n",[254,485,486,489,490,492],{},[265,487,488],{},"rhash --tth --hex"," on a file holding ",[265,491,367],{}," prints exactly that. The magnet link carries it in base32. The tree isn't built here, only the hash it's made of.",[340,494,496],{"id":495},"is-it-broken","Is it broken?",[254,498,499],{},"Not really. Collisions reach 19 of its 24 rounds, at about 2^62 (Mendel and others, 2006). The full function only gives up pseudo-near-collisions, where the attacker picks the starting state too (Mendel and Rijmen, 2007). MD5 and SHA-1 would kill for that record.",[254,501,502,503,506,507,513],{},"One catch, and it has nothing to do with rounds. The digest is the whole state, so ",[265,504,505],{},"Tiger(secret + message)"," extends like MD5 does. ",[508,509,510],"a",{"href":25},[265,511,512],{},"extendDigest"," forges it without the secret. Want a MAC? Use HMAC.",[254,515,516,517,520,521,524,525,528,529,532],{},"So why ",[265,518,519],{},"legacy","? Hardly anyone took it up outside file sharing. OpenPGP thought about Tiger and took RIPEMD-160. Today it lives in those clients and in PHP's ",[265,522,523],{},"hash()"," as ",[265,526,527],{},"tiger192,3",". HMAC runs over its 64-byte blocks and matches PHP's ",[265,530,531],{},"hash_hmac",". Check old TTHs with it. New code gets SHA-256 or BLAKE3.",[534,535,536],"style",{},"html pre.shiki code .sK71F, html code.shiki .sK71F{--shiki-light:var(--shiki-token-function);--shiki-default:var(--shiki-token-function);--shiki-dark:var(--shiki-token-function)}html pre.shiki code .s38Sx, html code.shiki .s38Sx{--shiki-light:var(--ui-text-highlighted);--shiki-default:var(--ui-text-highlighted);--shiki-dark:var(--ui-text-highlighted)}html pre.shiki code .shU9J, html code.shiki .shU9J{--shiki-light:var(--shiki-token-string);--shiki-default:var(--shiki-token-string);--shiki-dark:var(--shiki-token-string)}html pre.shiki code .scIB-, html code.shiki .scIB-{--shiki-light:var(--shiki-token-comment);--shiki-default:var(--shiki-token-comment);--shiki-dark:var(--shiki-token-comment)}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":263,"searchDepth":304,"depth":304,"links":538},[539,540,541],{"id":342,"depth":304,"text":343},{"id":435,"depth":304,"text":436},{"id":495,"depth":304,"text":496},"Anderson and Biham's 1996 hash for 64-bit machines. 192 bits and the hash under every Tiger Tree Hash","md",null,{},true,{"title":180,"description":542},"D03HMNC1NGZaUSn01A-vQfHqr2M28UeH2YTUZ2Z7pxk",[550,552],{"title":176,"path":177,"stem":178,"description":551,"children":-1},"Fifteen hashes under one name from 1992. Three pass counts times five lengths and the name alone never says which",{"title":184,"path":185,"stem":186,"description":553,"children":-1},"The error-detection checksum in every ZIP and PNG and gzip, and unreflected in bzip2. Four bytes and useless against an attacker",1791911608299]