Support for hardware crypto?

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
User avatar
roland_vs
Posts: 89
Joined: Tue Dec 08, 2015 8:28 pm
Location: Netherlands
Contact:

Support for hardware crypto?

Post by roland_vs » Wed Nov 08, 2017 8:09 am

Hello,

Many flavours of the STM32 have a crypto unit in hardware and also there are a number of chips like the ATECC508 from Atmel that have such engine for AES, DES, SHA1, SHA2, etc. on board.

It seems that the STM32 HAL has a decent interface to the hardware crypto unit. Does anyone work on making the crypto engine of the STM32 available through micropython or does anyone work on implementing the ATECC508 as a driver?

Like to hear about it?

Roland

pagano.paganino
Posts: 89
Joined: Fri Sep 11, 2015 10:47 pm
Location: Italy

Re: Support for hardware crypto?

Post by pagano.paganino » Thu Dec 21, 2017 4:13 pm

atecc508a driver in c https://github.com/conorpp/u2f-zero/blo ... tecc508a.c is simple to convert into python.

User avatar
roland_vs
Posts: 89
Joined: Tue Dec 08, 2015 8:28 pm
Location: Netherlands
Contact:

Re: Support for hardware crypto?

Post by roland_vs » Wed Jan 10, 2018 1:23 am

Thanks!

pagano.paganino
Posts: 89
Joined: Fri Sep 11, 2015 10:47 pm
Location: Italy

Re: Support for hardware crypto?

Post by pagano.paganino » Tue Aug 28, 2018 9:47 pm

Hi Roland,
have you got the chance and time to try the secure element ATECC508A?

Best Regards,
D.

pagano.paganino
Posts: 89
Joined: Fri Sep 11, 2015 10:47 pm
Location: Italy

Re: Support for hardware crypto?

Post by pagano.paganino » Mon Sep 24, 2018 10:14 pm

Hi,
yesterday I created a github repository and started a first version of the driver for atecc508a.

The long-term goal is to support all devices in the family of the secure elements of Microchip ateccX08a.

Now I'm working on the ATECC508A device and at the moment the INFO and SHA commands are supported, I'm completing the tests and gradually I'll complete all the commands supported by the device.

For clarifications, suggestions, questions, support and insults do not hesitate to contact me.

Greetings,
D.

User avatar
TravisT
Posts: 72
Joined: Sun Feb 23, 2014 2:31 pm
Location: Portland, OR
Contact:

Re: Support for hardware crypto?

Post by TravisT » Tue Dec 11, 2018 1:38 am

I am interested in helping with developing and supporting your development. I emailed you directly so we can discuss.

I am also looking into seeing if I can find somebody to help with evaluating porting the STM32crypto library to Micropython. I just do not have the time or knowledge to do this efficiently.

I am looking at the ATECC608 chip mainly since it is newer and has a couple additional features.

Thanks
_______________
Travis Travelstead

pagano.paganino
Posts: 89
Joined: Fri Sep 11, 2015 10:47 pm
Location: Italy

Re: Support for hardware crypto?

Post by pagano.paganino » Sat Dec 22, 2018 10:21 pm

I am also looking into seeing if I can find somebody to help with evaluating porting the STM32crypto library to Micropython. I just do not have the time or knowledge to do this efficiently.
what features do you need to port the STM32crypto library to micropython? RSA? certificates? csr? ECC? AES? 3DES?

Is the board you intend to use the pyboard? or an hardware accelerated crypto chip?

I can help you on porting, but it's a huge job.
If you tell me what you need in particular, maybe we can reduce the time.

D.

User avatar
TravisT
Posts: 72
Joined: Sun Feb 23, 2014 2:31 pm
Location: Portland, OR
Contact:

Re: Support for hardware crypto?

Post by TravisT » Sun Dec 23, 2018 1:56 am

My main need revolves around ECSDA verification.

What is needed is ECDSA verify routines for key verification between a device and a mobile app. I am being told that the STM32 documentation for the ECDSAverify function (in section 10.2.20) is what is needed. I would like direct STM32 support, but using the ATECC608 has the benefit on working with any MCU with I2C.

https://www.st.com/content/ccc/resource ... 215061.pdf

The pyboard would be ideal since most of the MCUs we are using are STM32F4 or F7.
_______________
Travis Travelstead

Post Reply