Home
last modified time | relevance | path

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

/freebsd/crypto/openssh/
H A Dcipher-chachapoly.c70 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 Dcipher-chachapoly-libcrypto.c86 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 Dcipher.c350 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()
385 memcpy(dest, src, aadlen); in cipher_crypt()
389 if (EVP_Cipher(cc->evp, dest + aadlen, (u_char *)src + aadlen, in cipher_crypt()
[all …]
H A Dpacket.c1078 u_int authlen = 0, aadlen = 0; in ssh_packet_send2_wrapped() local
1094 aadlen = (mac && mac->enabled && mac->etm) || authlen ? 4 : 0; in ssh_packet_send2_wrapped()
1175 len, padlen, aadlen)); in ssh_packet_send2_wrapped()
1191 len - aadlen, aadlen, authlen)) != 0) in ssh_packet_send2_wrapped()
1473 u_int maclen, aadlen = 0, authlen = 0, block_size; in ssh_packet_read_poll2() local
1497 aadlen = (mac && mac->enabled && mac->etm) || authlen ? 4 : 0; in ssh_packet_read_poll2()
1499 if (aadlen && state->packlen == 0) { in ssh_packet_read_poll2()
1548 if (aadlen) { in ssh_packet_read_poll2()
1583 sshbuf_ptr(state->input), aadlen + need, in ssh_packet_read_poll2()
1584 sshbuf_ptr(state->input) + aadlen + need + authlen, in ssh_packet_read_poll2()
[all …]
H A Dsshkey-xmss.c897 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 Dcipher-chachapoly.h34 u_char *dest, const u_char *src, u_int len, u_int aadlen, u_int authlen,
/freebsd/crypto/openssl/util/
H A Dcavs-to-evptest.pl23 my $aadlen = 0;
49 $aadlen = $2;
87 $aadlen = $2;
95 if ($aadlen > 0) {
/freebsd/sys/opencrypto/
H A Dcryptodev.c123 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 Dcryptodev.h278 u_int aadlen; member
/freebsd/crypto/openssl/providers/implementations/include/prov/
H A Dciphercommon_ccm.h56 const unsigned char *aad, size_t aadlen));
H A Dciphercommon_gcm.h86 const unsigned char *aad, size_t aadlen));
/freebsd/tests/sys/opencrypto/
H A Dcryptodev.py267 caead.aadlen = len(aad)
/freebsd/tools/tools/crypto/
H A Dcryptocheck.c920 caead.aadlen = aad_len; in ocf_eta()
1552 caead.aadlen = aad_len; in ocf_aead()