{"id":18715878,"url":"https://github.com/davidbuchanan314/python-bitsliced-aes","last_synced_at":"2025-06-10T17:02:13.592Z","repository":{"id":104802037,"uuid":"472551454","full_name":"DavidBuchanan314/python-bitsliced-aes","owner":"DavidBuchanan314","description":"An experimental implementation of bitsliced aes in pure python. Quite possibly the fastest pure-python AES implementation on the planet.","archived":false,"fork":false,"pushed_at":"2022-03-22T01:43:02.000Z","size":9,"stargazers_count":17,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T13:13:36.101Z","etag":null,"topics":["aes","aes-128","bitslice","bitslicing","python"],"latest_commit_sha":null,"homepage":"","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/DavidBuchanan314.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-21T23:52:25.000Z","updated_at":"2025-01-12T19:04:49.000Z","dependencies_parsed_at":"2023-05-30T00:30:44.421Z","dependency_job_id":null,"html_url":"https://github.com/DavidBuchanan314/python-bitsliced-aes","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/DavidBuchanan314%2Fpython-bitsliced-aes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBuchanan314%2Fpython-bitsliced-aes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBuchanan314%2Fpython-bitsliced-aes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBuchanan314%2Fpython-bitsliced-aes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavidBuchanan314","download_url":"https://codeload.github.com/DavidBuchanan314/python-bitsliced-aes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571863,"owners_count":21126522,"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","aes-128","bitslice","bitslicing","python"],"created_at":"2024-11-07T13:10:50.649Z","updated_at":"2025-04-12T13:13:38.190Z","avatar_url":"https://github.com/DavidBuchanan314.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Bitsliced AES\n\nAn experimental implementation of bitsliced AES-128-ECB in pure python. Quite possibly the fastest pure-python AES implementation on the planet.\n\nBitslice AES logic based on https://github.com/conorpp/bitsliced-aes. Thanks to `someone12469` for the bit packing trick.\n\nThis is currently just a performance test, it has not been rigourously evaluated from a security perspective.\n\nBenchmark results from an M1 Pro macbook: (python3.9)\n\n```\nSize: 0x10 bytes. Speed: 0.00979213948158905 MB/s\nSize: 0x100 bytes. Speed: 0.2033569630731888 MB/s\nSize: 0x200 bytes. Speed: 0.3661175784327935 MB/s\nSize: 0x400 bytes. Speed: 0.7431157773410884 MB/s\nSize: 0x800 bytes. Speed: 1.4439644713729343 MB/s\nSize: 0x1000 bytes. Speed: 2.6039894565041872 MB/s\nSize: 0x10000 bytes. Speed: 8.098923491089558 MB/s\nSize: 0x100000 bytes. Speed: 11.94128913542198 MB/s\nSize: 0x400000 bytes. Speed: 7.914459860922976 MB/s\nSize: 0x1000000 bytes. Speed: 7.02089122658765 MB/s\n```\n\nBenchmark results from an AMD 3950x: (python3.8)\n\n```\nSize: 0x10 bytes. Speed: 0.010748708616940834 MB/s\nSize: 0x100 bytes. Speed: 0.20518680839274817 MB/s\nSize: 0x200 bytes. Speed: 0.3675134687165803 MB/s\nSize: 0x400 bytes. Speed: 0.7493836462514636 MB/s\nSize: 0x800 bytes. Speed: 1.476730332109973 MB/s\nSize: 0x1000 bytes. Speed: 2.71460696086907 MB/s\nSize: 0x10000 bytes. Speed: 9.777050554537222 MB/s\nSize: 0x100000 bytes. Speed: 13.119903169673073 MB/s\nSize: 0x400000 bytes. Speed: 7.310395026532739 MB/s\nSize: 0x1000000 bytes. Speed: 7.216789286347978 MB/s\n```\n\nBenchmark results from an AMD 5800x: (python3.10)\n\n```\nSize: 0x10 bytes. Speed: 0.012103095577838383 MB/s\nSize: 0x100 bytes. Speed: 0.23881866099628496 MB/s\nSize: 0x200 bytes. Speed: 0.43531839039412895 MB/s\nSize: 0x400 bytes. Speed: 0.9053066467189118 MB/s\nSize: 0x800 bytes. Speed: 1.7895068950475823 MB/s\nSize: 0x1000 bytes. Speed: 3.3794519407501507 MB/s\nSize: 0x10000 bytes. Speed: 14.013407355512953 MB/s\nSize: 0x100000 bytes. Speed: 17.402108711834412 MB/s\nSize: 0x400000 bytes. Speed: 13.657595307228183 MB/s\nSize: 0x1000000 bytes. Speed: 9.780158139496866 MB/s\n```\n\nObviously, the optimal message length is around 1MB. I'm not quite sure why it slows\ndown for longer messages, but I believe its happening in the bitslice packing/unpacking process.\nLonger messages could be broken up into shorter blocks, for optimal performance.\n\nFor reference, the next fastest pure-python AES implementation I could find was https://github.com/ricmoo/pyaes.\nIt runs at about 0.5MB/s (or with some of my own optimisations, about 0.75MB/s).\n\nThis bitsliced implementation is an order of magnitude faster (although, only on inputs longer than about 1024 bytes).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbuchanan314%2Fpython-bitsliced-aes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidbuchanan314%2Fpython-bitsliced-aes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbuchanan314%2Fpython-bitsliced-aes/lists"}