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

Conform to Ascon Draft Standard #26

Merged
merged 71 commits into from
Dec 6, 2024
Merged

Conform to Ascon Draft Standard #26

merged 71 commits into from
Dec 6, 2024

Conversation

itzmeanjan
Copy link
Owner

Given that NIST has finally (thanks NIST 🫡) released initial public draft for Ascon LwC cipher suite, I attempt to make this implementation of Ascon cipher suite conforming to the draft standard.

Read Ascon LwC draft standard @ https://doi.org/10.6028/NIST.SP.800-232.ipd

Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
Comments are written using Google Gemini LLM 🤩

Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
This optimization makes Ascon permutation with even rounds, ~(2-3)% faster.

```bash
Benchmark                                                        Time             CPU      Time Old      Time New       CPU Old       CPU New
---------------------------------------------------------------------------------------------------------------------------------------------
ascon_[permutation vs. permutation]<1>_mean                   +0.0017         +0.0018             7             7             7             7
ascon_[permutation vs. permutation]<1>_median                 +0.0015         +0.0015             7             7             7             7
ascon_[permutation vs. permutation]<1>_stddev                 +0.6419         +0.2762             0             0             0             0
ascon_[permutation vs. permutation]<1>_cv                     +0.6391         +0.2739             0             0             0             0
ascon_[permutation vs. permutation]<1>_min                    +0.0017         +0.0020             7             7             7             7
ascon_[permutation vs. permutation]<1>_max                    +0.0026         +0.0025             7             7             7             7
ascon_[permutation vs. permutation]<8>_mean                   -0.0226         -0.0227            27            27            27            27
ascon_[permutation vs. permutation]<8>_median                 -0.0232         -0.0233            27            27            27            27
ascon_[permutation vs. permutation]<8>_stddev                 +3.1631         +3.1249             0             0             0             0
ascon_[permutation vs. permutation]<8>_cv                     +3.2596         +3.2209             0             0             0             0
ascon_[permutation vs. permutation]<8>_min                    -0.0239         -0.0238            27            27            27            27
ascon_[permutation vs. permutation]<8>_max                    -0.0196         -0.0197            27            27            27            27
ascon_[permutation vs. permutation]<12>_mean                  -0.0300         -0.0300            39            38            39            38
ascon_[permutation vs. permutation]<12>_median                -0.0299         -0.0298            39            38            39            38
ascon_[permutation vs. permutation]<12>_stddev                -0.2839         -0.4537             0             0             0             0
ascon_[permutation vs. permutation]<12>_cv                    -0.2618         -0.4368             0             0             0             0
ascon_[permutation vs. permutation]<12>_min                   -0.0299         -0.0299            39            38            39            38
ascon_[permutation vs. permutation]<12>_max                   -0.0302         -0.0305            39            38            39            38
```

Signed-off-by: Anjan Roy <[email protected]>
@itzmeanjan itzmeanjan merged commit 65a31fa into master Dec 6, 2024
24 checks passed
@itzmeanjan itzmeanjan deleted the conform-to-ascon-ipd branch December 6, 2024 07:39
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.

1 participant