Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aes: add initial AES module #2823

Merged
merged 2 commits into from
May 6, 2020
Merged

aes: add initial AES module #2823

merged 2 commits into from
May 6, 2020

Commits on May 6, 2020

  1. aesio: add basic AES encryption and decryption

    This adds initial support for an AES module named aesio.  This
    implementation supports only a subset of AES modes, namely
    ECB, CBC, and CTR modes.
    
    Example usage:
    
    ```
    >>> import aesio
    >>>
    >>> key = b'Sixteen byte key'
    >>> cipher = aesio.AES(key, aesio.MODE_ECB)
    >>> output = bytearray(16)
    >>> cipher.encrypt_into(b'Circuit Python!!', output)
    >>> output
    bytearray(b'E\x14\x85\x18\x9a\x9c\r\x95>\xa7kV\xa2`\x8b\n')
    >>>
    ```
    
    This key is 16-bytes, so it uses AES128.  If your key is 24- or 32-
    bytes long, it will switch to AES192 or AES256 respectively.
    
    This has been tested with many of the official NIST test vectors,
    such as those used in `pycryptodome` at
    https://github.com/Legrandin/pycryptodome/tree/39626a5b01ce5c1cf51d022be166ad0aea722177/lib/Crypto/SelfTest/Cipher/test_vectors/AES
    
    CTR has not been tested as NIST does not provide test vectors for it.
    
    Signed-off-by: Sean Cross <sean@xobs.io>
    xobs committed May 6, 2020
    Configuration menu
    Copy the full SHA
    b168784 View commit details
    Browse the repository at this point in the history
  2. locale: add translations for aesio

    This is the result of running `make translate` after creating aesio.
    
    Signed-off-by: Sean Cross <sean@xobs.io>
    xobs committed May 6, 2020
    Configuration menu
    Copy the full SHA
    b9f62ab View commit details
    Browse the repository at this point in the history