Skip to content

What is crypto_*_ABYTES? #1072

Answered by jedisct1
etkaar asked this question in Q&A
Jun 3, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hi,

The documentation seems to explain it:

unsigned char ciphertext[MESSAGE_LEN + crypto_aead_xchacha20poly1305_ietf_ABYTES];

At most mlen + crypto_aead_xchacha20poly1305_ietf_ABYTES bytes are put into c.
...
At most clen - crypto_aead_xchacha20poly1305_ietf_ABYTES bytes will be put into m.
...
It also computes a tag that authenticates the ciphertext as well as optional, additional data ad of length adlen. This tag is put into mac, and its length is crypto_aead_xchacha20poly1305_ietf_ABYTES bytes.

So, this is the different in size between the message and the ciphertext.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rzabarazesh
Comment options

@jedisct1
Comment options

Answer selected by jedisct1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1071 on June 03, 2021 17:36.