Skip to content
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

fix: input length for ECCX08.ecSign() is 32 bytes #49

Merged
merged 1 commit into from
Sep 18, 2023

Conversation

fogzot
Copy link
Contributor

@fogzot fogzot commented Jun 28, 2023

When using ECCX08.ecSign() the input buffer should be exactly 32 bytes long. The old example worked only because the signature was generated and then checked on the first 32 bytes of the 64 bytes buffer.

When using ECCX08.ecSign() the input buffer should
be exactly 32 bytes long. The old example worked
only because the signature was generated and then
checked on the first 32 bytes of the 64 bytes buffer.
@CLAassistant
Copy link

CLAassistant commented Jun 28, 2023

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

Memory usage change @ b7f79d8

Board flash % RAM for global variables %
arduino:mbed:envie_m7 💚 -32 - 0 -0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_nano:nanorp2040connect 💚 -32 - 0 -0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:megaavr:uno2018 💚 -20 - 0 -0.04 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkr1000 💚 -32 - 0 -0.01 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrgsm1400 💚 -32 - 0 -0.01 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrnb1500 💚 -32 - 0 -0.01 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrvidor4000 💚 -32 - 0 -0.01 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwan1300 💚 -32 - 0 -0.01 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwan1310 💚 -32 - 0 -0.01 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwifi1010 💚 -32 - 0 -0.01 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:nano_33_iot 💚 -32 - 0 -0.01 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/ECCX08HMAC
flash
% examples/ECCX08HMAC
RAM for global variables
% examples/ECCX08RandomNumber
flash
% examples/ECCX08RandomNumber
RAM for global variables
% examples/ECCX08Signing
flash
% examples/ECCX08Signing
RAM for global variables
% examples/Tools/ECCX08CSR
flash
% examples/Tools/ECCX08CSR
RAM for global variables
% examples/Tools/ECCX08JWSPublicKey
flash
% examples/Tools/ECCX08JWSPublicKey
RAM for global variables
% examples/Tools/ECCX08SelfSignedCert
flash
% examples/Tools/ECCX08SelfSignedCert
RAM for global variables
%
arduino:mbed:envie_m7 0 0.0 0 0.0 0 0.0 0 0.0 -32 -0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_nano:nanorp2040connect 0 0.0 0 0.0 0 0.0 0 0.0 -32 -0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:megaavr:uno2018 0 0.0 0 0.0 0 0.0 0 0.0 -20 -0.04 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:samd:mkr1000 0 0.0 0 0.0 0 0.0 0 0.0 -32 -0.01 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:samd:mkrgsm1400 0 0.0 0 0.0 0 0.0 0 0.0 -32 -0.01 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:samd:mkrnb1500 0 0.0 0 0.0 0 0.0 0 0.0 -32 -0.01 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:samd:mkrvidor4000 0 0.0 0 0.0 0 0.0 0 0.0 -32 -0.01 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:samd:mkrwan1300 0 0.0 0 0.0 0 0.0 0 0.0 -32 -0.01 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:samd:mkrwan1310 0 0.0 0 0.0 0 0.0 0 0.0 -32 -0.01 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:samd:mkrwifi1010 0 0.0 0 0.0 0 0.0 0 0.0 -32 -0.01 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:samd:nano_33_iot 0 0.0 0 0.0 0 0.0 0 0.0 -32 -0.01 0 0.0 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/ECCX08HMAC<br>flash,%,examples/ECCX08HMAC<br>RAM for global variables,%,examples/ECCX08RandomNumber<br>flash,%,examples/ECCX08RandomNumber<br>RAM for global variables,%,examples/ECCX08Signing<br>flash,%,examples/ECCX08Signing<br>RAM for global variables,%,examples/Tools/ECCX08CSR<br>flash,%,examples/Tools/ECCX08CSR<br>RAM for global variables,%,examples/Tools/ECCX08JWSPublicKey<br>flash,%,examples/Tools/ECCX08JWSPublicKey<br>RAM for global variables,%,examples/Tools/ECCX08SelfSignedCert<br>flash,%,examples/Tools/ECCX08SelfSignedCert<br>RAM for global variables,%
arduino:mbed:envie_m7,0,0.0,0,0.0,0,0.0,0,0.0,-32,-0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:mbed_nano:nanorp2040connect,0,0.0,0,0.0,0,0.0,0,0.0,-32,-0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:megaavr:uno2018,0,0.0,0,0.0,0,0.0,0,0.0,-20,-0.04,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:samd:mkr1000,0,0.0,0,0.0,0,0.0,0,0.0,-32,-0.01,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:samd:mkrgsm1400,0,0.0,0,0.0,0,0.0,0,0.0,-32,-0.01,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:samd:mkrnb1500,0,0.0,0,0.0,0,0.0,0,0.0,-32,-0.01,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:samd:mkrvidor4000,0,0.0,0,0.0,0,0.0,0,0.0,-32,-0.01,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:samd:mkrwan1300,0,0.0,0,0.0,0,0.0,0,0.0,-32,-0.01,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:samd:mkrwan1310,0,0.0,0,0.0,0,0.0,0,0.0,-32,-0.01,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:samd:mkrwifi1010,0,0.0,0,0.0,0,0.0,0,0.0,-32,-0.01,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:samd:nano_33_iot,0,0.0,0,0.0,0,0.0,0,0.0,-32,-0.01,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0

@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: documentation Related to documentation for the project labels Jun 28, 2023
@manchoz
Copy link

manchoz commented Aug 30, 2023

@pennam, would you mind to review? Thanks!

@pennam
Copy link
Contributor

pennam commented Sep 18, 2023

👍 Thanks for the fix @fogzot

@pennam pennam merged commit aa3932f into arduino-libraries:master Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants