{"id":17891611,"url":"https://github.com/aupiff/keccak","last_synced_at":"2025-03-22T20:35:20.021Z","repository":{"id":56845033,"uuid":"111173719","full_name":"aupiff/keccak","owner":"aupiff","description":"Keccak hash functions","archived":false,"fork":false,"pushed_at":"2019-10-28T20:08:53.000Z","size":13262,"stargazers_count":10,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-15T08:20:53.705Z","etag":null,"topics":["haskell","keccak","pure-haskell","sha3","shake","sponge"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","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/aupiff.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}},"created_at":"2017-11-18T03:37:38.000Z","updated_at":"2023-06-25T13:01:19.000Z","dependencies_parsed_at":"2022-09-17T11:02:26.777Z","dependency_job_id":null,"html_url":"https://github.com/aupiff/keccak","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aupiff%2Fkeccak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aupiff%2Fkeccak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aupiff%2Fkeccak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aupiff%2Fkeccak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aupiff","download_url":"https://codeload.github.com/aupiff/keccak/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221825457,"owners_count":16886970,"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":["haskell","keccak","pure-haskell","sha3","shake","sponge"],"created_at":"2024-10-28T14:19:15.663Z","updated_at":"2024-10-28T14:19:16.242Z","avatar_url":"https://github.com/aupiff.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# keccak\n\n[![Travis\nCI](https://img.shields.io/travis/aupiff/keccak.svg?label=Travis%20CI)](https://travis-ci.org/aupiff/keccak)\n\nA pure haskell implementation of the keccak family of hashes.\n\nDocumentation available on\n[Hackage](http://hackage.haskell.org/package/keccak).\n\n## Example usage\n\nIn the example usage below, I encode `ByteString`s in base16 so that they\ncan be read as standard hex strings.\n\n```haskell\nghci\u003e import Data.ByteString.Base16 as BS16\n\nghci\u003e :t keccak256\nkeccak256 :: BS.ByteString -\u003e BS.ByteString\n\nghci\u003e BS16.encode $ keccak256 \"testing\"\n\"5f16f4c7f149ac4f9510d9cf8cf384038ad348b3bcdc01915f95de12df9d1b02\"\n\nghci\u003e BS16.encode $ keccak256 \"\"\n\"c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470\"\n```\n\n## Testing\n\n```\nstack test\n```\n\nNIST uses the [Secure Hash Algorithm Validation System\n(SHAVS)](https://csrc.nist.gov/CSRC/media//Projects/Cryptographic-Algorithm-Validation-Program/documents/shs/SHAVS.pdf)\nto validate the correctness of hash implementations. For all four variants of\nSHA3 and Keccak and the two standard variants of SHAKE, the `keccak` library's\nimplementations successfully\n[pass](https://github.com/aupiff/keccak/blob/master/test/Spec.hs) the standard\nKATs (Known Answer Tests).\n\n## Benchmarks\n\n```\nstack bench\n```\n\n`cryptonite`'s C-based implementation of Keccack256 is currently 21 times faster\nthan my Haskell.\n\n```\nbenchmarked keccak\ntime                 768.3 μs   (758.7 μs .. 775.7 μs)\n                     0.998 R²   (0.995 R² .. 0.999 R²)\nmean                 774.2 μs   (767.5 μs .. 784.0 μs)\nstd dev              29.27 μs   (23.12 μs .. 36.87 μs)\nvariance introduced by outliers: 19% (moderately inflated)\n\nbenchmarked cryptonite-keccak\ntime                 36.92 μs   (35.95 μs .. 38.03 μs)\n                     0.996 R²   (0.995 R² .. 0.998 R²)\nmean                 36.27 μs   (35.99 μs .. 36.66 μs)\nstd dev              1.147 μs   (918.3 ns .. 1.471 μs)\nvariance introduced by outliers: 14% (moderately inflated)\n```\n\nEventually, I hope the library will have very few dependencies (only base,\nvector \u0026 bytestring, currently) and excellent performance.\n\n## References\n\n[Cryptographic Sponge Functions](https://keccak.team/files/CSF-0.1.pdf)\n\n[Official Keccak Reference](https://keccak.team/files/Keccak-reference-3.0.pdf)\n\n[Specification summary](https://keccak.team/keccak_specs_summary.html)\n\n[SHA-3 Derived Functions](https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-185.pdf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faupiff%2Fkeccak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faupiff%2Fkeccak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faupiff%2Fkeccak/lists"}