[{"data":1,"prerenderedAt":303},["ShallowReactive",2],{"navigation_docs":3,"-algorithms-pbkdf2":148,"-algorithms-pbkdf2-surround":300},[4,40],{"title":5,"path":6,"stem":7,"children":8,"icon":39},"Guide","\u002Fguide","1.guide\u002F01.index",[9,11,15,19,23,27,31,35],{"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},"CLI","\u002Fguide\u002Fcli","1.guide\u002F05.cli",{"title":28,"path":29,"stem":30},"Agents","\u002Fguide\u002Fagents","1.guide\u002F06.agents",{"title":32,"path":33,"stem":34},"Custom algorithms","\u002Fguide\u002Fcustom","1.guide\u002F07.custom",{"title":36,"path":37,"stem":38},"Playground","\u002Fguide\u002Fplayground","1.guide\u002F08.playground","i-lucide-book-open",{"title":41,"path":42,"stem":43,"children":44,"icon":147},"Algorithms","\u002Falgorithms","2.algorithms\u002F00.index",[45,47,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127,131,135,139,143],{"title":46,"path":42,"stem":43},"Every algorithm",{"title":48,"path":49,"stem":50},"SHA-256","\u002Falgorithms\u002Fsha256","2.algorithms\u002F01.sha256",{"title":52,"path":53,"stem":54},"SHA-384","\u002Falgorithms\u002Fsha384","2.algorithms\u002F02.sha384",{"title":56,"path":57,"stem":58},"SHA-512","\u002Falgorithms\u002Fsha512","2.algorithms\u002F03.sha512",{"title":60,"path":61,"stem":62},"SHA-512Half","\u002Falgorithms\u002Fsha512-half","2.algorithms\u002F04.sha512-half",{"title":64,"path":65,"stem":66},"SHA3-256","\u002Falgorithms\u002Fsha3-256","2.algorithms\u002F05.sha3-256",{"title":68,"path":69,"stem":70},"SHA3-512","\u002Falgorithms\u002Fsha3-512","2.algorithms\u002F06.sha3-512",{"title":72,"path":73,"stem":74},"Keccak-256","\u002Falgorithms\u002Fkeccak256","2.algorithms\u002F07.keccak256",{"title":76,"path":77,"stem":78},"BLAKE2b","\u002Falgorithms\u002Fblake2b","2.algorithms\u002F08.blake2b",{"title":80,"path":81,"stem":82},"BLAKE2b-256","\u002Falgorithms\u002Fblake2b-256","2.algorithms\u002F09.blake2b-256",{"title":84,"path":85,"stem":86},"BLAKE2b-224","\u002Falgorithms\u002Fblake2b-224","2.algorithms\u002F10.blake2b-224",{"title":88,"path":89,"stem":90},"BLAKE2s","\u002Falgorithms\u002Fblake2s","2.algorithms\u002F11.blake2s",{"title":92,"path":93,"stem":94},"BLAKE3","\u002Falgorithms\u002Fblake3","2.algorithms\u002F12.blake3",{"title":96,"path":97,"stem":98},"BLAKE-256","\u002Falgorithms\u002Fblake256","2.algorithms\u002F13.blake256",{"title":100,"path":101,"stem":102},"RIPEMD-160","\u002Falgorithms\u002Fripemd160","2.algorithms\u002F14.ripemd160",{"title":104,"path":105,"stem":106},"HASH160","\u002Falgorithms\u002Fhash160","2.algorithms\u002F15.hash160",{"title":108,"path":109,"stem":110},"HASH256","\u002Falgorithms\u002Fhash256","2.algorithms\u002F16.hash256",{"title":112,"path":113,"stem":114},"MD5","\u002Falgorithms\u002Fmd5","2.algorithms\u002F17.md5",{"title":116,"path":117,"stem":118},"SHA-1","\u002Falgorithms\u002Fsha1","2.algorithms\u002F18.sha1",{"title":120,"path":121,"stem":122},"SHA-0","\u002Falgorithms\u002Fsha0","2.algorithms\u002F19.sha0",{"title":124,"path":125,"stem":126},"CRC-32","\u002Falgorithms\u002Fcrc32","2.algorithms\u002F20.crc32",{"title":128,"path":129,"stem":130},"CRC-16\u002FXMODEM","\u002Falgorithms\u002Fcrc16-xmodem","2.algorithms\u002F21.crc16-xmodem",{"title":132,"path":133,"stem":134},"xxHash (XXH64)","\u002Falgorithms\u002Fxxhash","2.algorithms\u002F22.xxhash",{"title":136,"path":137,"stem":138},"FNV-1a (64-bit)","\u002Falgorithms\u002Ffnv1a","2.algorithms\u002F23.fnv1a",{"title":140,"path":141,"stem":142},"scrypt","\u002Falgorithms\u002Fscrypt","2.algorithms\u002F24.scrypt",{"title":144,"path":145,"stem":146},"PBKDF2","\u002Falgorithms\u002Fpbkdf2","2.algorithms\u002F25.pbkdf2","i-lucide-library",{"id":149,"title":144,"body":150,"description":293,"extension":294,"links":295,"meta":296,"navigation":297,"path":145,"seo":298,"stem":146,"__hash__":299},"docs\u002F2.algorithms\u002F25.pbkdf2.md",{"type":151,"value":152,"toc":291},"minimark",[153,157,166,254,287],[154,155],"algorithm-facts",{"name":156},"pbkdf2",[158,159,160,161,165],"p",{},"PBKDF2 runs HMAC over the password and salt, then again over the result, ",[162,163,164],"code",{},"iterations"," times, and XORs the rounds together. It's slow by counting, not by memory, so GPUs love it more than scrypt. Still everywhere: WPA2, BIP39 seeds (2048 rounds of HMAC-SHA512), most password stores from before 2015.",[167,168,173],"pre",{"className":169,"code":170,"language":171,"meta":172,"style":172},"language-ts shiki shiki-themes hashes hashes hashes","create(\"pbkdf2\").hash(\"password\", {\n  salt: \"73616c74\",\n  iterations: 4096,\n  digest: \"sha256\",\n  keyLength: 32,\n}).digest;\n\u002F\u002F \"c5e478d59288c841aa530db6845c4c8d962893a001ce4e11a4963873aa98134a\"\n","ts","",[162,174,175,206,218,224,235,241,247],{"__ignoreMap":172},[176,177,180,184,188,192,195,198,200,203],"span",{"class":178,"line":179},"line",1,[176,181,183],{"class":182},"sK71F","create",[176,185,187],{"class":186},"s38Sx","(",[176,189,191],{"class":190},"shU9J","\"pbkdf2\"",[176,193,194],{"class":186},").",[176,196,197],{"class":182},"hash",[176,199,187],{"class":186},[176,201,202],{"class":190},"\"password\"",[176,204,205],{"class":186},", {\n",[176,207,209,212,215],{"class":178,"line":208},2,[176,210,211],{"class":186},"  salt: ",[176,213,214],{"class":190},"\"73616c74\"",[176,216,217],{"class":186},",\n",[176,219,221],{"class":178,"line":220},3,[176,222,223],{"class":186},"  iterations: 4096,\n",[176,225,227,230,233],{"class":178,"line":226},4,[176,228,229],{"class":186},"  digest: ",[176,231,232],{"class":190},"\"sha256\"",[176,234,217],{"class":186},[176,236,238],{"class":178,"line":237},5,[176,239,240],{"class":186},"  keyLength: 32,\n",[176,242,244],{"class":178,"line":243},6,[176,245,246],{"class":186},"}).digest;\n",[176,248,250],{"class":178,"line":249},7,[176,251,253],{"class":252},"scIB-","\u002F\u002F \"c5e478d59288c841aa530db6845c4c8d962893a001ce4e11a4963873aa98134a\"\n",[158,255,256,259,260,263,264,267,268,271,272,271,275,278,279,282,283,286],{},[162,257,258],{},"73616c74"," is ",[162,261,262],{},"salt"," in hex. ",[162,265,266],{},"digest"," picks the HMAC underneath: ",[162,269,270],{},"sha256",", ",[162,273,274],{},"sha384",[162,276,277],{},"sha512"," (the default), ",[162,280,281],{},"sha3-256"," or ",[162,284,285],{},"sha3-512",". The default 600000 iterations is OWASP's number for HMAC-SHA256. With SHA-512 OWASP asks for 220000, so the default errs slow, which is the right way to err. The page above uses 1000 for its sample, so it renders in a blink instead of a second.",[288,289,290],"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":172,"searchDepth":208,"depth":208,"links":292},[],"HMAC run a few hundred thousand times. The NIST password KDF with a salt and iterations and a choice of hash","md",null,{},true,{"title":144,"description":293},"oh4AXGwwf-hXqnWV8oUYIGXdYK2Y05xJ3wnI7MZuHpw",[301,295],{"title":140,"path":141,"stem":142,"description":302,"children":-1},"A memory-hard password KDF. Needs a salt and prints the one it drew and the cost it ran with",1790683657735]