Lines Matching refs:dn
157 int sn, dn; /* offset from the head of the mbuf, to meat */ in esp_cbc_decrypt_aes() local
202 soff = sn = dn = 0; in esp_cbc_decrypt_aes()
239 if (!d || dn + AES_BLOCKLEN > d->m_len) { in esp_cbc_decrypt_aes()
280 dn = 0; in esp_cbc_decrypt_aes()
284 if (len > d->m_len - dn) { in esp_cbc_decrypt_aes()
285 len = d->m_len - dn; in esp_cbc_decrypt_aes()
319 aes_decrypt_cbc(sp, iv, len >> 4, dptr + dn, in esp_cbc_decrypt_aes()
329 dn += len; in esp_cbc_decrypt_aes()
372 int sn, dn; /* offset from the head of the mbuf, to meat */ in esp_cbc_encrypt_aes() local
418 soff = sn = dn = 0; in esp_cbc_encrypt_aes()
455 if (!d || dn + AES_BLOCKLEN > d->m_len) { in esp_cbc_encrypt_aes()
496 dn = 0; in esp_cbc_encrypt_aes()
500 if (len > d->m_len - dn) { in esp_cbc_encrypt_aes()
501 len = d->m_len - dn; in esp_cbc_encrypt_aes()
543 aes_encrypt_cbc(sp, ivp, len >> 4, dptr + dn, in esp_cbc_encrypt_aes()
556 dn += len; in esp_cbc_encrypt_aes()
559 ivp = dptr + dn - AES_BLOCKLEN; // last block encrypted in esp_cbc_encrypt_aes()
686 int sn, dn; /* offset from the head of the mbuf, to meat */ in esp_gcm_encrypt_aes() local
773 soff = sn = dn = 0; in esp_gcm_encrypt_aes()
801 if (!d || (dn + len > d->m_len)) { in esp_gcm_encrypt_aes()
843 dn = 0; in esp_gcm_encrypt_aes()
847 if (len > d->m_len - dn) { in esp_gcm_encrypt_aes()
848 len = d->m_len - dn; in esp_gcm_encrypt_aes()
882 if (aes_encrypt_gcm(sp, len, dptr + dn, ctx->encrypt)) { in esp_gcm_encrypt_aes()
895 dn += len; in esp_gcm_encrypt_aes()
930 int sn, dn; /* offset from the head of the mbuf, to meat */ in esp_gcm_decrypt_aes() local
997 soff = sn = dn = 0; in esp_gcm_decrypt_aes()
1025 if (!d || (dn + len > d->m_len)) { in esp_gcm_decrypt_aes()
1067 dn = 0; in esp_gcm_decrypt_aes()
1071 if (len > d->m_len - dn) { in esp_gcm_decrypt_aes()
1072 len = d->m_len - dn; in esp_gcm_decrypt_aes()
1107 if (aes_decrypt_gcm(sp, len, dptr + dn, ctx->decrypt)) { in esp_gcm_decrypt_aes()
1120 dn += len; in esp_gcm_decrypt_aes()