{"id":15442899,"url":"https://github.com/bsolomon1124/npaes","last_synced_at":"2026-04-11T21:09:28.380Z","repository":{"id":57446969,"uuid":"175281411","full_name":"bsolomon1124/npaes","owner":"bsolomon1124","description":"AES Encryption in NumPy","archived":false,"fork":false,"pushed_at":"2019-03-14T14:19:55.000Z","size":52,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-15T10:58:32.161Z","etag":null,"topics":["aes-encryption","encryption","numpy","python","python2","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bsolomon1124.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-03-12T19:18:44.000Z","updated_at":"2024-04-21T20:57:19.000Z","dependencies_parsed_at":"2022-08-29T21:50:21.597Z","dependency_job_id":null,"html_url":"https://github.com/bsolomon1124/npaes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsolomon1124%2Fnpaes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsolomon1124%2Fnpaes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsolomon1124%2Fnpaes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsolomon1124%2Fnpaes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bsolomon1124","download_url":"https://codeload.github.com/bsolomon1124/npaes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245986696,"owners_count":20705260,"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":["aes-encryption","encryption","numpy","python","python2","python3"],"created_at":"2024-10-01T19:31:23.458Z","updated_at":"2025-10-30T10:06:41.552Z","avatar_url":"https://github.com/bsolomon1124.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# npaes\n\nAdvanced Encryption Standard (AES) NumPy implementation.\n\n\u003cspan style=\"color:red\"\u003e**Warning**: incomplete \u0026 not yet suitable for production use.\u003c/span\u003e  See the \"Caution\" section below.\n\n----\n\n\u003ctable\u003e\n\u003ctr\u003e\n  \u003ctd\u003eSupports\u003c/td\u003e\n  \u003ctd\u003ePython 2.7 | 3.5 | 3.6 | 3.7\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd\u003eLatest Release\u003c/td\u003e\n  \u003ctd\u003e\n    \u003ca href=\"https://pypi.org/project/npaes/\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/npaes.svg\" alt=\"latest release\" /\u003e\n    \u003c/a\u003e\n  \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd\u003ePackage Status\u003c/td\u003e\n  \u003ctd\u003e\n    \u003ca href=\"https://pypi.org/project/npaes/\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/status/npaes.svg\" alt=\"status\" /\u003e\u003c/td\u003e\n    \u003c/a\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd\u003eLicense\u003c/td\u003e\n  \u003ctd\u003e\n    \u003ca href=\"https://github.com/bsolomon1124/npaes/blob/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/l/npaes.svg\" alt=\"license\" /\u003e\n    \u003c/a\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\nThis package implements the Advanced Encryption Standard (AES) as specified in Federal Information Processing Standards Publication 197 (\"FIPS197\"):\n\n\u003e [https://csrc.nist.gov/publications/detail/fips/197/final](https://csrc.nist.gov/publications/detail/fips/197/final)\n\nThis implementation is based entirely and solely on FIPS197.  The tests in `tests/test_npaes.py` use the full set of example vectors from Appendix A, B, and C of FIPS197.  `npaes` supports AES-128, AES-192, and AES-256.\n\nIts sole dependencies is NumPy.  It does not use OpenSSL or any other C libraries besides the portions of NumPy that are implemented in C.\n\nAdditional technical notes can be found in the docstring of `npaes/__init__.py`.\n\n## Caution\n\nThis package is incomplete.  While the raw encryption and decryption are fully tested using the FIPS197 example vectors, it is incomplete for the following reasons:\n\n- It does not allow you to specify an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector) (IV).\n- It does not allow you to specify a [block mode](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation).\n- It is optimized in most places but not all, and has little to no chance of ever being as fast as the optimized ANSI C version in OpenSSL.\n\n## Basic Usage\n\n```python\nimport os\nfrom npaes import AES\n\n# Key must be bytes type and 128, 192, or 256 bits\n# Or use hashlib.sha256() for an off-length key\nkey = os.urandom(32)  # 256-bit key\n\n# Your plaintext length must be bytes and a multiple of 16 length\nmsg = b\"a secret message goes here\" + 6 * b\"\\x03\"\ncipher = AES(key)\nciphertext = cipher.encrypt(msg)\n\nprint(ciphertext)\n# b'a\\x85cna\\xc2\\xeeu\\xe9S\\xdf\\xabE\\x0c\\xda\\xf4\\x19\\x11\\xa3!\\xdd\\x96-\\x85\\x10f\\xd4\\x18;s%\\x81'\nprint(cipher.decrypt(ciphertext))\n# b'a secret message goes here\\x03\\x03\\x03\\x03\\x03\\x03'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsolomon1124%2Fnpaes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsolomon1124%2Fnpaes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsolomon1124%2Fnpaes/lists"}