Skip to content

Add AES encrypt/decrypt support for SE05X on Arduino with two example sketches #233

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

Closed
wants to merge 3 commits into from

Conversation

jowin202
Copy link
Contributor

@jowin202 jowin202 commented Jan 9, 2024

Hello,

I used the se05x_APDU_apis.h function for block cipher to implement a demonstration example sketch for AES encryption and decryption. I found AES encryption with secure element nowhere (looked for days/hours) and decieded to do it by myself.

Please add this

kind regards

@CLAassistant
Copy link

CLAassistant commented Jan 9, 2024

CLA assistant check
All committers have signed the CLA.

@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jan 9, 2024
@facchinm facchinm requested a review from pennam January 9, 2024 10:07
@jowin202
Copy link
Contributor Author

jowin202 commented Jan 9, 2024

OK, the building process failed with

'class SE05XClass' has no member named 'AES_ECB_encrypt'
'class SE05XClass' has no member named 'AES_ECB_decrypt'
'class SE05XClass' has no member named 'writeAESKey'; did you mean 'writeSlot'?

but this are exactly the 3 functions I added to SE05X.c / SE05X.h library.

@facchinm
Copy link
Member

facchinm commented Jan 9, 2024

@jowin202 test failures on the stable version arduino:renesas_portenta:portenta_c33 are expected (since the APIs are not there yet 😉 ). The test that shouldn't fail (and passes indeed) is on arduino-git:renesas:portenta_c33
Waiting for @pennam review but it looks good to me 👍

Copy link
Contributor

@pennam pennam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works as expected. Thanks @jowin202

@jowin202
Copy link
Contributor Author

Hello,
Just a question: Will this pull request be merged into the original repository (and when)? I would like to do another pull request for HMAC support, but I'm not familiar with github and the branch-things. So I would like to clear my fork and make a completely new pull request.
Kind regards

@pennam
Copy link
Contributor

pennam commented Jan 16, 2024

Hi @jowin202
I see you have added a commit here. Is this the HMAC support you are referring to ? Or do you want to add more changes ?

See commit 336826e

@jowin202
Copy link
Contributor Author

Oh I see the changes are already here now. Yes, I added HMAC to my personal fork, but I don't know if this is working and ready for being included into the main branch.

@pennam
Copy link
Contributor

pennam commented Jan 16, 2024

Ok, so i will take your first commit open a new pr and merge it into main. After that when code is ready you can open a new PR for HMAC support.

@jowin202
Copy link
Contributor Author

Ahh ok. I have 2 commits in this pull request

add AES: 2f96751
add HMAC: 336826e

Hopefully they can be included into the arduino lib

@pennam
Copy link
Contributor

pennam commented Jan 16, 2024

is also 336826e ready? It was not included in the original PR and i've understood you are not sure it is working.

Yes, I added HMAC to my personal fork, but I don't know if this is working and ready for being included into the main branch.

@jowin202
Copy link
Contributor Author

is also 336826e ready? It was not included in the original PR and i've understood you are not sure it is working.

Yes, I added HMAC to my personal fork, but I don't know if this is working and ready for being included into the main branch.

It’s also ready from my side. I haven’t figured out how to make a new pull request.

@pennam
Copy link
Contributor

pennam commented Jan 16, 2024

superseded by #242

@pennam pennam closed this Jan 16, 2024
@per1234 per1234 added the conclusion: duplicate Has already been submitted label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted 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.

5 participants