Skip to content

Commit

Permalink
v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMatjaz committed Feb 5, 2022
2 parents 78755f0 + d466954 commit ed3ef91
Show file tree
Hide file tree
Showing 37 changed files with 10,750 additions and 358 deletions.
15 changes: 15 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Check out files with Unix line endings
* text=auto eol=lf

# Force these files to be text
*.gitattributes text
.gitignore text
*.md text

# Force Windows scripts to use CRLF
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Preserve line endings as-they-are
*.patch -text
42 changes: 41 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,46 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

*******************************************************************************

[1.2.0] - 2022-02-05
----------------------------------------

New, lighter hashing functions: Ascon-Hasha and Ascon-XOFa, as per Ascon's NIST
submission update (2021). Pre-initialised hashes.

### Added

- Ascon-Hasha functions:
- Offline processing:
- `ascon_hasha()`
- `ascon_hasha_matches()`
- Online processing:
- `ascon_hasha_init()`
- `ascon_hasha_update()`
- `ascon_hasha_final()`
- `ascon_hasha_final_matches()`

- Ascon-XOFa functions:
- Offline processing:
- `ascon_hasha_xof()`
- `ascon_hasha_xof_matches()`
- Online processing:
- `ascon_hasha_xof_init()`
- `ascon_hasha_xof_update()`
- `ascon_hasha_xof_final()`
- `ascon_hasha_xof_final_matches()`

### Fixed

- Faster initialisation phase of all hashing functions states: using
precomputed sponges for each hashing function instead of applying its
initialisation vector and permuting it with 12 rounds. Given that this
operation is deterministic, we can trade code size space (the precomputed
sponges) for computation time (no permutation needed).
- Add struct names to anonymous structs that were only typedef-ed in the
library header. Helps when debugging, so the debugger can show the struct
name.
- Minor internal simplifications of the benchmark and test suite.

[1.1.2] - 2022-02-04
----------------------------------------

Expand Down Expand Up @@ -289,7 +329,7 @@ Added Ascon80pq cipher, example in Readme.

- `ascon_aead128a_*` functions, working exactly as the `aead128` versions.
Internally they absorb the data with a double rate.
- Example encryption and decrpytion code into Readme.
- Example encryption and decryption code into Readme.

### Removed

Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

cmake_minimum_required(VERSION 3.9)
project(LibAscon
VERSION 1.1.2
VERSION 1.2.0
LANGUAGES C
DESCRIPTION
"Lightweight Authenticated Encryption & Hashing, \
Expand Down Expand Up @@ -73,7 +73,9 @@ set(TEST_FRAMEWORK
tst/vectors.c)
set(TEST_SRC_FILES
tst/test_xof.c
tst/test_xofa.c
tst/test_hash.c
tst/test_hasha.c
tst/test_aead128_enc.c
tst/test_aead128_dec.c
tst/test_aead128_inplace.c
Expand Down
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ LibAscon provides:
- Ascon128a v1.2 (128 bit key, 128 bit rate)
- Ascon80pq v1.2 (160 bit key, 64 bit rate)

- 2 hashing functions
- Ascon-Hash v1.2 (fixed-length output)
- Ascon-XOF v1.2 (variable-length output)
- 4 hashing functions
- Ascon-Hash v1.2 (fixed-length output, 12-rounds absorption/squeeze)
- Ascon-XOF v1.2 (variable-length output, 12-rounds absorption/squeeze)
- Ascon-Hasha v1.2 (fixed-length output, 8-rounds absorption/squeeze)
- Ascon-XOFa v1.2 (variable-length output, 8-rounds absorption/squeeze)

- **Online processing** (**Init-Update-Final** paradigm) for hashing and
encryption/decryption. This means that the data can be processed one chunk at
Expand All @@ -56,15 +58,19 @@ LibAscon provides:
- AEAD tag may be provided to a **separate location**, i.e. not concatenated to
the ciphertext.

- Same performance as the original C implementation in _Release_ mode, about 2x
slower in _MinSizeRel_ mode.
- Same performance as the original reference (unoptimised) C implementation in
_Release_ mode, about 2x slower in _MinSizeRel_ mode.

- Hashing functions that can also automatically validate the digest
against a known one when the hashing process is completed.

- A **[heavily documented](https://thematjaz.github.io/LibAscon/)
developer-friendly API**, making it easier to compile and add to your
project, both through static and dynamic inclusion.

- Tested with **100% line coverage**, with CI running on Linux, macOS and
Windows with GCC, Clang and CL (MSVC).
- Tested with **100% line and branch\* coverage**, with CI running on Linux,
macOS and Windows with GCC, Clang and CL (MSVC) (\*: branch coverage excludes
the debugging-asserts).

Usage example
----------------------------------------
Expand Down
Loading

0 comments on commit ed3ef91

Please sign in to comment.