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

Add CCM mode #169

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add CCM mode #169

wants to merge 3 commits into from

Conversation

cy18
Copy link

@cy18 cy18 commented Jul 3, 2020

I have written a python script to generate test cases with different length of data, nonce and tag, However, only one case is added to test.c . Should I upload the scripts, too?

This version is just for review and not ready to be merged. Any comments or suggestions are welcomed.

@kokke
Copy link
Owner

kokke commented Jul 3, 2020

I have written a python script to generate test cases with different length of data, nonce and tag, However, only one case is added to test.c . Should I upload the scripts, too?

Nah, I think I get the point. I do like the idea though.
I've done something similar e.g. with the bignum library: using Python to generate random inputs -> calculate expected output, and then compare results with the C-code.

This version is just for review and not ready to be merged. Any comments or suggestions are welcomed.

At first glance it looks super clean :)

I'll take a deeper dive tonight, when I get home from work.

@kokke
Copy link
Owner

kokke commented Jul 9, 2020

Sorry for the silence, but I did not get around to writing something substantial after reviewing your code.

I have a few ideas I would like to try out, e.g. consolidating the CCM struct into the already-existing context object.

I am on vacation for the next two weeks though, so please bear with me until I’m back.

@cy18
Copy link
Author

cy18 commented Jul 10, 2020

No hurry.

Why not use different context types for each of modes? This would make it more extensible.

@dalbert2
Copy link

dalbert2 commented Oct 17, 2022

Has there been progress on this? CCM support would be a terrific addition to tiny-AES! In support of CCM over GCM, the CTR mode implementation is particularly attractive due to its exceptionally small footprint. By comparison, an existing Tiny-AES-GCM implementation (https://github.com/FukuanWang/tiny_aes_gcm) consumes 1.4K more flash than stock TinyAES-CTR (which doesn't sound like a lot but breaks my budget). If CCM could be implemented without a huge expansion of the CTR footprint, it would be a great addition to tiny-AES.

Many thanks to the devs!

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

Successfully merging this pull request may close these issues.

None yet

3 participants