{
"info": {
"author": "Anton Semjonov",
"author_email": "anton@semjonov.de",
"bugtrack_url": null,
"classifiers": [],
"description": "# randomart.py\n\n[](https://www.codefactor.io/repository/github/ansemjo/randomart)\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\n\nSee the paper [Hash Visualization: a New Technique to improve Real-World Security1][^1]\nfor more information on the concept of random art.\n\nThe paper [The drunken bishop: An analysis of the OpenSSH fingerprint visualization\nalgorithm2][^2] analyses the OpenSSH implementation in more detail.\n\nIt should 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[2][^2] but would expect my implementation to\nperform no worse.\n\n## installation\n\nInstall with pip directly from GitHub:\n\n pip install git+https://github.com/ansemjo/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[^1]:\n\n http://www.ece.cmu.edu/~adrian/projects/validation/validation.pdf \"Perrig A. and Song D., 1999,\n International Workshop on Cryptographic Techniques and E-Commerce (CrypTEC '99)\"\n\n[^2]:\n\n http://www.dirk-loss.de/sshvis/drunken_bishop.pdf \"Dirk Loss, Tobias Limmer, Alexander von\n Gernler, 2009\"\n\n\n",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/ansemjo/randomart",
"keywords": "randomart drunken bishop openssh blake2b blake2 hash comparison",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "randomart",
"package_url": "https://pypi.org/project/randomart/",
"platform": "",
"project_url": "https://pypi.org/project/randomart/",
"project_urls": {
"Homepage": "https://github.com/ansemjo/randomart"
},
"release_url": "https://pypi.org/project/randomart/0.2.3/",
"requires_dist": [
"numpy"
],
"requires_python": ">3.5",
"summary": "Generate ASCII randomart by hashing input with BLAKE2b and using an adapted drunken bishop alogirthm.",
"version": "0.2.3"
},
"last_serial": 5167797,
"releases": {
"0.2.3": [
{
"comment_text": "",
"digests": {
"md5": "140de3178287ece41567448422f3faba",
"sha256": "cda445023d608b6e3b28f67bf860cb1b6d4e01a311b1c6862c6d53c392e1b000"
},
"downloads": -1,
"filename": "randomart-0.2.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "140de3178287ece41567448422f3faba",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">3.5",
"size": 6284,
"upload_time": "2019-04-20T13:16:45",
"url": "https://files.pythonhosted.org/packages/78/a5/20471b07b035cd4cc66f13e1d428b471918b6dd50d281b8cdcd1bb352dba/randomart-0.2.3-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "2664d59e107a326c0492dca5de74251c",
"sha256": "ecc58aab305107615dfefde6fb23ed1f38bbc020ba1dee295d39e496861c8fb2"
},
"downloads": -1,
"filename": "randomart-0.2.3.tar.gz",
"has_sig": false,
"md5_digest": "2664d59e107a326c0492dca5de74251c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">3.5",
"size": 4600,
"upload_time": "2019-04-20T13:16:47",
"url": "https://files.pythonhosted.org/packages/ad/e8/ff0d901ba33f6271263d996dc04b9d60ca0fffe2f833c2c70e779f2bb5ae/randomart-0.2.3.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "140de3178287ece41567448422f3faba",
"sha256": "cda445023d608b6e3b28f67bf860cb1b6d4e01a311b1c6862c6d53c392e1b000"
},
"downloads": -1,
"filename": "randomart-0.2.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "140de3178287ece41567448422f3faba",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">3.5",
"size": 6284,
"upload_time": "2019-04-20T13:16:45",
"url": "https://files.pythonhosted.org/packages/78/a5/20471b07b035cd4cc66f13e1d428b471918b6dd50d281b8cdcd1bb352dba/randomart-0.2.3-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "2664d59e107a326c0492dca5de74251c",
"sha256": "ecc58aab305107615dfefde6fb23ed1f38bbc020ba1dee295d39e496861c8fb2"
},
"downloads": -1,
"filename": "randomart-0.2.3.tar.gz",
"has_sig": false,
"md5_digest": "2664d59e107a326c0492dca5de74251c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">3.5",
"size": 4600,
"upload_time": "2019-04-20T13:16:47",
"url": "https://files.pythonhosted.org/packages/ad/e8/ff0d901ba33f6271263d996dc04b9d60ca0fffe2f833c2c70e779f2bb5ae/randomart-0.2.3.tar.gz"
}
]
}