{ "info": { "author": "Mohammad Mahdi Baghbani Pourvahid", "author_email": "MahdiBaghbani@protonmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Affero General Public License v3", "License :: OSI Approved :: zlib/libpng License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Operating System :: Unix", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Security :: Cryptography", "Topic :: Software Development", "Topic :: Utilities" ], "description": "

\n
\n \n \"Mersad\n \n

\n\n

Mersad Cryptography Library

\n

A side project of a Telecommunication student who loves ciphers.

\n

\n\n

\n \n \"Open\n \n \n \"License:\n \n \n \"Language\n \n \n \"Top\n \n \n
\n \n \n \"CodeFactor\"/\n \n \n \"CodeClimate\n \n \n \"Scrutinizer-ci\n \n \n \"CodeClimate\n \n \n \"CodeClimate\n \n \n
\n\n \n \"pipeline\n \n \n \"travis\n \n \n \"CodeClimate\"/\n \n \n
\n\n \n \"PyPI\n \n \n \"PyPI\n \n \n \"Supported\n \n

\n\n> If you want to do any serious jobs :poop: with this tool, prepare yourself to get fired :fire:! \n\n## Why is Gamora?\n\nIn summer 2019 I had decided to practice Python and DevOps tasks like: continuous \nintegration and automated releasing software to packaging sources like pypi, I don't \nknow how I ended up here writing this for you!\n(even like if there is any \"you\" out there looking at this little side project of mine.)\n\nSo if you want to send unbreakable messages to your friends with ancient algorithms\nwithout using pen and paper, Mersad can help you. (but seriously, :joy: unbreakable? c'mon!)\n\nOh and I :heart: codes and ciphers!\n\n\n## Quick start\n\nI'm sure you have worked with Python before and you are familiar with how to download\nand install packages using pip, so here is how to install this totally (not at all)\nsecure package:\n\n```bash\n# 1. if you are an uncivilised savage living in a hell of dependency conflicts who doesn't \n# even heard of virtual environments and always install packages in sudo mode, here you go:\nsudo -H pip3 install mersad\n# or just use a little bit better non-sudo thing\npip3 install --user mersad\n\n# 2. if you are a man of culture, activate your virtual environment and type this:\npip3 install mersad\n# pipenv is also a good thing to use (only heroes use it\npipenv install mersad\n```\n\n## Wait a second, What's Cryptography?\n\nHonestly? I don't know either ... :grimacing:. smart guys gather together to invent\na way for communicating with their lovers in secret and other (literally) more smart\nguys will try to find a way to break their code and read their love messages \n(they succeed), but they are enough stupid to tell everyone about it, so first group \nwill try to find new encryption algorithms for their messages. This never ending \ncycle continues until today.\n\nApparently people are calling the work of first group (designing encryption algorithms)\n\"Cryptography\" and the work of second group (breaking those stupid ciphers) \"Cryptanalysis\".\n\n## How does this package work?\n\nGood question, it doesn't. \n\nBut if you are so smart and managed to make it work for you, here is some \nexplanation about the mess that is going on:\n\nMersad is divided into two main sub-packages, `classical` and `modern`, I'm currently\ndeveloping classical algorithms but in future I will start working on modern ones.\n\nI'm also planning to add `cryptanalysis` module, this module will contains programs \nto break ciphers.\n\nEach cipher has a class and a translator function, you can use any of them or both of \nthem together.\nthe translator function is no memory and requires every argument in \neach call but class have memory and can store key, alphabet and etc.\n\n### Example\n\nIt is a very simple example of using Shift cipher (aka Caesar cipher) :\n\n```python\nfrom mersad.classical.shift_cipher import ShiftCipher, shift_cipher_translator\n\nMESSAGE = \"Hail Caesar!\"\nALPHABET = \"abcdefghijklmnopqrstuvwxyz\"\nKEY = 4\n\nCIPHER = shift_cipher_translator(MESSAGE, key=KEY, letter_sequence=ALPHABET)\nprint(CIPHER)\n# Out: Hemp Ceiwev!\n\n# with translator function you need to pass all arguments\n# in each call again and again.\n\n# now the second way of using shift cipher is using the class instead of function.\n\n# create object without any keyword arguments so agent will use\n# default values for all the settings. defaults are predefined in class.\nagent = ShiftCipher()\n\n# override defaults.\nagent.config(key=3453, letter_sequence=ALPHABET)\n\n# also you can do it at the time yu creat object:\n# agent = ShiftCipher(key=3453, letter_sequence=ALPHABET)\n\n# config usage is to override any existing properties with \n# new values at any time after creating the object.\n\n# encrypt a string.\nprint(agent.encrypt(\"Hail Julius Caesar.\"))\n# Out: 'Hvdg Jpgdpn Cvznvm.'\n\n# with this object approach you don't need to pass every thing in each call to\n# encrypt or decrypt.\n# another one\nprint(agent.encrypt(\"This method is not secure :0 but it is funny.\"))\n# Out: Tcdn hzocjy dn ijo nzxpmz :0 wpo do dn apiit.\n\n# for decryption simply call decrypt method on agent\nprint(agent.decrypt(\"This method is not secure :0 but it is funny.\"))\n# Out: Tcdn hzocjy dn ijo nzxpmz :0 wpo do dn apiit.\n\n``` \n\nfor more examples look at\n[snippets](https://gitlab.com/Azadeh-Afzar/Cryptography/Mersad-Cryptography-Library/snippets).\n\n\n## Can I use this package in terminal?\n\nYes! :metal:\n\nEach cipher module have a corresponding cli program with name convention of:\n`mclModuleName`. For example to run Shift cipher module in terminal just type `mclShift`.\nTo learn how to work with cli programs type `--help` after program name\n(e.g. `mclShift --help`).\n\n## Contribution\n\nIf you want to contribute to this project, please read [CONTRIBUTING](CONTRIBUTING.md).\n\n## Code of Conduct\n\nVisit the [Code of Conduct](CODE_OF_CONDUCT.md).\n\n## Roadmap\n\nVisit the [Roadmap](ROADMAP.md) to keep track of which features we are currently \nworking on and which futures will come at future.\n\n## License\n\nLicensed under the [AGPLv3](LICENSE).\n\n## Attribution\n \n- Books: [Cracking Codes with Python](https://inventwithpython.com/cracking) and \n [Understanding Cryptography](https://www.springer.com/gp/book/9783642041006)\n- Code ideas: [PyCryptodome](https://www.pycryptodome.org)\n- Mersad Logo: Designed with [OpenMoji](https://openmoji.org/)\n- Online resources: [Crypto Corner](https://crypto.interactive-maths.com)", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/Azadeh-Afzar/Cryptography/Mersad-Cryptography-Library", "keywords": "", "license": "AGPLv3", "maintainer": "", "maintainer_email": "", "name": "mersad", "package_url": "https://pypi.org/project/mersad/", "platform": "Posix; Windows; MacOS X", "project_url": "https://pypi.org/project/mersad/", "project_urls": { "Homepage": "https://gitlab.com/Azadeh-Afzar/Cryptography/Mersad-Cryptography-Library" }, "release_url": "https://pypi.org/project/mersad/0.0.17/", "requires_dist": null, "requires_python": ">=3.6", "summary": "Azadeh Afzar - Mersad Cryptographic Library", "version": "0.0.17" }, "last_serial": 5960220, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "e4af0734048db8378d9e889f8908081d", "sha256": "8d2b6c8aed92569a17db84583be8069f1e45b9b5f0683095db719d6365dcb510" }, "downloads": -1, "filename": "mersad-0.0.1.tar.gz", "has_sig": false, "md5_digest": "e4af0734048db8378d9e889f8908081d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11114, "upload_time": "2019-09-26T11:35:26", "url": "https://files.pythonhosted.org/packages/15/1d/3cbc9fe273b2b103ecf468094f2d6fe913eb12199cefbee719b3f5aa9d34/mersad-0.0.1.tar.gz" } ], "0.0.10": [ { "comment_text": "", "digests": { "md5": "edad83fac1bb692c05cd49d8bc520a15", "sha256": "a4ae25c1fa03fef89af799239d71a467a33b963bcc06a1a6ccbc5928a0055229" }, "downloads": -1, "filename": "mersad-0.0.10.tar.gz", "has_sig": false, "md5_digest": "edad83fac1bb692c05cd49d8bc520a15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12020, "upload_time": "2019-09-26T20:14:15", "url": "https://files.pythonhosted.org/packages/78/e7/87c9aaf888706960eb660c801fa9654f2c28758efede83141be22c3d96fd/mersad-0.0.10.tar.gz" } ], "0.0.12": [ { "comment_text": "", "digests": { "md5": "c3d7b176a423ca6126c542aed0d5e59e", "sha256": "efdd7a062733d0dc6e422017a968beb36e660c7991d9cbfdd3a5e6a725683e3d" }, "downloads": -1, "filename": "mersad-0.0.12.tar.gz", "has_sig": false, "md5_digest": "c3d7b176a423ca6126c542aed0d5e59e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 21153, "upload_time": "2019-10-05T19:36:02", "url": "https://files.pythonhosted.org/packages/fd/5b/cd46c7f92d012463a142c0a570d8eb0ae0f520dd3aeceae85abc6dfefc88/mersad-0.0.12.tar.gz" } ], "0.0.13": [ { "comment_text": "", "digests": { "md5": "30ab26be3290695c8aeba9eb3fd8f929", "sha256": "d4432970f96579f77e7ca3d471d7f58a657d5d4c68604be44cb89edcb0051bde" }, "downloads": -1, "filename": "mersad-0.0.13.tar.gz", "has_sig": false, "md5_digest": "30ab26be3290695c8aeba9eb3fd8f929", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 22607, "upload_time": "2019-10-09T13:11:26", "url": "https://files.pythonhosted.org/packages/83/d6/ac88c3022bad22c3266e563e4c2faedc94986ede0af65d7c785c7dc6bf13/mersad-0.0.13.tar.gz" } ], "0.0.17": [ { "comment_text": "", "digests": { "md5": "7144a2090cc5475ffc25096452d127e8", "sha256": "4acc1e6a3161c6d7c14dc79008854f7ba085cdd20833aae274107f93576016db" }, "downloads": -1, "filename": "mersad-0.0.17.tar.gz", "has_sig": false, "md5_digest": "7144a2090cc5475ffc25096452d127e8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 26071, "upload_time": "2019-10-11T13:05:47", "url": "https://files.pythonhosted.org/packages/8e/58/c32f34810e3dfd5ebb497c8ecab489827d44b30fe83342c03eb654587fa3/mersad-0.0.17.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "1a17e8121dafda4de0564f989f8c2db8", "sha256": "9296f3b5774f114ed0614b95ba9b29651ccface13e350ad3b9aaf1bee7698c9a" }, "downloads": -1, "filename": "mersad-0.0.7.tar.gz", "has_sig": false, "md5_digest": "1a17e8121dafda4de0564f989f8c2db8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11132, "upload_time": "2019-09-26T13:06:17", "url": "https://files.pythonhosted.org/packages/6c/7c/deacb2849e395a15f10a8977099641ded9a58b554caf6b5f3bcadaa50ee8/mersad-0.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7144a2090cc5475ffc25096452d127e8", "sha256": "4acc1e6a3161c6d7c14dc79008854f7ba085cdd20833aae274107f93576016db" }, "downloads": -1, "filename": "mersad-0.0.17.tar.gz", "has_sig": false, "md5_digest": "7144a2090cc5475ffc25096452d127e8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 26071, "upload_time": "2019-10-11T13:05:47", "url": "https://files.pythonhosted.org/packages/8e/58/c32f34810e3dfd5ebb497c8ecab489827d44b30fe83342c03eb654587fa3/mersad-0.0.17.tar.gz" } ] }