My Project
|
Go to the source code of this file.
Functions | |
int | wc_AsconHash256_Init (wc_AsconHash256 *a) |
This function initializes the ASCON context for hashing. More... | |
int | wc_AsconHash256_Update (wc_AsconHash256 *a, const byte *data, word32 dataSz) |
This function updates the ASCON hash with the input data. More... | |
int | wc_AsconHash256_Final (wc_AsconHash256 *a, byte *hash) |
This function finalizes the ASCON hash and produces the output. More... | |
wc_AsconAEAD128 * | wc_AsconAEAD128_New (void) |
This function allocates and initializes a new Ascon AEAD context. More... | |
void | wc_AsconAEAD128_Free (wc_AsconAEAD128 *a) |
This function frees the resources associated with the Ascon AEAD context. More... | |
int | wc_AsconAEAD128_Init (wc_AsconAEAD128 *a) |
This function initializes an Ascon AEAD context. More... | |
void | wc_AsconAEAD128_Clear (wc_AsconAEAD128 *a) |
This function deinitializes an Ascon AEAD context. It does not free the context. More... | |
int | wc_AsconAEAD128_SetKey (wc_AsconAEAD128 *a, const byte *key) |
This function sets the key for the Ascon AEAD context. More... | |
int | wc_AsconAEAD128_SetNonce (wc_AsconAEAD128 *a, const byte *nonce) |
This function sets the nonce for the Ascon AEAD context. More... | |
int | wc_AsconAEAD128_SetAD (wc_AsconAEAD128 *a, const byte *ad, word32 adSz) |
This function sets the associated data for the Ascon AEAD context. More... | |
int | wc_AsconAEAD128_EncryptUpdate (wc_AsconAEAD128 *a, byte *out, const byte *in, word32 inSz) |
This function encrypts a plaintext message using Ascon AEAD. The output is stored in the out buffer. The length of the output is equal to the length of the input. More... | |
int | wc_AsconAEAD128_EncryptFinal (wc_AsconAEAD128 *a, byte *tag) |
This function finalizes the encryption process using Ascon AEAD and produces the authentication tag. More... | |
int | wc_AsconAEAD128_DecryptUpdate (wc_AsconAEAD128 *a, byte *out, const byte *in, word32 inSz) |
This function updates the decryption process using Ascon AEAD. The output is stored in the out buffer. The length of the output is equal to the length of the input. More... | |
int | wc_AsconAEAD128_DecryptFinal (wc_AsconAEAD128 *a, const byte *tag) |
This function finalizes the decryption process using Ascon AEAD and verifies the authentication tag. More... | |
void wc_AsconAEAD128_Clear | ( | wc_AsconAEAD128 * | a | ) |
This function deinitializes an Ascon AEAD context. It does not free the context.
a | pointer to the Ascon AEAD context to deinitialize. |
Example
int wc_AsconAEAD128_DecryptFinal | ( | wc_AsconAEAD128 * | a, |
const byte * | tag | ||
) |
This function finalizes the decryption process using Ascon AEAD and verifies the authentication tag.
a | pointer to the initialized Ascon AEAD context. |
tag | pointer to the buffer containing the authentication tag to verify |
Example
int wc_AsconAEAD128_DecryptUpdate | ( | wc_AsconAEAD128 * | a, |
byte * | out, | ||
const byte * | in, | ||
word32 | inSz | ||
) |
This function updates the decryption process using Ascon AEAD. The output is stored in the out buffer. The length of the output is equal to the length of the input.
a | pointer to the initialized Ascon AEAD context. |
out | pointer to the output buffer to store the plaintext. |
in | pointer to the input buffer containing the ciphertext message. |
inSz | length of the input buffer. |
Example
int wc_AsconAEAD128_EncryptFinal | ( | wc_AsconAEAD128 * | a, |
byte * | tag | ||
) |
This function finalizes the encryption process using Ascon AEAD and produces the authentication tag.
a | pointer to the initialized Ascon AEAD context. |
tag | pointer to the output buffer to store the authentication tag. |
Example
int wc_AsconAEAD128_EncryptUpdate | ( | wc_AsconAEAD128 * | a, |
byte * | out, | ||
const byte * | in, | ||
word32 | inSz | ||
) |
This function encrypts a plaintext message using Ascon AEAD. The output is stored in the out buffer. The length of the output is equal to the length of the input.
a | pointer to the initialized Ascon AEAD context. |
out | pointer to the output buffer to store the ciphertext. |
in | pointer to the input buffer containing the plaintext message. |
inSz | length of the input buffer. |
Example
void wc_AsconAEAD128_Free | ( | wc_AsconAEAD128 * | a | ) |
This function frees the resources associated with the Ascon AEAD context.
a | pointer to the Ascon AEAD context to free. |
Example
int wc_AsconAEAD128_Init | ( | wc_AsconAEAD128 * | a | ) |
This function initializes an Ascon AEAD context.
a | pointer to the Ascon AEAD context to initialize. |
Example
wc_AsconAEAD128* wc_AsconAEAD128_New | ( | void | ) |
This function allocates and initializes a new Ascon AEAD context.
Example
int wc_AsconAEAD128_SetAD | ( | wc_AsconAEAD128 * | a, |
const byte * | ad, | ||
word32 | adSz | ||
) |
This function sets the associated data for the Ascon AEAD context.
a | pointer to the initialized Ascon AEAD context. |
ad | pointer to the associated data buffer. |
adSz | size of the associated data buffer. |
Example
int wc_AsconAEAD128_SetKey | ( | wc_AsconAEAD128 * | a, |
const byte * | key | ||
) |
This function sets the key for the Ascon AEAD context.
a | pointer to the initialized Ascon AEAD context. |
key | pointer to the key buffer of length ASCON_AEAD128_KEY_SZ. |
Example
int wc_AsconAEAD128_SetNonce | ( | wc_AsconAEAD128 * | a, |
const byte * | nonce | ||
) |
This function sets the nonce for the Ascon AEAD context.
a | pointer to the initialized Ascon AEAD context. |
nonce | pointer to the nonce buffer of length ASCON_AEAD128_NONCE_SZ. |
Example
int wc_AsconHash256_Final | ( | wc_AsconHash256 * | a, |
byte * | hash | ||
) |
This function finalizes the ASCON hash and produces the output.
ctx | pointer to the ASCON context. |
out | pointer to the output buffer. |
outSz | size of the output buffer, should be at least ASCON_HASH256_SZ. |
Example
int wc_AsconHash256_Init | ( | wc_AsconHash256 * | a | ) |
This function initializes the ASCON context for hashing.
a | pointer to the ASCON context to initialize. |
Example
int wc_AsconHash256_Update | ( | wc_AsconHash256 * | a, |
const byte * | data, | ||
word32 | dataSz | ||
) |
This function updates the ASCON hash with the input data.
ctx | pointer to the ASCON context. |
in | pointer to the input data. |
inSz | size of the input data. |
Example