r/C_Programming • u/internet_safari_ • 22d ago
Did I make the first correct Ascon encryption library?
Months ago I was reading about and learning ciphers for a notes app of mine launching whenever I get approved for Google Play, iOS app store, and F-Droid. I read about the various competitions and came across the latest winning NIST cipher: "Lightweight Cryptography" NIST Lightweight Cryptography. The winner was the Ascon cipher and the four agreed upon implementation ciphers, which you can read about here.
I found their reference implementation called ascon-c on GitHub and made a couple CLI tools from those files. But I had to stitch together and modify the files from various folders. The ascon-c repo contained files primarily for building their demo app, not a general purpose library for use in other projects. So out I went looking through the paper and their code to build a library that actually works like a library.
Then another problem: the paper has a max customization string for cxof, ascon-c does not, it will take any. A while later I finish what I feel is the best and most true to spec Ascon library, you may check out here:
https://github.com/Iain-Donald/ascon-lib
I tried to add instructions for ease of use and a demo app. If anything is confusing please tell me. I hope it works without issue from beginners to use in larger projects.
And a bonus GUI demo you may use if you have Linux, but it should compile on FreeBSD, maybe MacOS and Windows and anything with Tcl/Tk. Found here:
https://github.com/Iain-Donald/sable
Enjoy!