Lines Matching defs:cctx

416     EVP_AES_CCM_CTX *cctx = ctx->cipher_data;
420 aesni_set_encrypt_key(key, ctx->key_len * 8, &cctx->ks.ks);
421 CRYPTO_ccm128_init(&cctx->ccm, cctx->M, cctx->L,
422 &cctx->ks, (block128_f) aesni_encrypt);
423 cctx->str = enc ? (ccm128_f) aesni_ccm64_encrypt_blocks :
425 cctx->key_set = 1;
428 memcpy(ctx->iv, iv, 15 - cctx->L);
429 cctx->iv_set = 1;
766 EVP_AES_CCM_CTX *cctx = ctx->cipher_data;
771 aes_t4_set_encrypt_key(key, bits, &cctx->ks.ks);
772 CRYPTO_ccm128_init(&cctx->ccm, cctx->M, cctx->L,
773 &cctx->ks, (block128_f) aes_t4_encrypt);
777 cctx->str = enc ? (ccm128_f) aes128_t4_ccm64_encrypt :
781 cctx->str = enc ? (ccm128_f) aes192_t4_ccm64_encrypt :
785 cctx->str = enc ? (ccm128_f) aes256_t4_ccm64_encrypt :
792 cctx->str = NULL;
794 cctx->key_set = 1;
797 memcpy(ctx->iv, iv, 15 - cctx->L);
798 cctx->iv_set = 1;
1753 EVP_AES_CCM_CTX *cctx = c->cipher_data;
1756 cctx->key_set = 0;
1757 cctx->iv_set = 0;
1758 cctx->L = 8;
1759 cctx->M = 12;
1760 cctx->tag_set = 0;
1761 cctx->len_set = 0;
1769 cctx->L = arg;
1778 cctx->tag_set = 1;
1781 cctx->M = arg;
1785 if (!c->encrypt || !cctx->tag_set)
1787 if (!CRYPTO_ccm128_tag(&cctx->ccm, ptr, (size_t)arg))
1789 cctx->tag_set = 0;
1790 cctx->iv_set = 0;
1791 cctx->len_set = 0;
1798 if (cctx->ccm.key) {
1799 if (cctx->ccm.key != &cctx->ks)
1815 EVP_AES_CCM_CTX *cctx = ctx->cipher_data;
1822 HWAES_set_encrypt_key(key, ctx->key_len * 8, &cctx->ks.ks);
1824 CRYPTO_ccm128_init(&cctx->ccm, cctx->M, cctx->L,
1825 &cctx->ks, (block128_f) HWAES_encrypt);
1826 cctx->str = NULL;
1827 cctx->key_set = 1;
1833 vpaes_set_encrypt_key(key, ctx->key_len * 8, &cctx->ks.ks);
1834 CRYPTO_ccm128_init(&cctx->ccm, cctx->M, cctx->L,
1835 &cctx->ks, (block128_f) vpaes_encrypt);
1836 cctx->str = NULL;
1837 cctx->key_set = 1;
1841 AES_set_encrypt_key(key, ctx->key_len * 8, &cctx->ks.ks);
1842 CRYPTO_ccm128_init(&cctx->ccm, cctx->M, cctx->L,
1843 &cctx->ks, (block128_f) AES_encrypt);
1844 cctx->str = NULL;
1845 cctx->key_set = 1;
1848 memcpy(ctx->iv, iv, 15 - cctx->L);
1849 cctx->iv_set = 1;
1857 EVP_AES_CCM_CTX *cctx = ctx->cipher_data;
1858 CCM128_CONTEXT *ccm = &cctx->ccm;
1860 if (!cctx->iv_set && !cctx->key_set)
1862 if (!ctx->encrypt && !cctx->tag_set)
1866 if (CRYPTO_ccm128_setiv(ccm, ctx->iv, 15 - cctx->L, len))
1868 cctx->len_set = 1;
1872 if (!cctx->len_set && len)
1881 if (!cctx->len_set) {
1882 if (CRYPTO_ccm128_setiv(ccm, ctx->iv, 15 - cctx->L, len))
1884 cctx->len_set = 1;
1887 if (cctx->str ? CRYPTO_ccm128_encrypt_ccm64(ccm, in, out, len,
1888 cctx->str) :
1891 cctx->tag_set = 1;
1895 if (cctx->str ? !CRYPTO_ccm128_decrypt_ccm64(ccm, in, out, len,
1896 cctx->str) :
1899 if (CRYPTO_ccm128_tag(ccm, tag, cctx->M)) {
1900 if (!memcmp(tag, ctx->buf, cctx->M))
1906 cctx->iv_set = 0;
1907 cctx->tag_set = 0;
1908 cctx->len_set = 0;