Home
last modified time | relevance | path

Searched refs:aadlen (Results 1 – 4 of 4) sorted by relevance

/external/openssh/
Dcipher-chachapoly.c52 const u_char *src, u_int len, u_int aadlen, u_int authlen, int do_encrypt) in chachapoly_crypt() argument
71 const u_char *tag = src + aadlen + len; in chachapoly_crypt()
73 poly1305_auth(expected_tag, src, aadlen + len, poly_key); in chachapoly_crypt()
81 if (aadlen) { in chachapoly_crypt()
83 chacha_encrypt_bytes(&ctx->header_ctx, src, dest, aadlen); in chachapoly_crypt()
88 chacha_encrypt_bytes(&ctx->main_ctx, src + aadlen, in chachapoly_crypt()
89 dest + aadlen, len); in chachapoly_crypt()
93 poly1305_auth(dest + aadlen + len, dest, aadlen + len, in chachapoly_crypt()
Dcipher.c392 const u_char *src, u_int len, u_int aadlen, u_int authlen) in cipher_crypt() argument
396 len, aadlen, authlen, cc->encrypt); in cipher_crypt()
400 if (aadlen) in cipher_crypt()
401 memcpy(dest, src, aadlen); in cipher_crypt()
402 aesctr_encrypt_bytes(&cc->ac_ctx, src + aadlen, in cipher_crypt()
403 dest + aadlen, len); in cipher_crypt()
407 memcpy(dest, src, aadlen + len); in cipher_crypt()
424 authlen, (u_char *)src + aadlen + len)) in cipher_crypt()
427 if (aadlen) { in cipher_crypt()
429 EVP_Cipher(&cc->evp, NULL, (u_char *)src, aadlen) < 0) in cipher_crypt()
[all …]
Dcipher-chachapoly.h35 u_char *dest, const u_char *src, u_int len, u_int aadlen, u_int authlen,
Dpacket.c1059 u_int authlen = 0, aadlen = 0; in ssh_packet_send2_wrapped() local
1075 aadlen = (mac && mac->enabled && mac->etm) || authlen ? 4 : 0; in ssh_packet_send2_wrapped()
1110 len -= aadlen; /* packet length is not encrypted for EtM modes */ in ssh_packet_send2_wrapped()
1145 len, padlen, aadlen)); in ssh_packet_send2_wrapped()
1161 len - aadlen, aadlen, authlen)) != 0) in ssh_packet_send2_wrapped()
1540 u_int maclen, aadlen = 0, authlen = 0, block_size; in ssh_packet_read_poll2() local
1561 aadlen = (mac && mac->enabled && mac->etm) || authlen ? 4 : 0; in ssh_packet_read_poll2()
1563 if (aadlen && state->packlen == 0) { in ssh_packet_read_poll2()
1611 if (aadlen) { in ssh_packet_read_poll2()
1622 " aadlen %d", block_size, need, maclen, authlen, aadlen)); in ssh_packet_read_poll2()
[all …]