extmod/moducryptolib: Add AES-CTR support.

Selectable at compile time via MICROPY_PY_UCRYPTOLIB_CTR.  Disabled by
default.
This commit is contained in:
Yonatan Goldschmidt
2019-04-23 12:39:05 +03:00
committed by Damien George
parent 906fb89fd7
commit ef9843653b
6 changed files with 119 additions and 21 deletions

View File

@@ -22,9 +22,11 @@ Classes
* *mode* is:
* ``1`` (or ``ucryptolib.MODE_ECB`` if it exists) for Electronic Code Book (ECB).
* ``2`` (or ``ucryptolib.MODE_CBC`` if it exists) for Cipher Block Chaining (CBC)
* ``2`` (or ``ucryptolib.MODE_CBC`` if it exists) for Cipher Block Chaining (CBC).
* ``6`` (or ``ucryptolib.MODE_CTR`` if it exists) for Counter mode (CTR).
* *IV* is an initialization vector for CBC mode.
* For Counter mode, *IV* is the initial value for the counter.
.. method:: encrypt(in_buf, [out_buf])