Mailing List Archive

aadlen in chacha20
In the crypt function is there ever a situation in which the aadlen
would not be 4?

Just curious. I threw in an assert(aadlen == 4); just before that
conditional and haven't broken anything yet. Just not sure if I'm
missing a case where it might be 0.

Chris
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: aadlen in chacha20 [ In reply to ]
rapier wrote:
> In the crypt function is there ever a situation in which the aadlen
> would not be 4?

A lazy grep says yes:

$ git grep 'aadlen ='
packet.c: u_int authlen = 0, aadlen = 0;
packet.c: aadlen = (mac && mac->enabled && mac->etm) || authlen ? 4 : 0;
packet.c: u_int maclen, aadlen = 0, authlen = 0, block_size;
packet.c: aadlen = (mac && mac->enabled && mac->etm) || authlen ? 4 : 0;
sshkey-xmss.c: aadlen = sshbuf_len(encoded);
sshkey-xmss.c: aadlen = sshbuf_len(copy) - sshbuf_len(encoded);
$


//Peter
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev