Lines Matching refs:gcm
41 GCM128_CONTEXT gcm; member
261 gctx->gcm.ghash==gcm_ghash_avx)
262 # define AES_GCM_ASM2(gctx) (gctx->gcm.block==(block128_f)aesni_encrypt && \
263 gctx->gcm.ghash==gcm_ghash_avx)
354 CRYPTO_gcm128_init(&gctx->gcm, &gctx->ks, (block128_f) aesni_encrypt); in aesni_gcm_init_key()
362 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen); in aesni_gcm_init_key()
369 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen); in aesni_gcm_init_key()
760 CRYPTO_gcm128_init(&gctx->gcm, &gctx->ks, in aes_t4_gcm_init_key()
781 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen); in aes_t4_gcm_init_key()
788 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen); in aes_t4_gcm_init_key()
2839 OPENSSL_cleanse(&gctx->gcm, sizeof(gctx->gcm)); in aes_gcm_cleanup()
2915 CRYPTO_gcm128_setiv(&gctx->gcm, gctx->iv, gctx->ivlen); in aes_gcm_ctrl()
2931 CRYPTO_gcm128_setiv(&gctx->gcm, gctx->iv, gctx->ivlen); in aes_gcm_ctrl()
2963 if (gctx->gcm.key) { in aes_gcm_ctrl()
2964 if (gctx->gcm.key != &gctx->ks) in aes_gcm_ctrl()
2966 gctx_out->gcm.key = &gctx_out->ks; in aes_gcm_ctrl()
2997 CRYPTO_gcm128_init(&gctx->gcm, &gctx->ks, in aes_gcm_init_key()
3010 CRYPTO_gcm128_init(&gctx->gcm, &gctx->ks, in aes_gcm_init_key()
3019 CRYPTO_gcm128_init(&gctx->gcm, &gctx->ks, in aes_gcm_init_key()
3028 CRYPTO_gcm128_init(&gctx->gcm, &gctx->ks, in aes_gcm_init_key()
3043 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen); in aes_gcm_init_key()
3050 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen); in aes_gcm_init_key()
3084 if (CRYPTO_gcm128_aad(&gctx->gcm, ctx->buf, gctx->tls_aad_len)) in aes_gcm_tls_cipher()
3096 if (CRYPTO_gcm128_encrypt(&gctx->gcm, NULL, NULL, 0)) in aes_gcm_tls_cipher()
3100 gctx->gcm.key, in aes_gcm_tls_cipher()
3101 gctx->gcm.Yi.c, gctx->gcm.Xi.u); in aes_gcm_tls_cipher()
3102 gctx->gcm.len.u[1] += bulk; in aes_gcm_tls_cipher()
3105 if (CRYPTO_gcm128_encrypt_ctr32(&gctx->gcm, in aes_gcm_tls_cipher()
3114 if (CRYPTO_gcm128_encrypt(&gctx->gcm, NULL, NULL, 0)) in aes_gcm_tls_cipher()
3118 gctx->gcm.key, in aes_gcm_tls_cipher()
3119 gctx->gcm.Yi.c, gctx->gcm.Xi.u); in aes_gcm_tls_cipher()
3120 gctx->gcm.len.u[1] += bulk; in aes_gcm_tls_cipher()
3123 if (CRYPTO_gcm128_encrypt(&gctx->gcm, in aes_gcm_tls_cipher()
3129 CRYPTO_gcm128_tag(&gctx->gcm, out, EVP_GCM_TLS_TAG_LEN); in aes_gcm_tls_cipher()
3137 if (CRYPTO_gcm128_decrypt(&gctx->gcm, NULL, NULL, 0)) in aes_gcm_tls_cipher()
3141 gctx->gcm.key, in aes_gcm_tls_cipher()
3142 gctx->gcm.Yi.c, gctx->gcm.Xi.u); in aes_gcm_tls_cipher()
3143 gctx->gcm.len.u[1] += bulk; in aes_gcm_tls_cipher()
3146 if (CRYPTO_gcm128_decrypt_ctr32(&gctx->gcm, in aes_gcm_tls_cipher()
3155 if (CRYPTO_gcm128_decrypt(&gctx->gcm, NULL, NULL, 0)) in aes_gcm_tls_cipher()
3159 gctx->gcm.key, in aes_gcm_tls_cipher()
3160 gctx->gcm.Yi.c, gctx->gcm.Xi.u); in aes_gcm_tls_cipher()
3161 gctx->gcm.len.u[1] += bulk; in aes_gcm_tls_cipher()
3164 if (CRYPTO_gcm128_decrypt(&gctx->gcm, in aes_gcm_tls_cipher()
3169 CRYPTO_gcm128_tag(&gctx->gcm, ctx->buf, EVP_GCM_TLS_TAG_LEN); in aes_gcm_tls_cipher()
3199 if (CRYPTO_gcm128_aad(&gctx->gcm, in, len)) in aes_gcm_cipher()
3206 size_t res = (16 - gctx->gcm.mres) % 16; in aes_gcm_cipher()
3208 if (CRYPTO_gcm128_encrypt(&gctx->gcm, in, out, res)) in aes_gcm_cipher()
3213 gctx->gcm.key, gctx->gcm.Yi.c, in aes_gcm_cipher()
3214 gctx->gcm.Xi.u); in aes_gcm_cipher()
3215 gctx->gcm.len.u[1] += bulk; in aes_gcm_cipher()
3219 if (CRYPTO_gcm128_encrypt_ctr32(&gctx->gcm, in aes_gcm_cipher()
3228 size_t res = (16 - gctx->gcm.mres) % 16; in aes_gcm_cipher()
3230 if (CRYPTO_gcm128_encrypt(&gctx->gcm, in, out, res)) in aes_gcm_cipher()
3235 gctx->gcm.key, gctx->gcm.Yi.c, in aes_gcm_cipher()
3236 gctx->gcm.Xi.u); in aes_gcm_cipher()
3237 gctx->gcm.len.u[1] += bulk; in aes_gcm_cipher()
3241 if (CRYPTO_gcm128_encrypt(&gctx->gcm, in aes_gcm_cipher()
3250 size_t res = (16 - gctx->gcm.mres) % 16; in aes_gcm_cipher()
3252 if (CRYPTO_gcm128_decrypt(&gctx->gcm, in, out, res)) in aes_gcm_cipher()
3257 gctx->gcm.key, in aes_gcm_cipher()
3258 gctx->gcm.Yi.c, gctx->gcm.Xi.u); in aes_gcm_cipher()
3259 gctx->gcm.len.u[1] += bulk; in aes_gcm_cipher()
3263 if (CRYPTO_gcm128_decrypt_ctr32(&gctx->gcm, in aes_gcm_cipher()
3272 size_t res = (16 - gctx->gcm.mres) % 16; in aes_gcm_cipher()
3274 if (CRYPTO_gcm128_decrypt(&gctx->gcm, in, out, res)) in aes_gcm_cipher()
3279 gctx->gcm.key, in aes_gcm_cipher()
3280 gctx->gcm.Yi.c, gctx->gcm.Xi.u); in aes_gcm_cipher()
3281 gctx->gcm.len.u[1] += bulk; in aes_gcm_cipher()
3285 if (CRYPTO_gcm128_decrypt(&gctx->gcm, in aes_gcm_cipher()
3295 if (CRYPTO_gcm128_finish(&gctx->gcm, ctx->buf, gctx->taglen) != 0) in aes_gcm_cipher()
3300 CRYPTO_gcm128_tag(&gctx->gcm, ctx->buf, 16); in aes_gcm_cipher()
3314 BLOCK_CIPHER_custom(NID_aes, 128, 1, 12, gcm, GCM,
3316 BLOCK_CIPHER_custom(NID_aes, 192, 1, 12, gcm, GCM,
3318 BLOCK_CIPHER_custom(NID_aes, 256, 1, 12, gcm, GCM,