tiny-AES-c wrapper in Cython
Project description
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 onbytearray
s only, modifying the buffer in-place.
Release notes
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for tinyaes-1.0.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ace73cfa1185639c0dba056c40da65e09ba6fbe4641fa3969b37b38a55318445 |
|
MD5 | 55a7ec0c310558385ff9c6759040e079 |
|
BLAKE2b-256 | 8dff3c4b908f063cbc3b8f61fc56ea85cf68b586eda572fb219b04aedea912d4 |
Hashes for tinyaes-1.0.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e166e0ab53551ca10bcf8ce5d3ea4b8583d5070458691f07c4633d865ef922d9 |
|
MD5 | bd3e5949431fb0b24ee45077616936bb |
|
BLAKE2b-256 | 452a3d4f0101aed570c3dc8b4744da38d7dd2fcb407d43228862e03a85a2e782 |
Hashes for tinyaes-1.0.1-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a989249e3c23a4224554ef0883a5dddc97eb5ea1746b6aec11ac84b79b82ff1 |
|
MD5 | ad2f410cdb2c7dfadb4f6d4397f7b09f |
|
BLAKE2b-256 | 1b03854943ab1ea24468c17e9c24b9869a0f82d14a5aa6bb08b25eda17fc2a0b |
Hashes for tinyaes-1.0.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94d11f802d3c15f1d5af90346b69236a85830fde324239981af2585f564807a6 |
|
MD5 | 63d49abe4e12a3ad51c240bce85748e5 |
|
BLAKE2b-256 | 12f7ab0207cc03bba22dc5767b3d41eccf4902aad2e6acb762b2c15c437de906 |
Hashes for tinyaes-1.0.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c4d9280b90a32ea91a5c7d34f25c374da427a64ff27ad11dbb81425018c5925 |
|
MD5 | c9545bdefbb31e9938a73a7fbdff5f8d |
|
BLAKE2b-256 | cfb48428bf40a35447e846e1eb492c6b31a2eea93cf99b1c420c4bab8fc85b1c |
Hashes for tinyaes-1.0.1-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dff75c1c743bf1ad6ee3d15c7b264c553a8446d6ba3a7f92f4e6ffe48ee4dc3 |
|
MD5 | d1079ef736c255c9d296aeb041f528b0 |
|
BLAKE2b-256 | fd3a55588b9a14b360ac9cfd5c573970f91d40e454a7d5f76f1237df862368dc |
Hashes for tinyaes-1.0.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5932a102f53c50c89e985b49f0c139e9ef576a557635e7495178c52fec5b3be6 |
|
MD5 | 0b816adadd29b6564f230923efc07c2e |
|
BLAKE2b-256 | 59d9115d7cb7078f359cd646f573a475ee13ca74404f6eb4abe034dd26c003e5 |
Hashes for tinyaes-1.0.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5ecf7ee92a22f79cf44a9fbe8e2fd0c586b027e9bdf0252620e6aeb0d05e147 |
|
MD5 | 18171c4b3fbf8b1ecefe69689ace6f1d |
|
BLAKE2b-256 | 869ebd5eddd839e581cb2e2dff2cb0e2c7227271cf67c496d7bb2fd3c61bb70e |
Hashes for tinyaes-1.0.1-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8e85cf4ae705037b8214f09290531b635f3b57f1cc76e90ff73c503e704f24d |
|
MD5 | a791fd92455e8a0aa6f25e2f0663b2a0 |
|
BLAKE2b-256 | c0b5212719782458da1c73cbd5faf33e5e17940ae810dc4c8ec499ae9e991bac |
Hashes for tinyaes-1.0.1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e63be63c5ddd6dbdfbd046b63e44b1638e4088fce95656d7b07675b5bcb7e25 |
|
MD5 | 4e43402568214cd327c67d1c356e3805 |
|
BLAKE2b-256 | ef0760a8afc4b7c12e946d44eaeb75711a2c20a2ed3fdc123974da59c83c4dac |
Hashes for tinyaes-1.0.1-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fe33f5c375d2d03510a5e484e664a93f3ee765c0a91c6e6ceab6977a12444fa |
|
MD5 | 5b694d9fa8beba9477d9e8f7d31f7741 |
|
BLAKE2b-256 | 9b23396f0ed9c17f9adb9f8be1ddd93ed6a520cd4cd0d94b1254d816bb461ff1 |
Hashes for tinyaes-1.0.1-cp27-cp27m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5478b9f2d9ff5f25f9006c36ec596dc728dc0d0114e24e3b9055ab6526f12330 |
|
MD5 | 958a39fd9f8f1ccc808764cd54e78236 |
|
BLAKE2b-256 | 2c6620b90759a57a9d3d682d19bee3c200d8eab186eb27d1f0f7ac725755ffd5 |