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

Is there any plan to support CCM mode? #168

Open
cy18 opened this issue Jul 1, 2020 · 5 comments
Open

Is there any plan to support CCM mode? #168

cy18 opened this issue Jul 1, 2020 · 5 comments

Comments

@cy18
Copy link

cy18 commented Jul 1, 2020

No description provided.

@kokke
Copy link
Owner

kokke commented Jul 2, 2020

Hi @cy18 and thanks for your interest :)

No plans currently, unfortunately. Furthermore, for an AEAD algorithm I think I would prefer GCM and I do have plans to support GCM some day.

For a comparison between CCM and GCM, see this link : https://crypto.stackexchange.com/a/19446/51068

@kokke kokke closed this as completed Jul 2, 2020
@cy18
Copy link
Author

cy18 commented Jul 2, 2020

Thank you for your work on tiny-AES-c. @kokke

Here's another comparison about CCM and GCM https://crypto.stackexchange.com/questions/24095/aes-gcm-vs-other-encryption-modes-in-embedded-environment-for-network-traffic

I think CCM is a better than GCM on MCU applications. This is because CCM only need AES Cipher, and fewer ROM and RAM are needed. When speed is the concern, use -O3 instead of -Os could increase the speed massively. Futher more, CCM could take more advantage of hardware AES. This could be useful when communicating between one MCU with hardware AES and another without.

I have forked tiny-AES-c to added support for CCM, and it is quite simple. I'm willing to submit a PR but I found it's hard to keep the style and API uniform.

@kokke
Copy link
Owner

kokke commented Jul 2, 2020

Hi @cy18

Here's another comparison about CCM and GCM https://crypto.stackexchange.com/questions/24095/aes-gcm-vs-other-encryption-modes-in-embedded-environment-for-network-traffic

Thanks for the link. The discussion sheds light on some nuances I hadn't considered regarding data-dependency.

I think CCM is a better than GCM on MCU applications. This is because CCM only need AES Cipher, and fewer ROM and RAM are needed. When speed is the concern, use -O3 instead of -Os could increase the speed massively. Futher more, CCM could take more advantage of hardware AES. This could be useful when communicating between one MCU with hardware AES and another without.

The main design goal of this library is not performance but a small resource footprint (RAM/ROM), so I don't have much opinion performance-wise, as long as the performance is usable/acceptable.

I have forked tiny-AES-c to added support for CCM, and it is quite simple. I'm willing to submit a PR but I found it's hard to keep the style and API uniform.

I checked out your github repos, but couldn't find mention of CCM mode - am I missing something? :S

If you're willing to make a PR, I think we can work out something w.r.t. style and API conformity. The API is not frozen, so if it needs some refactoring to make CCM a fit, I think we can make it happen.

I'm always interested in gaining a new feature/mode-of-operation ;)

@kokke kokke reopened this Jul 2, 2020
@cy18
Copy link
Author

cy18 commented Jul 2, 2020

I have not pushed it yet. I'll do some clean up and push it tomorrow.

@kokke
Copy link
Owner

kokke commented Jul 3, 2020

Just for reference, #169 is related to this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants