Skip to main content

tiny-AES-c wrapper in Cython

Project description

PyPI version

tiny-AES-c Cython wrapper

tinyaes is a few lines Cython wrapper for the tiny-AES-c library, a Small portable AES128/192/256 in C.

The library offers a few modes, CTR mode is the only one currently wrapped. Given the C API works modifying a buffer in-place, the wrapper offers:

  • CTR_xcrypt_buffer(..) that works on all bytes convertible types, and encrypting a copy of the buffer,
  • CTR_xcrypt_buffer_inplace(..) that works on bytearrays only, modifying the buffer in-place.

Release notes

  • 1.0.2rc1 (Apr 7, 2021):
    • added release Python 3.9 on Windows, Linux (manylinux1) and OSX
    • updated upstream tiny-AES-c with some cleanups and small optimizations
  • 1.0.1 (Jun 8, 2020):
    • release Python 3.6 OSX and Windows wheels
    • updated upstream tiny-AES-c with some code changes
  • 1.0.0 (Feb 20, 2020): updated readme (no code changes)
  • 1.0.0a3 (Feb 7, 2020): fix bytes in-place mutation error
  • 1.0.0a2 (Jan 29, 2020): first public release

Like to help?

The CI is up and running, but on Linux only, running a minimal test suite that uses hypothesis, and that allowed me to find a first bug, a missed variable replacement that had nefarious consequences.

The source package released on PyPI should be usable on Windows and MacOS too, just pip install tinyaes.

The development instead is Linux centered, without any guide yet, but the CI script can be a guide.

TL;DR

  • Download Just and put it in your PATH.
  • just test should install the library and the dependencies and run the tests using your default Python version.
  • Inspect the justfile for some hints about what happens.

Thanks

The library is very minimal, but nonetheless, it uses a lot of existing software. I'd like to thank:

  • Cython developer for their wonderful "product", both the library and the documentation.

  • Kudos to kokke for their tiny-AES-c library, very minimal and easy to build and wrap for any usage that needs only the few AES modes it exposes.

  • Just developers for their automation tool, I use in most of my projects.

  • A huge thank to all the hypothesis authors to their fantastic library, that helped me to find an miss-named variable bug that I worked very hard to add in a 6 lines of code wrapper! And to this Data-driven testing with Python article that had left me with the desire to try the library.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tinyaes-1.0.2rc1.tar.gz (40.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tinyaes-1.0.2rc1-cp39-cp39-win_amd64.whl (21.5 kB view details)

Uploaded CPython 3.9Windows x86-64

tinyaes-1.0.2rc1-cp39-cp39-manylinux1_x86_64.whl (63.3 kB view details)

Uploaded CPython 3.9

tinyaes-1.0.2rc1-cp39-cp39-macosx_10_14_x86_64.whl (20.4 kB view details)

Uploaded CPython 3.9macOS 10.14+ x86-64

tinyaes-1.0.2rc1-cp38-cp38-win_amd64.whl (21.7 kB view details)

Uploaded CPython 3.8Windows x86-64

tinyaes-1.0.2rc1-cp38-cp38-manylinux1_x86_64.whl (65.1 kB view details)

Uploaded CPython 3.8

tinyaes-1.0.2rc1-cp38-cp38-macosx_10_14_x86_64.whl (20.4 kB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

tinyaes-1.0.2rc1-cp37-cp37m-win_amd64.whl (21.5 kB view details)

Uploaded CPython 3.7mWindows x86-64

tinyaes-1.0.2rc1-cp37-cp37m-manylinux1_x86_64.whl (64.3 kB view details)

Uploaded CPython 3.7m

tinyaes-1.0.2rc1-cp37-cp37m-macosx_10_14_x86_64.whl (20.4 kB view details)

Uploaded CPython 3.7mmacOS 10.14+ x86-64

tinyaes-1.0.2rc1-cp36-cp36m-win_amd64.whl (21.7 kB view details)

Uploaded CPython 3.6mWindows x86-64

tinyaes-1.0.2rc1-cp36-cp36m-manylinux1_x86_64.whl (64.0 kB view details)

Uploaded CPython 3.6m

tinyaes-1.0.2rc1-cp36-cp36m-macosx_10_14_x86_64.whl (20.4 kB view details)

Uploaded CPython 3.6mmacOS 10.14+ x86-64

tinyaes-1.0.2rc1-cp27-cp27mu-manylinux1_x86_64.whl (58.4 kB view details)

Uploaded CPython 2.7mu

tinyaes-1.0.2rc1-cp27-cp27m-manylinux1_x86_64.whl (58.4 kB view details)

Uploaded CPython 2.7m

tinyaes-1.0.2rc1-cp27-cp27m-macosx_10_14_x86_64.whl (19.6 kB view details)

Uploaded CPython 2.7mmacOS 10.14+ x86-64

File details

Details for the file tinyaes-1.0.2rc1.tar.gz.

File metadata

  • Download URL: tinyaes-1.0.2rc1.tar.gz
  • Upload date:
  • Size: 40.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for tinyaes-1.0.2rc1.tar.gz
Algorithm Hash digest
SHA256 cb02100beb7ec9a5f9269e86d7e494880410d46b735756ee9a19dec2a57e2e32
MD5 d930a5e2b1fdb275b028c370d7093a8b
BLAKE2b-256 95556ee68aefc08d9457f04977b23f1f7846ab4d273df1f5f083fcb79a540e80

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.2rc1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: tinyaes-1.0.2rc1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for tinyaes-1.0.2rc1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c907dbbb7a7d8773b4197ad478b428e52a6c31829192629486126f1d7b6d8d5e
MD5 924cd6e04674dde5c726380550c54152
BLAKE2b-256 1c66a5c9b0555877c593d035fe00791bb776c9ed3e7d54bfb838a91f089d5d22

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.2rc1-cp39-cp39-manylinux1_x86_64.whl.

File metadata

  • Download URL: tinyaes-1.0.2rc1-cp39-cp39-manylinux1_x86_64.whl
  • Upload date:
  • Size: 63.3 kB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for tinyaes-1.0.2rc1-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a1158285f51c73bfef4cb64145837a36df765ad1c106fb94f6c47692acc7d332
MD5 56ffd28d81e3ea0215174518a43a7e1e
BLAKE2b-256 a2a7678a021b23c22d1460e2ff74c8eb4cf76e09a38099f22a4b7375877b48d6

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.2rc1-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: tinyaes-1.0.2rc1-cp39-cp39-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: CPython 3.9, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for tinyaes-1.0.2rc1-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 48b33a08456c49440b08a1d8723b61b0c9bca688b4de545065a27d8be0727b19
MD5 c4e3fe97a327702870bd16ab0d6aafe3
BLAKE2b-256 eab6d2d947f127cd97623ba2cd8e04f978320e4328412dcd31ee32526871a2c9

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.2rc1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: tinyaes-1.0.2rc1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

File hashes

Hashes for tinyaes-1.0.2rc1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 98ea83518bff1c5e9b7d2e4f698a3cc553ec0d4c3b3de984ed4fb4b38798d580
MD5 17f3bd45e94daec677c4f1001a0504ac
BLAKE2b-256 c0074091692140bd42ea511a9c04dc6461a90d727c86c59dee6f7c445fe7fe34

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.2rc1-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: tinyaes-1.0.2rc1-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 65.1 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for tinyaes-1.0.2rc1-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4219cd85be9d0f97bd48b460ca83ef89e7edc25a71c98a94d478f9054640f124
MD5 858869bc67468025ff927c4a7a759b4b
BLAKE2b-256 0b860141b92006b273f1ee51bcc0fd9420a9d2ef47aa54b93ae6f0fcf3eb17e0

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.2rc1-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: tinyaes-1.0.2rc1-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: CPython 3.8, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

File hashes

Hashes for tinyaes-1.0.2rc1-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 9aa4ea7de2ca0c733735be1a24b9d726abb38aa03ce649d388a33b701c7e347c
MD5 0f888f964f46c76d81be243effa63c49
BLAKE2b-256 aa47c88acc91047dc3782b820095b29519d82ffd2068f5275ff3c6f1a0555389

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.2rc1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: tinyaes-1.0.2rc1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for tinyaes-1.0.2rc1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 ed46d140f89b054ca8aff155fc04d014121370525106d663dcd75e1f65f2b138
MD5 5c3990f1901b2f1c6133275326cd3063
BLAKE2b-256 5d5531ffb8cc26e50180f9a7b25d87346518fcd622f18a21312dfe2937b7f04a

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.2rc1-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: tinyaes-1.0.2rc1-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 64.3 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for tinyaes-1.0.2rc1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 34a5218aa50ec8b1759c62e24b2e15115c243f53a04f44068e5ff0b71f18a250
MD5 dfbcb4dd06be6b0df7ca36f4057ba7a8
BLAKE2b-256 f3882a4ec1beebf7e269139c0545e1ad905d85e13444ed33c4569c1965c55331

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.2rc1-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: tinyaes-1.0.2rc1-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for tinyaes-1.0.2rc1-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 9ec7f4489b082a8d3c31eb7351964a807a8e460b18fa46387c02a77250d49d50
MD5 df645b173064419d12238735808bb742
BLAKE2b-256 4495da4c1d3860f2da47dc82e0f7afd512eacd1ef9fa143a0bf2e56f167264c0

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.2rc1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: tinyaes-1.0.2rc1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.8

File hashes

Hashes for tinyaes-1.0.2rc1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 0dda98dfe7891d7400e4c4dae794209c7e5eee6e3026665de7fe62b4c5084d46
MD5 121236cd352348ed0c3ed3efdfec5af6
BLAKE2b-256 7cb941c77e9cf72b8c5877e860f787606b192cdc9a70a3e7923bff5f2f14d15e

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.2rc1-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: tinyaes-1.0.2rc1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 64.0 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for tinyaes-1.0.2rc1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1b43c735135cbb59bcfe66fc9732d3fda4b9ddcca0f0ebba197d39f140e14cb7
MD5 5611176f6a089c53ff6c056951610831
BLAKE2b-256 105b46d6e39adbad43e762a98b6299b29c643d2bb58ca9dfeecea48022ecf39f

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.2rc1-cp36-cp36m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: tinyaes-1.0.2rc1-cp36-cp36m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: CPython 3.6m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.13

File hashes

Hashes for tinyaes-1.0.2rc1-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 df45ca0ee178f9dd8f8073397efc875218e9003356c9cf6aba2538138f99dde9
MD5 0bd73c0a6fb5bbc9e7d6d47d138a521a
BLAKE2b-256 6662cfd6a15540072fbb077883c1e6b6e21d80259dee97d9b1dc489cada11acb

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.2rc1-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

  • Download URL: tinyaes-1.0.2rc1-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 58.4 kB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for tinyaes-1.0.2rc1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 40413168f863d9a893868322fc57b77f5851b11454cb8b984ea86cdb42c3b452
MD5 7d47d23190932fb47bf91a7259921a37
BLAKE2b-256 5746922a49a56db08e0bec8dfe9a0e672533ef3a35b15b7bf1394c006aee5a49

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.2rc1-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

  • Download URL: tinyaes-1.0.2rc1-cp27-cp27m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 58.4 kB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for tinyaes-1.0.2rc1-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f9b5807b83e8104de26cc0e166b9c845cac9c3355513316ab8e35f25449b2729
MD5 d2f7150012985027aee15d95f63931d3
BLAKE2b-256 36485b0e3e5272492fbe1e496a2cc7211f244570083321b34432aa19ea9d9bf1

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.2rc1-cp27-cp27m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: tinyaes-1.0.2rc1-cp27-cp27m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: CPython 2.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/2.7.18

File hashes

Hashes for tinyaes-1.0.2rc1-cp27-cp27m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 a35017eed6fdd1f79f1943857fdbcc8f6d181ea5f2aa52bda9e345a8fcdee423
MD5 930d67d4372cdbd13da952939e959a22
BLAKE2b-256 e57760dd9450ef9276eca3eb426e1d867ba46074c9126ab35f70fd33f51fb300

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page