{"id":38020149,"url":"https://github.com/ansemjo/randomart","last_synced_at":"2026-01-16T19:28:20.354Z","repository":{"id":57459839,"uuid":"158834689","full_name":"ansemjo/randomart","owner":"ansemjo","description":"generate plaintext pictures from a hash, similar to OpenSSH's keygen randomart","archived":false,"fork":false,"pushed_at":"2024-11-11T08:22:45.000Z","size":74,"stargazers_count":21,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-23T22:21:13.030Z","etag":null,"topics":["digest","python","randomart","shake256"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/ansemjo.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":"2018-11-23T13:12:19.000Z","updated_at":"2025-06-24T07:32:32.000Z","dependencies_parsed_at":"2022-09-09T23:02:09.376Z","dependency_job_id":null,"html_url":"https://github.com/ansemjo/randomart","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ansemjo/randomart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansemjo%2Frandomart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansemjo%2Frandomart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansemjo%2Frandomart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansemjo%2Frandomart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ansemjo","download_url":"https://codeload.github.com/ansemjo/randomart/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansemjo%2Frandomart/sbom","scorecard":{"id":198062,"data":{"date":"2025-08-11","repo":{"name":"github.com/ansemjo/randomart","commit":"0c00bc5db99c0410bf5a2c442653946ae5a7979a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T22:12:11.903Z","repository_id":57459839,"created_at":"2025-08-16T22:12:11.903Z","updated_at":"2025-08-16T22:12:11.903Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28481726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["digest","python","randomart","shake256"],"created_at":"2026-01-16T19:28:19.484Z","updated_at":"2026-01-16T19:28:20.259Z","avatar_url":"https://github.com/ansemjo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# randomart.py\n\nA script to present BLAKE2b hashes as small ASCII-art pictures, similarly to OpenSSH's\n[randomart](https://superuser.com/q/22535).\n\nThis allows easier verification by humans but may not be as secure as a bytewise comparison of the\ndigest!\n\n\u003cspan style=\"display:block;text-align:center\"\u003e![](assets/randomart.png)\u003c/span\u003e\n\nSee the paper [Hash Visualization: a New Technique to improve Real-World Security][perrig]\nfor more information on the concept of random art.\n\nThe paper [The drunken bishop: An analysis of the OpenSSH fingerprint visualization\nalgorithm][bishop] analyses the OpenSSH implementation in more detail.\n\nJust to be clear: the input is passed into a hash function and its output is then used to generate the\nASCII art. By virtue of BLAKE2b being a cryptographically secure hash function, *any* change in input\nwill lead to a radically different output.\n\nIt should also be explicitly noted that my algorithm is _similar_ but not _identical_ to the \"drunken\nbishop\" walk of the OpenSSH implementation. The implementation at hand:\n\n- flips sides at the borders, which turns the field into a torus\n- moves in all possible directions with distance 1, not only diagonally\n- does not mark start (`S`) and end (`E`) and uses a different character palette\n\nI have not performed any similar analysis[\u003csup\u003e2\u003c/sup\u003e][^2] but would expect my implementation to\nperform no worse.\n\n## installation\n\nInstall the latest version with pip directly from GitHub:\n\n    pip install git+https://github.com/ansemjo/randomart\n\nOr from [PyPI](https://pypi.org/project/randomart/):\n\n    pip install randomart\n\n## usage\n\nThe script expects a file in the first positional argument or otherwise simply reads from standard\ninput. It is thus best suitable for usage in a pipe:\n\n    echo 'Hello, World!' | randomart.py\n\nThere are two flags to control the output:\n\n- `--ascii` use only ASCII characters for the box frame\n- `--hash` - print the computed digest before the randomart picture\n\nOtherwise use `randomart.py --help` for usage help.\n\n### as a library\n\nIf you want to use your own hash you can import from `random_art.randomart`:\n\n```python\nfrom random_art.randomart import draw, drunkenwalk\n...\n\n# generate your hash digest\ndigest = ...\n\n# generate randomart, HASHNAME must be 10 characters\nart = draw(drunkenwalk(digest), HASHNAME)\nprint(art)\n```\n\n[perrig]: http://www.ece.cmu.edu/~adrian/projects/validation/validation.pdf \"Perrig A. and Song D., 1999,  International Workshop on Cryptographic Techniques and E-Commerce (CrypTEC '99)\"\n[bishop]: http://www.dirk-loss.de/sshvis/drunken_bishop.pdf \"Dirk Loss, Tobias Limmer, Alexander von Gernler, 2009\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansemjo%2Frandomart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fansemjo%2Frandomart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansemjo%2Frandomart/lists"}