{"id":13560514,"url":"https://github.com/lukechampine/blake3","last_synced_at":"2025-05-16T09:00:20.428Z","repository":{"id":43057759,"uuid":"232895619","full_name":"lukechampine/blake3","owner":"lukechampine","description":"An AVX-512 accelerated implementation of the BLAKE3 cryptographic hash function","archived":false,"fork":false,"pushed_at":"2025-02-24T23:00:51.000Z","size":95,"stargazers_count":382,"open_issues_count":6,"forks_count":26,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-26T14:02:23.154Z","etag":null,"topics":["blake3","hash"],"latest_commit_sha":null,"homepage":"","language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukechampine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-09T20:10:45.000Z","updated_at":"2025-04-22T14:21:02.000Z","dependencies_parsed_at":"2024-01-14T02:41:56.749Z","dependency_job_id":"3caa67ce-f105-4d0d-92e5-bee5d47ee3c9","html_url":"https://github.com/lukechampine/blake3","commit_stats":{"total_commits":52,"total_committers":2,"mean_commits":26.0,"dds":"0.11538461538461542","last_synced_commit":"4f5562c16b85a956bc8d650dc15344e1e1eb7c8c"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukechampine%2Fblake3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukechampine%2Fblake3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukechampine%2Fblake3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukechampine%2Fblake3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukechampine","download_url":"https://codeload.github.com/lukechampine/blake3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254501547,"owners_count":22081526,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blake3","hash"],"created_at":"2024-08-01T13:00:45.644Z","updated_at":"2025-05-16T09:00:18.476Z","avatar_url":"https://github.com/lukechampine.png","language":"Assembly","funding_links":[],"categories":["Assembly"],"sub_categories":[],"readme":"blake3\n------\n\n[![GoDoc](https://godoc.org/lukechampine.com/blake3?status.svg)](https://godoc.org/lukechampine.com/blake3)\n[![Go Report Card](http://goreportcard.com/badge/lukechampine.com/blake3)](https://goreportcard.com/report/lukechampine.com/blake3)\n\n```\ngo get lukechampine.com/blake3\n```\n\n`blake3` implements the [BLAKE3 cryptographic hash function](https://github.com/BLAKE3-team/BLAKE3).\nThis implementation aims to be performant without sacrificing (too much)\nreadability, in the hopes of eventually landing in `x/crypto`.\n\nIn addition to the pure-Go implementation, this package also contains AVX-512\nand AVX2 routines (generated by [`avo`](https://github.com/mmcloughlin/avo))\nthat greatly increase performance for large inputs and outputs.\n\n## Benchmarks\n\nTested on a 2020 MacBook Air (i5-7600K @ 3.80GHz). Benchmarks will improve as\nsoon as I get access to a beefier AVX-512 machine. :wink:\n\n### AVX-512\n\n```\nBenchmarkSum256/64           120 ns/op       533.00 MB/s\nBenchmarkSum256/1024        2229 ns/op       459.36 MB/s\nBenchmarkSum256/65536      16245 ns/op      4034.11 MB/s\nBenchmarkWrite               245 ns/op      4177.38 MB/s\nBenchmarkXOF                 246 ns/op      4159.30 MB/s\n```\n\n### AVX2\n\n```\nBenchmarkSum256/64           120 ns/op       533.00 MB/s\nBenchmarkSum256/1024        2229 ns/op       459.36 MB/s\nBenchmarkSum256/65536      31137 ns/op      2104.76 MB/s\nBenchmarkWrite               487 ns/op      2103.12 MB/s\nBenchmarkXOF                 329 ns/op      3111.27 MB/s\n```\n\n### Pure Go\n\n```\nBenchmarkSum256/64           120 ns/op       533.00 MB/s\nBenchmarkSum256/1024        2229 ns/op       459.36 MB/s\nBenchmarkSum256/65536     133505 ns/op       490.89 MB/s\nBenchmarkWrite              2022 ns/op       506.36 MB/s\nBenchmarkXOF                1914 ns/op       534.98 MB/s\n```\n\n## Shortcomings\n\nThere is no assembly routine for single-block compressions. This is most\nnoticeable for ~1KB inputs.\n\nEach assembly routine inlines all 7 rounds, causing thousands of lines of\nduplicated code. Ideally the routines could be merged such that only a single\nroutine is generated for AVX-512 and AVX2, without sacrificing too much\nperformance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukechampine%2Fblake3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukechampine%2Fblake3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukechampine%2Fblake3/lists"}