Skip to main content

tiny-AES-c wrapper in Cython

Project description

tiny-AES-c Cython wrapper

PyPI version

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.3rc1 (Nov 4, 2021):
    • add Python 3.10 to the matrix
  • 1.0.2 (Nov 4, 2021):
    • version bump from 1.0.2rc1
    • bump to manylinux2010 because of tlsv1 errors and drop Python 2.7 missing in the new image
  • 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.3rc1.tar.gz (39.4 kB view details)

Uploaded Source

Built Distributions

tinyaes-1.0.3rc1-cp310-cp310-win_amd64.whl (23.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

tinyaes-1.0.3rc1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (76.4 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

tinyaes-1.0.3rc1-cp310-cp310-macosx_10_14_x86_64.whl (20.6 kB view details)

Uploaded CPython 3.10 macOS 10.14+ x86-64

tinyaes-1.0.3rc1-cp39-cp39-win_amd64.whl (23.1 kB view details)

Uploaded CPython 3.9 Windows x86-64

tinyaes-1.0.3rc1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (75.9 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

tinyaes-1.0.3rc1-cp39-cp39-macosx_10_14_x86_64.whl (20.6 kB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

tinyaes-1.0.3rc1-cp38-cp38-win_amd64.whl (21.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

tinyaes-1.0.3rc1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (76.8 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

tinyaes-1.0.3rc1-cp38-cp38-macosx_10_14_x86_64.whl (20.5 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

tinyaes-1.0.3rc1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (75.6 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

tinyaes-1.0.3rc1-cp37-cp37m-macosx_10_14_x86_64.whl (20.5 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

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

Uploaded CPython 3.6m Windows x86-64

tinyaes-1.0.3rc1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (74.3 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

tinyaes-1.0.3rc1-cp36-cp36m-macosx_10_14_x86_64.whl (20.5 kB view details)

Uploaded CPython 3.6m macOS 10.14+ x86-64

tinyaes-1.0.3rc1-cp27-cp27m-macosx_10_14_x86_64.whl (19.7 kB view details)

Uploaded CPython 2.7m macOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: tinyaes-1.0.3rc1.tar.gz
  • Upload date:
  • Size: 39.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.1 requests/2.26.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/2.7.18

File hashes

Hashes for tinyaes-1.0.3rc1.tar.gz
Algorithm Hash digest
SHA256 b455857867810f02b428da96402fa5882142cd700b779e8896bcbc70fedb8178
MD5 890b98ae1009f356bfac2a8fb3053bc3
BLAKE2b-256 7599d62f952b74e27120203c16f732a7600f4a30255649e40e59be88630be007

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.3rc1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: tinyaes-1.0.3rc1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for tinyaes-1.0.3rc1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 27cc491506881a7f9bb9b8249055750cd77e11f131f6fe9b57dc266c896e0192
MD5 abad009143a7f643ffe89de881ebc4ba
BLAKE2b-256 0024e4a412b4ebe2664471490e1e44ea06bbe640c715946197bffd7c64de9500

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.3rc1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for tinyaes-1.0.3rc1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b225616c2eb78e3a95c01e3e09f9ede80d2ae70227a7b98bf1ef1e5dec0b9aa8
MD5 bdd41b49f81f32328ab3c10f70766931
BLAKE2b-256 aeb8de1737523949c1cc5de0730ba0d157e4e20b323f5d489f852c2571417f3a

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.3rc1-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: tinyaes-1.0.3rc1-cp310-cp310-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: CPython 3.10, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for tinyaes-1.0.3rc1-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 c2d7e070bbdb0861f1bf6836fff0a73518b5a8da2d01f24c24484f1fde23dd22
MD5 5a76a6621e1a982533ac594ebc55df0d
BLAKE2b-256 e779cec927c3ff9e1f6a769eb175b5a98940325e2faf37577cb346b795cfbdc9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tinyaes-1.0.3rc1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for tinyaes-1.0.3rc1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e25cc20e5b9e15aa3214427632c6cbf0ff8279992c86bbc1d14b496c0dad482d
MD5 0c210548ca20577fe21403b03dd63fee
BLAKE2b-256 b2da77d5f6979b6acef8c56ec8cfb9e0809b1a0670ccfec58be9e6677e5194d8

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.3rc1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for tinyaes-1.0.3rc1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 115cdd6c5de636b1c28189b112b635acca79249998730ddf4ddaf1481336cf8f
MD5 7fbc0fef6a92644fe41818f507cf67fb
BLAKE2b-256 0d7e0f8a53b59c5ad5a9560c38c8fee0b6e3f68d782c0a838cfd6bd229be6b18

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tinyaes-1.0.3rc1-cp39-cp39-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: CPython 3.9, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for tinyaes-1.0.3rc1-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 89dd776390ddf87166cfcb099f635f067de8895fe47ab2b3c2e2340a3c3417da
MD5 55d269701f73887940b18ac71d84264a
BLAKE2b-256 50f9ee32b6c191d4578b40b07ebe84fba0a963d389b775168039f4b074040c50

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tinyaes-1.0.3rc1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 21.6 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for tinyaes-1.0.3rc1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2ab451ef9d49c84859b8a3b455eb42493f6d02f7bf91834cf901bf08962cf143
MD5 e35c2f97ed1ec1677757e12e384b7a60
BLAKE2b-256 41f504cdbdde664dabeae7e91cb7d12ba31f06026021f9529b63b65860a379e7

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.3rc1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for tinyaes-1.0.3rc1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 506be9a02e4b9e1d74d1c36889ac615a34305dae3a999fdbc0fc31a098f19dd4
MD5 dc768992ef375c488051e1af01d4d601
BLAKE2b-256 61c973c2ef9c53888eb110ecef084e289fdedcb30f8b88e23f8747aeaff6f363

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tinyaes-1.0.3rc1-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: CPython 3.8, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for tinyaes-1.0.3rc1-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 7ed395dad3b39e3793e059cfed2348c00d9ed73b2bf0cbe88a086745c0453104
MD5 5090c744486ea8b6963c30c56db40581
BLAKE2b-256 9db220410bbeef283a97c521f015c7c2fed7ead094e0637691f8e14306afe104

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tinyaes-1.0.3rc1-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.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for tinyaes-1.0.3rc1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 b5eccf30fdd2f4f0cf19823ac1053952eae186d4f5f859a70fe84ba1e76932bd
MD5 24257bb54c2508e9b7199626d343fd87
BLAKE2b-256 45c24052d0dad3eb30d995648b5d473175d327f78ec70cc3e554f52bedbfd175

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.3rc1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for tinyaes-1.0.3rc1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b83ab5022dcfca75628a7deeca2fc949918f78a8f027a86190f74788eee9e649
MD5 af5e3f20e12abf2ab347c1c94ec470c4
BLAKE2b-256 d241e9afeab335011539bfd7413f34df719bf4c109b995284e986acf293e9df9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tinyaes-1.0.3rc1-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12

File hashes

Hashes for tinyaes-1.0.3rc1-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 bdd388f25807920a48c1c42dc92ebe58769fd4807f474162ce1b7e8e342ae1e7
MD5 ab8fb5b06cefeac18724151e4e8494b4
BLAKE2b-256 d27f33fe132b99ed9cbe121b2e8f973eeba1e4b12845b18e34f4f063c9419878

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tinyaes-1.0.3rc1-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.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.8

File hashes

Hashes for tinyaes-1.0.3rc1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 c07b7ddf1ff9822369939ea331b6e1bea6a9a68de3dbef426a0ace34b93a8916
MD5 c5f3367dc66a1b30305057f2b9140461
BLAKE2b-256 22243773aae1bc89f8c3e198eaf1ea55f6c780381ccf9df6e61da648ce932702

See more details on using hashes here.

File details

Details for the file tinyaes-1.0.3rc1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for tinyaes-1.0.3rc1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 6a03ccc7551197da41e37b34a890084757182efc1ed98a07ef4687e2fe0cd844
MD5 9870220ac2debd95fbcd4f17759d5a66
BLAKE2b-256 9c712783efc5d76affffa6f61fc46a42ca647a0b852af2bc1a19576d4aff42da

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tinyaes-1.0.3rc1-cp36-cp36m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: CPython 3.6m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15

File hashes

Hashes for tinyaes-1.0.3rc1-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 cf36a2d02d68d4f01b544ceda1255bdf6d1f740dc55d6868b7d50da32e6afc0a
MD5 01b3a38c7a0204211e3e3489e80d267f
BLAKE2b-256 dbd7a195e2d31902aef1734799eb5f7f2961c0647ef0af7da089d789f3ba3fa2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tinyaes-1.0.3rc1-cp27-cp27m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 59b7f6a15bdccc80fdb5153e4ce37bdd1d65317a1d3e9226dd416564d73a8acc
MD5 782d8cbc26d2df12deb4786b88197ef1
BLAKE2b-256 3da7edc472a292618f7d851d977a17483e80305d83cc9784059682a92930180d

See more details on using hashes here.

Supported by

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