]> git.codecow.com Git - Monocypher.git/commit
Normalise AEAD direct interface
authorLoup Vaillant <loup@loup-vaillant.fr>
Thu, 12 Jan 2023 18:14:04 +0000 (19:14 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Thu, 12 Jan 2023 18:14:04 +0000 (19:14 +0100)
commitf7f3fc4934d845f5fea8a5058fa4727313f9f902
tree84028ffa17ad43ee75e89da60e921079f422a1a1
parentf62476fd9dda2371c2a5c888690b275634b49c9f
Normalise AEAD direct interface

The AEAD interface had three problems:

- Inconsistent prefix (now fixed, to "crypto_aead").
- Inconsistent ordering of arguments (now the mac is after the output
  text).
- Redundant API without the additional data (now removed).

The result is less than satisfactory to be honest.  If it were just me I
would delete the direct interface entirely, because the streaming one is
almost easier to use...

...save one crucial detail: the choice of the exact algorithm.  The
streaming interfaces offers three init options, each with its pros and
cons.  Users need a default, and it shall be XChacha20.  Those who know
what they are doing can easily use the streaming API anyway.
src/monocypher.c
src/monocypher.h
tests/speed/speed.c
tests/test.c
tests/tis-ci.c