| /freebsd-11-stable/crypto/openssh/ |
| HD | cipher-chachapoly.c | 53 const u_char *src, u_int len, u_int aadlen, u_int authlen, int do_encrypt) in chachapoly_crypt() argument 72 const u_char *tag = src + aadlen + len; in chachapoly_crypt() 74 poly1305_auth(expected_tag, src, aadlen + len, poly_key); in chachapoly_crypt() 82 if (aadlen) { in chachapoly_crypt() 84 chacha_encrypt_bytes(&ctx->header_ctx, src, dest, aadlen); in chachapoly_crypt() 89 chacha_encrypt_bytes(&ctx->main_ctx, src + aadlen, in chachapoly_crypt() 90 dest + aadlen, len); in chachapoly_crypt() 94 poly1305_auth(dest + aadlen + len, dest, aadlen + len, in chachapoly_crypt()
|
| HD | cipher.c | 445 const u_char *src, u_int len, u_int aadlen, u_int authlen) in cipher_crypt() argument 449 len, aadlen, authlen, cc->encrypt); in cipher_crypt() 453 if (aadlen) in cipher_crypt() 454 memcpy(dest, src, aadlen); in cipher_crypt() 455 aesctr_encrypt_bytes(&cc->ac_ctx, src + aadlen, in cipher_crypt() 456 dest + aadlen, len); in cipher_crypt() 460 memcpy(dest, src, aadlen + len); in cipher_crypt() 477 authlen, (u_char *)src + aadlen + len)) in cipher_crypt() 480 if (aadlen) { in cipher_crypt() 482 EVP_Cipher(cc->evp, NULL, (u_char *)src, aadlen) < 0) in cipher_crypt() [all …]
|
| HD | packet.c | 1151 u_int authlen = 0, aadlen = 0; in ssh_packet_send2_wrapped() local 1167 aadlen = (mac && mac->enabled && mac->etm) || authlen ? 4 : 0; in ssh_packet_send2_wrapped() 1203 len -= aadlen; /* packet length is not encrypted for EtM modes */ in ssh_packet_send2_wrapped() 1248 len, padlen, aadlen)); in ssh_packet_send2_wrapped() 1264 len - aadlen, aadlen, authlen)) != 0) in ssh_packet_send2_wrapped() 1720 u_int maclen, aadlen = 0, authlen = 0, block_size; in ssh_packet_read_poll2() local 1744 aadlen = (mac && mac->enabled && mac->etm) || authlen ? 4 : 0; in ssh_packet_read_poll2() 1746 if (aadlen && state->packlen == 0) { in ssh_packet_read_poll2() 1795 if (aadlen) { in ssh_packet_read_poll2() 1806 " aadlen %d", block_size, need, maclen, authlen, aadlen)); in ssh_packet_read_poll2() [all …]
|
| HD | cipher-chachapoly.h | 35 u_char *dest, const u_char *src, u_int len, u_int aadlen, u_int authlen,
|
| /freebsd-11-stable/sys/opencrypto/ |
| HD | cryptodev.c | 981 if (caead->len > 256*1024-4 || caead->aadlen > 256*1024-4) { in cryptodev_aead() 992 cod = cod_alloc(cse, caead->aadlen + caead->len + cse->thash->hashsize, in cryptodev_aead() 1011 caead->aadlen))) { in cryptodev_aead() 1017 caead->aadlen, caead->len))) { in cryptodev_aead() 1029 crda->crd_len = caead->aadlen; in cryptodev_aead() 1031 crda->crd_len = caead->aadlen + caead->len; in cryptodev_aead() 1032 crda->crd_inject = caead->aadlen + caead->len; in cryptodev_aead() 1042 crde->crd_skip = caead->aadlen; in cryptodev_aead() 1044 crde->crd_inject = caead->aadlen; in cryptodev_aead() 1050 crp->crp_ilen = caead->aadlen + caead->len; in cryptodev_aead() [all …]
|
| HD | cryptosoft.c | 473 int aadlen, blksz, i, ivlen, len, iskip, oskip, r; in swcr_authenc() local 547 aadlen = crda->crd_len; in swcr_authenc() 586 *blkp = htobe32(aadlen * 8); in swcr_authenc()
|
| HD | cryptodev.h | 256 u_int aadlen; member
|
| /freebsd-11-stable/tools/tools/crypto/ |
| HD | cryptocheck.c | 629 caead.aadlen = aad_len; in ocf_authenc() 864 caead.aadlen = aad_len; in ocf_gcm()
|
| /freebsd-11-stable/tests/sys/opencrypto/ |
| HD | cryptodev.py | 233 caead.aadlen = len(aad)
|