Skip to content

Commit

Permalink
updated README with NIST election and output writers
Browse files Browse the repository at this point in the history
  • Loading branch information
meichlseder committed Feb 24, 2023
1 parent 7e7fc19 commit 07f3e0e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Ascon
Ascon is a family of [authenticated encryption](https://en.wikipedia.org/wiki/Authenticated_encryption) (AEAD) and [hashing](https://en.wikipedia.org/wiki/Cryptographic_hash_function) algorithms designed to be lightweight and easy to implement, even with added countermeasures against side-channel attacks.
It was designed by a team of cryptographers from Graz University of Technology, Infineon Technologies, and Radboud University: Christoph Dobraunig, Maria Eichlseder, Florian Mendel, and Martin Schläffer.

Ascon has been selected as the primary choice for lightweight authenticated encryption in the final portfolio of the [CAESAR competition (2014–2019)](https://competitions.cr.yp.to/caesar-submissions.html) and is currently competing in the [NIST Lightweight Cryptography competition (2019–)](https://csrc.nist.gov/projects/lightweight-cryptography).
Ascon has been selected as the standard for lightweight cryptography in the [NIST Lightweight Cryptography competition (2019–2023)](https://csrc.nist.gov/projects/lightweight-cryptography) and as the primary choice for lightweight authenticated encryption in the final portfolio of the [CAESAR competition (2014–2019)](https://competitions.cr.yp.to/caesar-submissions.html).

Find more information, including the specification and more implementations here:

Expand Down Expand Up @@ -62,3 +62,9 @@ Files
- `LWC_AEAD_KAT_{klenbits}_{nlenbits}.txt` for authenticated encryption,
- `LWC_HASH_KAT_{hlenbits}.txt` for hashing.

Additionally, a JSON version of the same data is written to the corresponding `.json` files.


* `writer.py`:
Helper code for `genkat.py` that specifies the text and JSON encoding.

4 changes: 3 additions & 1 deletion genkat.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import sys
from writer import MultipleWriter


def kat_bytes(length):
return bytes(bytearray([i % 256 for i in range(length)]))

Expand All @@ -32,7 +33,7 @@ def kat_aead(variant):
for mlen in range(MAX_MESSAGE_LENGTH+1):
for adlen in range(MAX_ASSOCIATED_DATA_LENGTH+1):
w.open()
w.append("Count",count)
w.append("Count", count)
count += 1
w.append("Key", key, klen)
w.append("Nonce", nonce, nlen)
Expand All @@ -46,6 +47,7 @@ def kat_aead(variant):
assert msg2 == msg[:mlen]
w.close()


def kat_hash(variant="Ascon-Hash"):
MAX_MESSAGE_LENGTH = 1024
hlen = 32 # =CRYPTO_BYTES
Expand Down

0 comments on commit 07f3e0e

Please sign in to comment.