summaryrefslogtreecommitdiff
path: root/extmod/moducryptolib.c
AgeCommit message (Collapse)Author
2019-08-20extmod/moducryptolib: Use "static" not "STATIC" for inline functions.Damien George
2019-05-06extmod/moducryptolib: Add AES-CTR support for axTLS builds.Yonatan Goldschmidt
2019-05-06extmod/moducryptolib: Add AES-CTR support.Yonatan Goldschmidt
Selectable at compile time via MICROPY_PY_UCRYPTOLIB_CTR. Disabled by default.
2018-06-27extmod/moducryptolib: Don't include arpa/inet.h, it's not needed.Damien George
And some ports (eg esp8266) don't have it.
2018-06-27extmod/moducryptolib: Shorten exception messages to reduce code size.Yonatan Goldschmidt
2018-06-27extmod/moducryptolib: Prefix all Python methods/objects with ucryptolib.Yonatan Goldschmidt
Follows what was done in b045ebd35 for uhashlib.
2018-06-27extmod/moducryptolib: Add an mbedTLS implementation for this module.Yonatan Goldschmidt
2018-06-27extmod/moducryptolib: Refactor functions for clean interface with axTLS.Yonatan Goldschmidt
This will allow implementations other than axTLS. This commit includes additions of checks and clarifications of exceptions related to user input. To make the interface cleaner, I've disallowed switching from encrypt to decrypt in the same object, as this is not always possible with other crypto libraries (not all libraries have AES_convert_key like axTLS).
2018-06-27extmod/moducryptolib: Optionally export MODE_* constants to Python.Yonatan Goldschmidt
Allow including crypto consts based on compilation settings. Disabled by default to reduce code size; if one wants extra code readability, can enable them.
2018-06-27extmod/moducryptolib: Add ucryptolib module with crypto functions.Paul Sokolovsky
The API follows guidelines of https://www.python.org/dev/peps/pep-0272/, but is optimized for code size, with the idea that full PEP 0272 compatibility can be added with a simple Python wrapper mode. The naming of the module follows (u)hashlib pattern. At the bare minimum, this module is expected to provide: * AES128, ECB (i.e. "null") mode, encrypt only Implementation in this commit is based on axTLS routines, and implements following: * AES 128 and 256 * ECB and CBC modes * encrypt and decrypt