ESP32 Elliptic curve cryptography with micro-ecc, aes, sha example

User avatar
pcbreflux
Posts: 28
Joined: Sat Feb 11, 2017 1:00 am
Location: germany
Contact:

ESP32 Elliptic curve cryptography with micro-ecc, aes, sha example

Postby pcbreflux » Wed Apr 19, 2017 12:52 pm

Sample using Elliptic curve cryptography with micro-ecc and ESP32 hardware enabled cryptography aes (256 bits, Counter Mode (CTR)) and sha (SHA-256) hash:

https://github.com/pcbreflux/espressif/tree/master/esp32/app/ESP32_micro-ecc
Attachments
micro-ecc.png
micro-ecc.png (172.6 KiB) Viewed 1528 times

DL88AI88
Posts: 26
Joined: Mon Aug 29, 2016 8:26 am

Re: ESP32 Elliptic curve cryptography with micro-ecc, aes, sha example

Postby DL88AI88 » Sun Apr 23, 2017 3:57 pm

Hi pcbreflux,

this is really cool.
Please, more of those examples.

Something like reading from an uart (e.g. rfid rdm6300 keys) and sending it as encrypted mqtt messages via wifi to a mosqitto server. ;)

Keep on publishing.

Best regards.

DL88AI88

User avatar
pcbreflux
Posts: 28
Joined: Sat Feb 11, 2017 1:00 am
Location: germany
Contact:

Re: ESP32 Elliptic curve cryptography with micro-ecc, aes, sha example

Postby pcbreflux » Mon Apr 24, 2017 8:30 pm

Hi DL88AI88,

thanks. Coincidentally i published a new secure MQTT example on github yesterday.
With MQTT via SSL/TLS (also hardware encrypted) and Websocket -> testing my secured mosquitto servers on UBUNTU and Raspberian.

-> Part of my /etc/mosquitto/mosquitto.conf

Code: Select all

listener 9883
protocol websockets
cafile /etc/mosquitto/certs/ca.crt
certfile /etc/mosquitto/certs/server.crt
keyfile /etc/mosquitto/certs/server.key


ESP32 example:
https://github.com/pcbreflux/espressif/tree/master/esp32/app/ESP32_mqtts_gpio

Code: Select all

I (50036) MQTTS: MQTTClientInit  ESP32MQTTE2F9A905
I (50036) MQTTS: MQTTConnect  ...
I (50256) MQTTS: MQTTSubscribe  ...
I (50456) MQTTS: MQTTYield  ...
I (104616) MQTTS: Topic received!: esp32/bulb1/1 32
I (104616) MQTTS: setLED!: 18 1 32 1 13
I (134726) MQTTS: Topic received!: esp32/bulb1/4 40
I (134726) MQTTS: setLED!: 22 4 40 4 13
I (149196) MQTTS: Topic received!: esp32/bulb1/5 40
I (149196) MQTTS: setLED!: 22 4 40 5 13
I (160276) MQTTS: Topic received!: esp32/bulb1/7 40
I (160276) MQTTS: setLED!: 22 4 40 7 13
I (172156) MQTTS: Topic received!: esp32/bulb1/7 100
I (172156) MQTTS: setLED!: 22 4 100 7 13
I (180026) MQTTS: Topic received!: esp32/bulb1/0 100
I (180026) MQTTS: setLED!: 5 0 100 0 13
I (189086) MQTTS: Topic received!: esp32/bulb1/0 140
I (189086) MQTTS: setLED!: 5 0 140 0 13


But i will try an example with "secure" bluetooth in the future.

sukeshak
Posts: 39
Joined: Sat Aug 19, 2017 10:20 am

Re: ESP32 Elliptic curve cryptography with micro-ecc, aes, sha example

Postby sukeshak » Mon Sep 10, 2018 8:19 pm

Is this similar to STSAFE-A100 but without the dedicated hardware IC?
https://www.st.com/en/secure-mcus/stsafe-a100.html

I am looking to add STSAFE-A100 module for my device for Unique deviceID, authentication, TLS and also for saving credentials. The device would be connected and managed by Microsoft Azure including OTA.

Who is online

Users browsing this forum: jas39_ and 2 guests