Skip to content

Add CCM mode - #169

Open
cy18 wants to merge 3 commits into
kokke:masterfrom
cy18:CCM
Open

Add CCM mode#169
cy18 wants to merge 3 commits into
kokke:masterfrom
cy18:CCM

Conversation

@cy18

@cy18 cy18 commented Jul 3, 2020

Copy link
Copy Markdown

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

kokke commented Jul 3, 2020

Copy link
Copy Markdown
Owner

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

kokke commented Jul 9, 2020

Copy link
Copy Markdown
Owner

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

cy18 commented Jul 10, 2020

Copy link
Copy Markdown
Author

No hurry.

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

@dalbert2

dalbert2 commented Oct 17, 2022

Copy link
Copy Markdown

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!

mistial-dev added a commit to mistial-dev/tiny-AES-c that referenced this pull request Aug 2, 2026
Add a heap-free one-shot CCM implementation with compile-time gating, in-place authenticated encryption, authentication-failure wiping, published NIST and RFC vectors, focused API boundary tests, and an opt-in complete CAVP corpus.\n\nMoots kokke#169
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.

3 participants