<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/shared-bindings/aesio/aes.c, branch encoding</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=encoding</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=encoding'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2020-07-03T17:49:00+00:00</updated>
<entry>
<title>Made most of the requested changes</title>
<updated>2020-07-03T17:49:00+00:00</updated>
<author>
<name>dherrada</name>
<email>dylan.herrada@adafruit.com</email>
</author>
<published>2020-07-03T17:49:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3df03a565069d6e8874eb678d4f010eee97305b0'/>
<id>urn:sha1:3df03a565069d6e8874eb678d4f010eee97305b0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Changed unions to ReadableBuffer and WriteableBuffer</title>
<updated>2020-07-02T21:47:52+00:00</updated>
<author>
<name>dherrada</name>
<email>dylan.herrada@adafruit.com</email>
</author>
<published>2020-07-02T21:47:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9b4ffc05710873e69bfeed209d0f7ebd8fb2f259'/>
<id>urn:sha1:9b4ffc05710873e69bfeed209d0f7ebd8fb2f259</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Made suggested changes</title>
<updated>2020-07-02T17:25:07+00:00</updated>
<author>
<name>dherrada</name>
<email>dylan.herrada@adafruit.com</email>
</author>
<published>2020-07-02T17:25:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=522b17ca93d4e1d64bb113057c8a62992a22c4ab'/>
<id>urn:sha1:522b17ca93d4e1d64bb113057c8a62992a22c4ab</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Changed bytearray to a union</title>
<updated>2020-07-02T16:39:17+00:00</updated>
<author>
<name>dherrada</name>
<email>dylan.herrada@adafruit.com</email>
</author>
<published>2020-07-02T16:39:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ac113fdc815f31b54d742f73265359787bd95290'/>
<id>urn:sha1:ac113fdc815f31b54d742f73265359787bd95290</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Did aesio</title>
<updated>2020-07-02T15:10:53+00:00</updated>
<author>
<name>dherrada</name>
<email>dylan.herrada@adafruit.com</email>
</author>
<published>2020-07-02T15:10:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=627ecadb3f6f131f62a760bb58f3f329b9ad1c2c'/>
<id>urn:sha1:627ecadb3f6f131f62a760bb58f3f329b9ad1c2c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge pull request #2810 from dherrada/master</title>
<updated>2020-05-15T17:31:05+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@adafruit.com</email>
</author>
<published>2020-05-15T17:31:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0d8bca92e208e705150097d26db6a5390dc9eb9b'/>
<id>urn:sha1:0d8bca92e208e705150097d26db6a5390dc9eb9b</id>
<content type='text'>
Pyi integration</content>
</entry>
<entry>
<title>aesio: specify writable buffers for destination buffers</title>
<updated>2020-05-15T02:22:42+00:00</updated>
<author>
<name>Sean Cross</name>
<email>sean@xobs.io</email>
</author>
<published>2020-05-15T02:20:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f9ed3acf6d7582f495a4b6c1ae25aff5619a55ad'/>
<id>urn:sha1:f9ed3acf6d7582f495a4b6c1ae25aff5619a55ad</id>
<content type='text'>
When calling `AES.decrypt_into()` or `AES.encrypt_into()`, the
destination buffers may be any buffer kind.  However, we currently
aren't checking to make sure the destination buffer is actually
writable.

Specify `MP_BUFFER_WRITE` for the destination buffers of both of these
objects so we don't inadvertently write to immutable data.

Signed-off-by: Sean Cross &lt;sean@xobs.io&gt;
</content>
</entry>
<entry>
<title>aesio: use bufinfo rather than mp_str_bytes</title>
<updated>2020-05-15T02:16:00+00:00</updated>
<author>
<name>Sean Cross</name>
<email>sean@xobs.io</email>
</author>
<published>2020-05-15T02:14:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=aba36e4abff80bc8897e752b93e7a2ffa4fd69e6'/>
<id>urn:sha1:aba36e4abff80bc8897e752b93e7a2ffa4fd69e6</id>
<content type='text'>
In order to accept both `bytes` objects and `bytearray` objects, use a
`bufinfo` construct to retrieve the data rather than
`mp_obj_str_get_data()`.

Signed-off-by: Sean Cross &lt;sean@xobs.io&gt;
</content>
</entry>
<entry>
<title>Swap sphinx to autoapi and the inline stubs</title>
<updated>2020-05-13T00:28:24+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-05-13T00:15:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4e8de3c554024d3ac89e9ee77b958a6932a64bec'/>
<id>urn:sha1:4e8de3c554024d3ac89e9ee77b958a6932a64bec</id>
<content type='text'>
</content>
</entry>
<entry>
<title>aesio: add basic AES encryption and decryption</title>
<updated>2020-05-06T09:40:06+00:00</updated>
<author>
<name>Sean Cross</name>
<email>sean@xobs.io</email>
</author>
<published>2020-04-14T03:18:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b168784fa0fd97b17807836b390c79abaadfa8e4'/>
<id>urn:sha1:b168784fa0fd97b17807836b390c79abaadfa8e4</id>
<content type='text'>
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:

```
&gt;&gt;&gt; import aesio
&gt;&gt;&gt;
&gt;&gt;&gt; key = b'Sixteen byte key'
&gt;&gt;&gt; cipher = aesio.AES(key, aesio.MODE_ECB)
&gt;&gt;&gt; output = bytearray(16)
&gt;&gt;&gt; cipher.encrypt_into(b'Circuit Python!!', output)
&gt;&gt;&gt; output
bytearray(b'E\x14\x85\x18\x9a\x9c\r\x95&gt;\xa7kV\xa2`\x8b\n')
&gt;&gt;&gt;
```

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 &lt;sean@xobs.io&gt;
</content>
</entry>
</feed>
