{"id":13531420,"url":"https://github.com/debris/tiny-keccak","last_synced_at":"2025-05-15T18:06:41.395Z","repository":{"id":38375005,"uuid":"46973415","full_name":"debris/tiny-keccak","owner":"debris","description":"An implementation of Keccak derived functions specified in FIPS-202, SP800-185 and KangarooTwelve","archived":false,"fork":false,"pushed_at":"2024-06-10T04:04:53.000Z","size":157,"stargazers_count":199,"open_issues_count":8,"forks_count":56,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-31T13:21:05.591Z","etag":null,"topics":["cryptography","cshake","fips-202","kangarootwelve","keccak","kmac","parallelhash","rust","sha3","shake","tuplehash"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/debris.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":"2015-11-27T10:07:47.000Z","updated_at":"2025-02-25T08:50:20.000Z","dependencies_parsed_at":"2024-11-05T18:36:00.235Z","dependency_job_id":"cc8d085e-5b6c-45f4-8576-00e70beafe72","html_url":"https://github.com/debris/tiny-keccak","commit_stats":{"total_commits":125,"total_committers":13,"mean_commits":9.615384615384615,"dds":"0.21599999999999997","last_synced_commit":"f0fa14629021cdffe1041eee7261843fb05bb373"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debris%2Ftiny-keccak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debris%2Ftiny-keccak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debris%2Ftiny-keccak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debris%2Ftiny-keccak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/debris","download_url":"https://codeload.github.com/debris/tiny-keccak/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247737788,"owners_count":20987721,"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":["cryptography","cshake","fips-202","kangarootwelve","keccak","kmac","parallelhash","rust","sha3","shake","tuplehash"],"created_at":"2024-08-01T07:01:02.900Z","updated_at":"2025-04-07T22:11:17.912Z","avatar_url":"https://github.com/debris.png","language":"Rust","readme":"# tiny-keccak\n\nAn implementation of Keccak derived functions specified in [`FIPS-202`], [`SP800-185`] and [`KangarooTwelve`].\n\n[![Build Status][travis-image]][travis-url]\n\n[travis-image]: https://travis-ci.org/debris/tiny-keccak.svg?branch=master\n[travis-url]: https://travis-ci.org/debris/tiny-keccak\n[`FIPS-202`]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf\n[`SP800-185`]: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-185.pdf\n[`KangarooTwelve`]: https://eprint.iacr.org/2016/770.pdf\n\n[`Documentation`](https://docs.rs/tiny-keccak)\n\nThe `Keccak-f[1600]` permutation is fully unrolled; it's nearly as fast\nas the Keccak team's optimized permutation.\n\n## Usage\n\nIn your `Cargo.toml` specify what features (hash functions, you are intending to use).\nAvailable options are: `cshake`, `fips202`, `k12`, `keccak`, `kmac`, `parallel_hash`, `sha3`,\n`shake`, `sp800`, `tuple_hash`.\n\n```toml\n[dependencies]\ntiny-keccak = { version = \"2.0\", features = [\"sha3\"] }\n```\n\n## Example\n\n```rust\nuse tiny_keccak::Sha3;\n\nfn main() {\n    let mut sha3 = Sha3::v256();\n    let mut output = [0u8; 32];\n    let expected = b\"\\\n        \\x64\\x4b\\xcc\\x7e\\x56\\x43\\x73\\x04\\x09\\x99\\xaa\\xc8\\x9e\\x76\\x22\\xf3\\\n        \\xca\\x71\\xfb\\xa1\\xd9\\x72\\xfd\\x94\\xa3\\x1c\\x3b\\xfb\\xf2\\x4e\\x39\\x38\\\n    \";\n\n    sha3.update(b\"hello\");\n    sha3.update(b\" \");\n    sha3.update(b\"world\");\n    sha3.finalize(\u0026mut output);\n\n    assert_eq!(expected, \u0026output);\n}\n```\n\n## Benchmarks\n\nBenchmarked with [rust-crypto](https://github.com/RustCrypto) sha3 on:\n\n```\nMacBook Pro (Retina, 15-inch, Mid 2015)\n2,5 GHz Intel Core i7\n16 GB 1600 MHz DDR3\nIntel Iris Pro 1536 MB\n```\n\nBenchmark code is available [here](https://github.com/debris/tiny-keccak/blob/master/comparison/benches/sha3.rs)\n\n```\nrunning 4 tests\ntest rust_crypto_sha3_256_input_32_bytes   ... bench:         677 ns/iter (+/- 113) = 47 MB/s\ntest rust_crypto_sha3_256_input_4096_bytes ... bench:      17,619 ns/iter (+/- 4,174) = 232 MB/s\ntest tiny_keccak_sha3_256_input_32_bytes   ... bench:         569 ns/iter (+/- 204) = 56 MB/s\ntest tiny_keccak_sha3_256_input_4096_bytes ... bench:      17,185 ns/iter (+/- 4,575) = 238 MB/s\n```\n","funding_links":[],"categories":["Libraries","库 Libraries","Cryptography","Rust"],"sub_categories":["Cryptography","密码学 Cryptography","Hash Function"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebris%2Ftiny-keccak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdebris%2Ftiny-keccak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebris%2Ftiny-keccak/lists"}