Skip to content

ECCX08Cert and CryptoUtil: arrangements for the introduction of a new hardware crypto #307

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

Merged
merged 5 commits into from
Mar 7, 2022
Merged

Conversation

pennam
Copy link
Collaborator

@pennam pennam commented Mar 1, 2022

Goal of this PR is to ease the introduction of a new hardware crypto device in the ArduinoIoTCloud stack:

  • ECCX08CertClass is substituted with a more generic ArduinoIoTCloudCertClass based on the original ECCX08CertClass removing all references to ECCX08 device
  • CryptoUtilClass is extended in order to abstract basic crypto API and implementing function to build the Certificate Signing Request and the Certificate Itself.

I've forgot to fix the provisioning example 😿

Provisioning Connection
MKR WIFI 1010 💚 💚
NANO RP2040 💚 💚
NANO 33 IOT 💚 💚
PORTENTA 💚 💚
MKR GSM 1400 💚 💚

@pennam pennam requested review from polldo and aentinger March 1, 2022 17:25
@codecov-commenter
Copy link

Codecov Report

Merging #307 (565b50b) into master (57a6cac) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #307   +/-   ##
=======================================
  Coverage   94.87%   94.87%           
=======================================
  Files          27       27           
  Lines        1113     1113           
=======================================
  Hits         1056     1056           
  Misses         57       57           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57a6cac...565b50b. Read the comment docs.

@per1234 per1234 added topic: code Related to content of the project itself type: enhancement Proposed improvement labels Mar 1, 2022
@arduino-libraries arduino-libraries deleted a comment from github-actions bot Mar 2, 2022
@github-actions
Copy link

github-actions bot commented Mar 2, 2022

Memory usage change @ bc88de4

Board flash % RAM for global variables %
arduino:mbed:envie_m4 ❔ -16 - +136 -0.0 - +0.01 💚 -8 - -8 -0.0 - -0.0
arduino:mbed:envie_m7 ❔ -16 - +72 -0.0 - +0.01 0 - 0 0.0 - 0.0
arduino:mbed_nano:nanorp2040connect 🔺 0 - +70 0.0 - 0.0 💚 -4 - 0 -0.0 - 0.0
arduino:samd:mkr1000 🔺 0 - +104 0.0 - +0.04 💚 -8 - -8 -0.02 - -0.02
arduino:samd:mkrgsm1400 ❔ -8 - +104 -0.0 - +0.04 0 - 0 0.0 - 0.0
arduino:samd:mkrnb1500 🔺 0 - +104 0.0 - +0.04 💚 -8 - -8 -0.02 - -0.02
arduino:samd:mkrwan1300 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwifi1010 💚 -24 - 0 -0.01 - 0.0 💚 -8 - 0 -0.02 - 0.0
arduino:samd:nano_33_iot 💚 -32 - 0 -0.01 - 0.0 💚 -8 - 0 -0.02 - 0.0
esp32:esp32:esp32 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
esp8266:esp8266:huzzah 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/ArduinoIoTCloud-Advanced
flash
% examples/ArduinoIoTCloud-Advanced
RAM for global variables
% examples/ArduinoIoTCloud-Basic
flash
% examples/ArduinoIoTCloud-Basic
RAM for global variables
% examples/utility/ArduinoIoTCloud_Travis_CI
flash
% examples/utility/ArduinoIoTCloud_Travis_CI
RAM for global variables
% examples/utility/Provisioning
flash
% examples/utility/Provisioning
RAM for global variables
% examples/utility/SelfProvisioning
flash
% examples/utility/SelfProvisioning
RAM for global variables
%
arduino:mbed:envie_m4 72 0.01 -8 -0.0 136 0.01 -8 -0.0 136 0.01 -8 -0.0 -16 -0.0 -8 -0.0
arduino:mbed:envie_m7 64 0.01 0 0.0 72 0.01 0 0.0 72 0.01 0 0.0 -16 -0.0 0 0.0
arduino:mbed_nano:nanorp2040connect 30 0.0 0 0.0 30 0.0 0 0.0 30 0.0 0 0.0 70 0.0 -4 -0.0 0 0.0 0 0.0
arduino:samd:mkr1000 104 0.04 -8 -0.02 104 0.04 -8 -0.02 104 0.04 -8 -0.02 0 0.0 -8 -0.02
arduino:samd:mkrgsm1400 104 0.04 0 0.0 104 0.04 0 0.0 104 0.04 0 0.0 -8 -0.0 0 0.0
arduino:samd:mkrnb1500 104 0.04 -8 -0.02 104 0.04 -8 -0.02 104 0.04 -8 -0.02 0 0.0 -8 -0.02
arduino:samd:mkrwan1300 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:samd:mkrwifi1010 -8 -0.0 0 0.0 -8 -0.0 -8 -0.02 -8 -0.0 -8 -0.02 -24 -0.01 -8 -0.02 0 0.0 0 0.0
arduino:samd:nano_33_iot -8 -0.0 0 0.0 -8 -0.0 -8 -0.02 -8 -0.0 -8 -0.02 -32 -0.01 -8 -0.02 0 0.0 0 0.0
esp32:esp32:esp32 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
esp8266:esp8266:huzzah 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,examples/ArduinoIoTCloud-Advanced<br>flash,%,examples/ArduinoIoTCloud-Advanced<br>RAM for global variables,%,examples/ArduinoIoTCloud-Basic<br>flash,%,examples/ArduinoIoTCloud-Basic<br>RAM for global variables,%,examples/utility/ArduinoIoTCloud_Travis_CI<br>flash,%,examples/utility/ArduinoIoTCloud_Travis_CI<br>RAM for global variables,%,examples/utility/Provisioning<br>flash,%,examples/utility/Provisioning<br>RAM for global variables,%,examples/utility/SelfProvisioning<br>flash,%,examples/utility/SelfProvisioning<br>RAM for global variables,%
arduino:mbed:envie_m4,72,0.01,-8,-0.0,136,0.01,-8,-0.0,136,0.01,-8,-0.0,-16,-0.0,-8,-0.0
arduino:mbed:envie_m7,64,0.01,0,0.0,72,0.01,0,0.0,72,0.01,0,0.0,-16,-0.0,0,0.0
arduino:mbed_nano:nanorp2040connect,30,0.0,0,0.0,30,0.0,0,0.0,30,0.0,0,0.0,70,0.0,-4,-0.0,0,0.0,0,0.0
arduino:samd:mkr1000,104,0.04,-8,-0.02,104,0.04,-8,-0.02,104,0.04,-8,-0.02,0,0.0,-8,-0.02,,,,
arduino:samd:mkrgsm1400,104,0.04,0,0.0,104,0.04,0,0.0,104,0.04,0,0.0,-8,-0.0,0,0.0,,,,
arduino:samd:mkrnb1500,104,0.04,-8,-0.02,104,0.04,-8,-0.02,104,0.04,-8,-0.02,0,0.0,-8,-0.02,,,,
arduino:samd:mkrwan1300,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,,,,,,,,
arduino:samd:mkrwifi1010,-8,-0.0,0,0.0,-8,-0.0,-8,-0.02,-8,-0.0,-8,-0.02,-24,-0.01,-8,-0.02,0,0.0,0,0.0
arduino:samd:nano_33_iot,-8,-0.0,0,0.0,-8,-0.0,-8,-0.02,-8,-0.0,-8,-0.02,-32,-0.01,-8,-0.02,0,0.0,0,0.0
esp32:esp32:esp32,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,,,,,,,,
esp8266:esp8266:huzzah,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,,,,,,,,

@arduino-libraries arduino-libraries deleted a comment from github-actions bot Mar 3, 2022
@aentinger
Copy link
Contributor

Hi @pennam ☕ 👋

Looks like you are on a good way. One thing I wanted to let you know is that although the Provisioning sketch stored in this repository is very close/identical to the one used during cloud provisioning, the cloud team is storing their own version in a different (private) repository. Please check with @eclipse1985 to make sure their version is updated too, once your changes are complete.

Cheers, Alex

@pennam
Copy link
Collaborator Author

pennam commented Mar 3, 2022

Thank you @aentinger, I've already updated also that one. I think that today i will make the final round of test on the board i have and then i will go on merging this one and opening another pr with the second part of this work.

@pennam pennam merged commit 23e7f09 into arduino-libraries:master Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants