aesio module for feather M4 express?

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
d0773d
 
Posts: 22
Joined: Tue Aug 07, 2012 2:45 am

aesio module for feather M4 express?

Post by d0773d »

Does the feather m4 express support aes encryption? I checked the built-in modules section on https://circuitpython.org/board/feather_m4_express/ for aesio and I don't see support for aesio.. I'm looking for an example of how to encrypt/decrypt using aes.

User avatar
d0773d
 
Posts: 22
Joined: Tue Aug 07, 2012 2:45 am

Re: aesio module for feather M4 express?

Post by d0773d »

I'm attempting to run a basic aes-ecb encryption example from the docs. Yes, I know cbc or ctr is a better choice for encryption.

Code: Select all

import aesio
from binascii import hexlify

key = b'Sixteen byte key'
inp = b'Circuit Python!!' # Note: 16-bytes long
outp = bytearray(len(inp))
cipher = aesio.AES(key, aesio.mode.MODE_ECB)
cipher.encrypt_into(inp, outp)
hexlify(outp)
print(outp)

User avatar
d0773d
 
Posts: 22
Joined: Tue Aug 07, 2012 2:45 am

Re: aesio module for feather M4 express?

Post by d0773d »

I probably should have placed this thread into the circuit python section. My apologies.

User avatar
42volts
 
Posts: 106
Joined: Sat Jan 19, 2019 11:20 am

Re: aesio module for feather M4 express?

Post by 42volts »

From the SAMD51 datasheet;

Code: Select all

BANNED
• One Advanced Encryption System (AES) with 256-bit key length and up to 2 MB/s data rate
– Five confidential modes of operation (ECB, CBC, CFB, OFB, CTR)
– Supports counter with CBC-MAC mode
– Galois Counter Mode (GCM)
• True Random Number Generator (TRNG)
• Public Key BANNED Controller (PUKCC) and associated Classical Public Key BANNED Library
(PUKCL)
– RSA, DSA
– Elliptic Curves BANNED (ECC) ECC GF(2n), ECC GF(p)
• Integrity Check Module (I CM) based on Secure Hash Algorithm (SHA1, SHA224, SHA256), DMA assisted

User avatar
d0773d
 
Posts: 22
Joined: Tue Aug 07, 2012 2:45 am

Re: aesio module for feather M4 express?

Post by d0773d »

42volts wrote:From the SAMD51 datasheet;

Code: Select all

BANNED
• One Advanced Encryption System (AES) with 256-bit key length and up to 2 MB/s data rate
– Five confidential modes of operation (ECB, CBC, CFB, OFB, CTR)
– Supports counter with CBC-MAC mode
– Galois Counter Mode (GCM)
• True Random Number Generator (TRNG)
• Public Key BANNED Controller (PUKCC) and associated Classical Public Key BANNED Library
(PUKCL)
– RSA, DSA
– Elliptic Curves BANNED (ECC) ECC GF(2n), ECC GF(p)
• Integrity Check Module (I CM) based on Secure Hash Algorithm (SHA1, SHA224, SHA256), DMA assisted
Thank you for replying. This is good to know. Is it possible to utilize the built-in encryption support using CircuitPython for the feather m4 express? I attempted to use the example aesio code from https://circuitpython.readthedocs.io/en ... index.html, but there was an error: ImportError: no module named 'aesio' I searched through the libs located inside my downloaded Bundle Version 6.x and i didn't find an aesio module. So, I'm assuming aesio isn't supported for the feather m4 express?

User avatar
42volts
 
Posts: 106
Joined: Sat Jan 19, 2019 11:20 am

Re: aesio module for feather M4 express?

Post by 42volts »

d0773d wrote:Is it possible to utilize the built-in encryption support using CircuitPython for the feather m4 express? I attempted to use the example aesio code from https://circuitpython.readthedocs.io/en ... index.html, but there was an error: ImportError: no module named 'aesio' I searched through the libs located inside my downloaded Bundle Version 6.x and i didn't find an aesio module. So, I'm assuming aesio isn't supported for the feather m4 express?
I couldn't answer that since I don't and won't ever use [circuit]python. If they offer you some way to access the registers, then I'd say YES FOR SURE. If not, then you're stuck with whatever support somebody has written for it.

Good luck!

User avatar
d0773d
 
Posts: 22
Joined: Tue Aug 07, 2012 2:45 am

Re: aesio module for feather M4 express?

Post by d0773d »

Got it. Thank you. Hopefully, I can, if not then maybe I can achieve encryption using arduino? For now, I will wait for another response....

Locked
Please be positive and constructive with your questions and comments.

Return to “Itsy Bitsy Boards”