/freebsd/crypto/openssh/ |
H A D | cipher-chachapoly.c | 70 const u_char *src, u_int len, u_int aadlen, u_int authlen, int do_encrypt) in chachapoly_crypt() argument 89 const u_char *tag = src + aadlen + len; in chachapoly_crypt() 91 poly1305_auth(expected_tag, src, aadlen + len, poly_key); in chachapoly_crypt() 99 if (aadlen) { in chachapoly_crypt() 101 chacha_encrypt_bytes(&ctx->header_ctx, src, dest, aadlen); in chachapoly_crypt() 106 chacha_encrypt_bytes(&ctx->main_ctx, src + aadlen, in chachapoly_crypt() 107 dest + aadlen, len); in chachapoly_crypt() 111 poly1305_auth(dest + aadlen + len, dest, aadlen + len, in chachapoly_crypt()
|
H A D | cipher-chachapoly-libcrypto.c | 86 const u_char *src, u_int len, u_int aadlen, u_int authlen, int do_encrypt) in chachapoly_crypt() argument 108 const u_char *tag = src + aadlen + len; in chachapoly_crypt() 110 poly1305_auth(expected_tag, src, aadlen + len, poly_key); in chachapoly_crypt() 118 if (aadlen) { in chachapoly_crypt() 120 EVP_Cipher(ctx->header_evp, dest, src, aadlen) < 0) { in chachapoly_crypt() 129 EVP_Cipher(ctx->main_evp, dest + aadlen, src + aadlen, len) < 0) { in chachapoly_crypt() 136 poly1305_auth(dest + aadlen + len, dest, aadlen + len, in chachapoly_crypt()
|
H A D | cipher.c | 346 const u_char *src, u_int len, u_int aadlen, u_int authlen) in cipher_crypt() argument 350 len, aadlen, authlen, cc->encrypt); in cipher_crypt() 353 memcpy(dest, src, aadlen + len); in cipher_crypt() 358 if (aadlen) in cipher_crypt() 359 memcpy(dest, src, aadlen); in cipher_crypt() 360 aesctr_encrypt_bytes(&cc->ac_ctx, src + aadlen, in cipher_crypt() 361 dest + aadlen, len); in cipher_crypt() 378 authlen, (u_char *)src + aadlen + len)) in cipher_crypt() 381 if (aadlen) { in cipher_crypt() 383 EVP_Cipher(cc->evp, NULL, (u_char *)src, aadlen) < 0) in cipher_crypt() [all …]
|
H A D | packet.c | 1169 u_int authlen = 0, aadlen = 0; in ssh_packet_send2_wrapped() local 1185 aadlen = (mac && mac->enabled && mac->etm) || authlen ? 4 : 0; in ssh_packet_send2_wrapped() 1221 len -= aadlen; /* packet length is not encrypted for EtM modes */ in ssh_packet_send2_wrapped() 1266 len, padlen, aadlen)); in ssh_packet_send2_wrapped() 1282 len - aadlen, aadlen, authlen)) != 0) in ssh_packet_send2_wrapped() 1564 u_int maclen, aadlen = 0, authlen = 0, block_size; in ssh_packet_read_poll2() local 1588 aadlen = (mac && mac->enabled && mac->etm) || authlen ? 4 : 0; in ssh_packet_read_poll2() 1590 if (aadlen && state->packlen == 0) { in ssh_packet_read_poll2() 1639 if (aadlen) { in ssh_packet_read_poll2() 1650 " aadlen %d", block_size, need, maclen, authlen, aadlen)); in ssh_packet_read_poll2() [all …]
|
H A D | sshkey-xmss.c | 897 size_t i, keylen, ivlen, blocksize, authlen, encrypted_len, aadlen; in sshkey_xmss_encrypt_state() local 948 aadlen = sshbuf_len(encoded); in sshkey_xmss_encrypt_state() 957 encrypted_len + aadlen + authlen, &cp)) != 0 || in sshkey_xmss_encrypt_state() 961 encrypted_len, aadlen, authlen)) != 0) in sshkey_xmss_encrypt_state() 988 size_t keylen, ivlen, authlen, aadlen; in sshkey_xmss_decrypt_state() local 1043 aadlen = sshbuf_len(copy) - sshbuf_len(encoded); in sshkey_xmss_decrypt_state() 1050 if ((r = sshbuf_reserve(decrypted, aadlen + encrypted_len, &dp)) != 0 || in sshkey_xmss_decrypt_state() 1054 encrypted_len, aadlen, authlen)) != 0) in sshkey_xmss_decrypt_state() 1066 if ((r = sshbuf_consume(decrypted, aadlen)) != 0) in sshkey_xmss_decrypt_state()
|
H A D | cipher-chachapoly.h | 34 u_char *dest, const u_char *src, u_int len, u_int aadlen, u_int authlen,
|
/freebsd/crypto/openssl/util/ |
H A D | cavs-to-evptest.pl | 23 my $aadlen = 0; 49 $aadlen = $2; 87 $aadlen = $2; 95 if ($aadlen > 0) {
|
/freebsd/sys/opencrypto/ |
H A D | cryptodev.c | 123 u_int aadlen; member 219 CP(*from, *to, aadlen); in crypt_aead_from_32() 236 CP(*from, *to, aadlen); in crypt_aead_to_32() 872 if (caead->len > 256*1024-4 || caead->aadlen > 256*1024-4) { in cryptodev_aead() 899 cod = cod_alloc(cse, caead->aadlen, caead->len + cse->hashsize); in cryptodev_aead() 905 error = copyin(caead->aad, cod->aad, caead->aadlen); in cryptodev_aead() 907 error = copyin(caead->aad, cod->buf, caead->aadlen); in cryptodev_aead() 914 crp->crp_aad_length = caead->aadlen; in cryptodev_aead() 919 crp->crp_payload_start = caead->aadlen; in cryptodev_aead()
|
H A D | cryptodev.h | 278 u_int aadlen; member
|
/freebsd/crypto/openssl/providers/implementations/include/prov/ |
H A D | ciphercommon_ccm.h | 56 const unsigned char *aad, size_t aadlen));
|
H A D | ciphercommon_gcm.h | 86 const unsigned char *aad, size_t aadlen));
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/ |
H A D | crypto_test.c | 603 uint8_t *aad, size_t aadlen, in init_mech() argument 616 p->ulAADLen = aadlen; in init_mech() 627 p->ulAuthDataSize = aadlen; in init_mech()
|
/freebsd/tests/sys/opencrypto/ |
H A D | cryptodev.py | 267 caead.aadlen = len(aad)
|
/freebsd/tools/tools/crypto/ |
H A D | cryptocheck.c | 920 caead.aadlen = aad_len; in ocf_eta() 1552 caead.aadlen = aad_len; in ocf_aead()
|