1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
** Name: hash.c
** Purpose: API definition for Hash algorithm with Ascon
** Based on: Public domain Ascon reference implementation
** and optimized variants for 32- and 64-bit
** (see https://github.com/ascon/ascon-c)
** Remarks: API functions adapted for use in SQLite3 Multiple Ciphers
** Modified by: Ulrich Telle
** Copyright: (c) 2023-2023 Ulrich Telle
** License: MIT
*/
/*
** Encryption using ASCON-AEAD.
**
** \param ctext Output buffer for encrypted text (same length as plain text)
** \param tag Output buffer for tag with fixed length of ASCON_AEAD_TAG_LEN
** \param mtext Input buffer with plain message text
** \param mlen Length of message text
** \param ad Input buffer with associated data
** \param adlen Length of associated data
** \param nonce Buffer with nonce data
** \param k Buffer with key data
*/
int ;
/*
** Encryption using ASCON-AEAD.
**
** \param mtext Output buffer with decrypted plain message text (same length as encrypted text)
** \param ctext Input buffer for encrypted text
** \param clen Length of encrypted text
** \param ad Input buffer with associated data
** \param adlen Length of associated data
** \param tag Input buffer for expected tag with fixed length of ASCON_AEAD_TAG_LEN
** \param nonce Buffer with nonce data
** \param k Buffer with key data
*/
int ;