{"id":26933544,"url":"https://github.com/ppad-tech/ripemd160","last_synced_at":"2025-04-02T09:19:33.157Z","repository":{"id":262670598,"uuid":"887148023","full_name":"ppad-tech/ripemd160","owner":"ppad-tech","description":"(mirror of https://git.ppad.tech/ripemd160)","archived":false,"fork":false,"pushed_at":"2025-03-01T04:22:45.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-01T05:21:11.513Z","etag":null,"topics":[],"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/ppad-tech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","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":"2024-11-12T08:51:00.000Z","updated_at":"2025-03-01T04:22:48.000Z","dependencies_parsed_at":"2025-01-17T20:19:01.556Z","dependency_job_id":"d1cd4dfb-3795-4dd4-a7a0-bb5417d1f885","html_url":"https://github.com/ppad-tech/ripemd160","commit_stats":null,"previous_names":["ppad-tech/ripemd160"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppad-tech%2Fripemd160","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppad-tech%2Fripemd160/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppad-tech%2Fripemd160/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppad-tech%2Fripemd160/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ppad-tech","download_url":"https://codeload.github.com/ppad-tech/ripemd160/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246785456,"owners_count":20833498,"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":[],"created_at":"2025-04-02T09:19:32.592Z","updated_at":"2025-04-02T09:19:33.147Z","avatar_url":"https://github.com/ppad-tech.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ripemd160\n\n[![](https://img.shields.io/hackage/v/ppad-ripemd160?color=blue)](https://hackage.haskell.org/package/ppad-ripemd160)\n![](https://img.shields.io/badge/license-MIT-brightgreen)\n[![](https://img.shields.io/badge/haddock-ripemd160-lightblue)](https://docs.ppad.tech/ripemd160)\n\nA pure Haskell implementation of [RIPEMD-160][ripem] and HMAC-RIPEMD160\non strict and lazy ByteStrings.\n\n## Usage\n\nA sample GHCi session:\n\n```\n  \u003e :set -XOverloadedStrings\n  \u003e\n  \u003e -- import qualified\n  \u003e import qualified Crypto.Hash.RIPEMD160 as RIPEMD160\n  \u003e\n  \u003e -- 'hash' and 'hmac' operate on strict bytestrings\n  \u003e\n  \u003e let hash_s = RIPEMD160.hash \"strict bytestring input\"\n  \u003e let hmac_s = RIPEMD160.hmac \"strict secret\" \"strict bytestring input\"\n  \u003e\n  \u003e -- 'hash_lazy' and 'hmac_lazy' operate on lazy bytestrings\n  \u003e -- but note that the key for HMAC is always strict\n  \u003e\n  \u003e let hash_l = RIPEMD160.hash_lazy \"lazy bytestring input\"\n  \u003e let hmac_l = RIPEMD160.hmac_lazy \"strict secret\" \"lazy bytestring input\"\n  \u003e\n  \u003e -- results are always unformatted 160-bit (20-byte) strict bytestrings\n  \u003e\n  \u003e import qualified Data.ByteString as BS\n  \u003e\n  \u003e BS.take 10 hash_s\n  \"=\\211\\211\\197]\\NULJ\\223n\\223\"\n  \u003e BS.take 10 hmac_l\n  \"\\154\\248\\145[\\196\\ETX\\f\\ESC\\NULs\"\n  \u003e\n  \u003e -- you can use third-party libraries for rendering if needed\n  \u003e -- e.g., using ppad-base16:\n  \u003e\n  \u003e import qualified Data.ByteString.Base16 as B16\n  \u003e\n  \u003e B16.encode hash_s\n  \"3dd3d3c55d004adf6edf9e11cb01f9ac9c56441f\"\n  \u003e B16.encode hmac_l\n  \"9af8915bc4030c1b007323c8531b3129d82f50bd\"\n```\n\n## Documentation\n\nHaddocks (API documentation, etc.) are hosted at\n[docs.ppad.tech/ripemd160][hadoc].\n\n## Performance\n\nThe aim is best-in-class performance for pure, highly-auditable Haskell\ncode.\n\nCurrent benchmark figures on my mid-2020 MacBook Air look like (use\n`cabal bench` to run the benchmark suite):\n\n```\n  benchmarking ppad-ripemd160/RIPEMD160 (32B input)/hash\n  time                 786.6 ns   (778.0 ns .. 796.7 ns)\n                       0.999 R²   (0.999 R² .. 1.000 R²)\n  mean                 778.6 ns   (775.3 ns .. 784.2 ns)\n  std dev              13.85 ns   (9.858 ns .. 22.05 ns)\n  variance introduced by outliers: 20% (moderately inflated)\n\n  benchmarking ppad-ripemd160/HMAC-RIPEMD160 (32B input)/hmac\n  time                 2.933 μs   (2.906 μs .. 2.974 μs)\n                       0.999 R²   (0.999 R² .. 0.999 R²)\n  mean                 3.002 μs   (2.978 μs .. 3.022 μs)\n  std dev              74.97 ns   (62.74 ns .. 89.91 ns)\n  variance introduced by outliers: 30% (moderately inflated)\n```\n\n## Security\n\nThis library aims at the maximum security achievable in a\ngarbage-collected language under an optimizing compiler such as GHC, in\nwhich strict constant-timeness can be challenging to achieve.\n\nThe RIPEMD-160 functions pass the vectors present in the [official\nspec][ripem], and the HMAC-RIPEMD160 functions pass all vectors found\ncontained in [RFC2286][rfc22].\n\nIf you discover any vulnerabilities, please disclose them via\nsecurity@ppad.tech.\n\n## Development\n\nYou'll require [Nix][nixos] with [flake][flake] support enabled. Enter a\ndevelopment shell with:\n\n```\n$ nix develop\n```\n\nThen do e.g.:\n\n```\n$ cabal repl ppad-ripemd160\n```\n\nto get a REPL for the main library.\n\n[nixos]: https://nixos.org/\n[flake]: https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake.html\n[hadoc]: https://docs.ppad.tech/ripemd160\n[ripem]: https://homes.esat.kuleuven.be/~bosselae/ripemd160/pdf/AB-9601/AB-9601.pdf\n[rfc22]: https://www.rfc-editor.org/rfc/rfc2286.html#section-2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppad-tech%2Fripemd160","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fppad-tech%2Fripemd160","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppad-tech%2Fripemd160/lists"}