{ "info": { "author": "Hugo Rivera", "author_email": "flyingcircus@example.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Operating System :: POSIX :: Linux", "Operating System :: Unix", "Topic :: Internet", "Topic :: Security", "Topic :: Security :: Cryptography", "Topic :: Utilities" ], "description": "# pympw: CLI and Implementation of Master Password v3 --- An Algorithm for Freedom\n\nMaster Password is a determnistic password generator.\nThis is a Python implementation of the Master Password algorithm v3 based on \n[mpw-js](https://github.com/tmthrgd/mpw-js).\n\nI faithfully implemented the [algorithm](http://www.masterpasswordapp.com/masterpassword-algorithm.pdf) for a cool password manager in a few dozen lines of Python. Please note **this code is for demonstration purposes only.** If you want to use a reliable deterministic password manager, get one at [masterpassword.app](http://masterpassword.app).\n\n## **Features**\n\n- \u2714 Faithful and concise implementation of Master Password v3 using standard Python crypto libraries **scrypt, hmac, and digest.sha256**.\n- \u2714 *Quick password generation* for a single site.\n- \u2714 Generate long passwords, PINs, or even memorable phrases \n- \u2714 Intuitive interactive session. *Type your master password once and request site passwords as you go!*\n- \u2714 Copy passwords to your clipboard --- *never print passwords out at all!*\n- \u2714 Interactive session can timeout after a few minutes to *protect your privacy*\n- \u2714 Support for counter and *all* MPv3 password template classes (maximum, long, medium, basic, short, PIN, name, and phrase)\n\n## Installation\n\nInstall `pympw` through PyPI or locally.\n\n```\n$ pip install pympw\n```\n\n```\ngit clone --depth=1 https://github.com/roguh/pympw\ncd pympw \npip install .\n```\n\n### Dependencies\n\nIf you don't want pip to install dependencies, make sure to install the Python packages `scrypt` and `pyperclip`.\n\n## CLI Usage\n\n### Single site password with one command\n\nGenerate a password with a single command\n\n```\n$ python3 bin/pympw -n USER --type long -s google.com -c 20000\nplease type your master password >\nsite=google.com, type=long, counter=20000\nVode7.QojfDeqa\n```\n\n### Interactive mode\n\nEnter interactive mode by omitting the `--site` argument. Type `CTRL-D` or `quit` to quit.\n\n```\n $ pympw -n USER\nplease type your master password >\nplease type site name > google.com\nplease type counter or ENTER for default=1 > 20000\nplease type type or ENTER for default=long >\nVode7.QojfDeqa\nplease type site name > quit\nbye\n```\n\n### More concise interactive mode\n\nEnter alternative interactive mode\n\n```\n $ python3 pympw -n USER -b/\nplease type your master password >\nplease type site name[/type[/counter]] > google.com\nKasi2/FipsHonm\nplease type site name[/type[/counter]] > google.com/pin\n7002\nplease type site name[/type[/counter]] > google.com/medium/3\nWap4/Voy\nplease type site name[/type[/counter]] > google.com/x\ni%&yc(sRV7VJqOQK%G0~\nplease type site name[/type[/counter]] > quit\nbye\n```\n\n### Complete examples \n\nUse `--copy` to copy password to clipboard.\n\n```\n$ pympw -n USER --copy --type x\nplease type your master password >\nplease type site name > github.com\nplease type counter or ENTER for default=1 >\nplease type type or ENTER for default=x >\npassword copied to clipboard\nE(%MMCBruYhaPEV6bM7^\n```\n\nUse `--exit-after` to shutdown interactive mode after some number of seconds.\nUse `--quiet` to print less output.\nUse `--keepalive` to reschedule timeout if you're still using the program.\n\n```\n$ pympw --name USER --type maximum --quiet --copy --splitby / \\\n --keepalive --exit-after \"$((60 * 5))\" \\\n --exit-command 'notify-send \"MasterPassword is now closed\"'\nmaster password >\nsite name[/type[/counter]] > google.com/l/20000\nVode7.QojfDeqa\nsite name[/type[/counter]] > google.com\ni%&yc(sRV7VJqOQK%G0~\nsite name[/type[/counter]] > 300 second timeout reached\nbye\n```\n\n### All options \n\n```\n$ pympw -h\nusage: pympw [-h] [--name NAME] [--site SITE] [--counter COUNTER] [--quiet]\n [--copy] [--hide-pw] [--splitby SPLITBY] [--keepalive]\n [--exit-after EXIT_AFTER] [--exit-command EXIT_COMMAND]\n [--type {maximum,x,long,l,medium,m,basic,b,short,s,longbasic,lb,pin,#,name,n,phrase,ph}]\n\nCLI to Master Password algorithm v3. Passwords are generated locally, your\nmaster password is not sent to any server. http://masterpassword.app\n\noptional arguments:\n -h, --help show this help message and exit\n --name NAME, -n NAME your full name\n --site SITE, -s SITE site name (e.g. linux.org). omit this argument to\n start an interactive session.\n --counter COUNTER, -c COUNTER\n positive integer less than 2**31=4294967296\n --type {maximum,x,long,l,medium,m,basic,b,short,s,longbasic,lb,pin,#,name,n,phrase,ph}\n password type\n --copy, -y copy password to clipboard instead of printing it\n --hide-pw, -d never print passwords\n --splitby SPLITBY, -b SPLITBY\n more efficient interactive session. suggested values:\n tab, space, or '/'\n --exit-after EXIT_AFTER, -e EXIT_AFTER\n script will timeout and close after this many seconds\n --exit-command EXIT_COMMAND\n run this command if the script times out\n --keepalive, -k keep program from timing out by pressing ENTER\n --quiet, -q less output\n```\n\n\n## Library Usage\n\n```\n> from pympw import site_password, master_key, template_class_names \n```\n\nSee all template classes available \n\n```\n> template_class_names \n['maximum',\n 'x',\n 'long',\n 'l',\n 'medium',\n 'm',\n 'basic',\n 'b',\n 'short',\n 's',\n 'longbasic',\n 'lb',\n 'pin',\n '#',\n 'name',\n 'n',\n 'phrase',\n 'ph']\n```\n\nGenerate a master key (>1sec)\n\n```\n> master_key = master_key(b'USER', b'PASSWORD')\nb'\\xc8\\xf2\\xc7\\xd3<(\\x05\\xaf\\xf8ng\\xfb\\xb2\\x06\\xab6\\x83\\xfc\\x85m\\xcb\\xa3$c\\xb7\\xc6I\\x93\\x01\\xc7\\xeb+\\x810\\xb2\\xf2\\x84\\xa3f\\xb7\\xf0R\\x9c_\\xf1\\xb3b\\xa2\\x99\\xcb\\xd3\\x97`\\xab_\\xef\\x89\\xe6S\\xe7\\x84LM\\xee'\n```\n\nGenerate a password\n\n```\n> site_password(master_key=master_key, site_name='google.com', template_class='long', counter=20000)\n'Vode7.QojfDeqa'\n```\n\n## Running tests\n\n```\n$ python3 setup.py test\n============================== test session starts ===============================\nplatform linux -- Python 3.7.0, pytest-3.6.4, py-1.5.4, pluggy-0.7.1\ncollected 3 items \n\npympw/tests/test_master_password_v3.py ... [100%]\n\n============================ 3 passed in 0.62 seconds ============================\n```\n\n## Authors\n\nMaster Password is a security product and algorithm by [Maarten Billemont](http://lhunath.com/), [Lyndir](http://www.lyndir.com/).\n\nThis Python implementation was created by Hugo Rivera.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/roguh/pympw", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pympw", "package_url": "https://pypi.org/project/pympw/", "platform": "", "project_url": "https://pypi.org/project/pympw/", "project_urls": { "Homepage": "http://github.com/roguh/pympw" }, "release_url": "https://pypi.org/project/pympw/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "An implementation of the Master Password algorithm v3 with a nice CLI", "version": "0.2.1" }, "last_serial": 4205992, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ffb689bc475ee026d287e126e479576b", "sha256": "145262bd7541bd6283e1f34857f8649f01b17e4641ea31527e8545c1b09e36a2" }, "downloads": -1, "filename": "pympw-0.1.tar.gz", "has_sig": false, "md5_digest": "ffb689bc475ee026d287e126e479576b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7686, "upload_time": "2018-08-23T04:17:36", "url": "https://files.pythonhosted.org/packages/08/1e/93716c19b6245116d56ab19165292925c113be9c34456b681257f61716a0/pympw-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "247328308da9742c641a91909781752c", "sha256": "e4b8109fc7a011abc1d6ab13eb07fb2ff1a679b5aba9aeb37ddfb03062ac894a" }, "downloads": -1, "filename": "pympw-0.1.1.tar.gz", "has_sig": false, "md5_digest": "247328308da9742c641a91909781752c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7732, "upload_time": "2018-08-23T04:22:17", "url": "https://files.pythonhosted.org/packages/76/94/61d3d56933a9223aaf5ad5cabd741c224ca72ffe47f63416301acbafd49b/pympw-0.1.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "063331ab6a48fbe937fc0fe274f106ac", "sha256": "68e14c9325645f5cb9ca458a50c7d024966a002e466ed19836fdfc548a793760" }, "downloads": -1, "filename": "pympw-0.2.tar.gz", "has_sig": false, "md5_digest": "063331ab6a48fbe937fc0fe274f106ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9049, "upload_time": "2018-08-25T06:32:48", "url": "https://files.pythonhosted.org/packages/81/96/d60f271814e7c25ab43075887f771bff4d7a2992b229a7992016c922dc9c/pympw-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "d73a5bf95c5cfec45dfc58843a6f7904", "sha256": "b42d168eeba8ece6758c2588578bf1ec28ed06ef65bf01d396105c9a5991b7f3" }, "downloads": -1, "filename": "pympw-0.2.1.tar.gz", "has_sig": false, "md5_digest": "d73a5bf95c5cfec45dfc58843a6f7904", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9049, "upload_time": "2018-08-25T06:38:08", "url": "https://files.pythonhosted.org/packages/c5/fa/acc908a17e156ca94d1e3a6e92ecb15400669930e7d13122da78979997bc/pympw-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d73a5bf95c5cfec45dfc58843a6f7904", "sha256": "b42d168eeba8ece6758c2588578bf1ec28ed06ef65bf01d396105c9a5991b7f3" }, "downloads": -1, "filename": "pympw-0.2.1.tar.gz", "has_sig": false, "md5_digest": "d73a5bf95c5cfec45dfc58843a6f7904", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9049, "upload_time": "2018-08-25T06:38:08", "url": "https://files.pythonhosted.org/packages/c5/fa/acc908a17e156ca94d1e3a6e92ecb15400669930e7d13122da78979997bc/pympw-0.2.1.tar.gz" } ] }