Lines Matching refs:xctx
271 EVP_AES_XTS_CTX *xctx = EVP_C_DATA(EVP_AES_XTS_CTX,ctx); in aesni_xts_init_key() local
300 aesni_set_encrypt_key(key, bits, &xctx->ks1.ks); in aesni_xts_init_key()
301 xctx->xts.block1 = (block128_f) aesni_encrypt; in aesni_xts_init_key()
302 xctx->stream = aesni_xts_encrypt; in aesni_xts_init_key()
304 aesni_set_decrypt_key(key, bits, &xctx->ks1.ks); in aesni_xts_init_key()
305 xctx->xts.block1 = (block128_f) aesni_decrypt; in aesni_xts_init_key()
306 xctx->stream = aesni_xts_decrypt; in aesni_xts_init_key()
309 aesni_set_encrypt_key(key + bytes, bits, &xctx->ks2.ks); in aesni_xts_init_key()
310 xctx->xts.block2 = (block128_f) aesni_encrypt; in aesni_xts_init_key()
312 xctx->xts.key1 = &xctx->ks1; in aesni_xts_init_key()
316 xctx->xts.key2 = &xctx->ks2; in aesni_xts_init_key()
635 EVP_AES_XTS_CTX *xctx = EVP_C_DATA(EVP_AES_XTS_CTX,ctx); in aes_t4_xts_init_key() local
662 xctx->stream = NULL; in aes_t4_xts_init_key()
665 aes_t4_set_encrypt_key(key, bits, &xctx->ks1.ks); in aes_t4_xts_init_key()
666 xctx->xts.block1 = (block128_f) aes_t4_encrypt; in aes_t4_xts_init_key()
669 xctx->stream = aes128_t4_xts_encrypt; in aes_t4_xts_init_key()
672 xctx->stream = aes256_t4_xts_encrypt; in aes_t4_xts_init_key()
678 aes_t4_set_decrypt_key(key, bits, &xctx->ks1.ks); in aes_t4_xts_init_key()
679 xctx->xts.block1 = (block128_f) aes_t4_decrypt; in aes_t4_xts_init_key()
682 xctx->stream = aes128_t4_xts_decrypt; in aes_t4_xts_init_key()
685 xctx->stream = aes256_t4_xts_decrypt; in aes_t4_xts_init_key()
692 aes_t4_set_encrypt_key(key + bytes, bits, &xctx->ks2.ks); in aes_t4_xts_init_key()
693 xctx->xts.block2 = (block128_f) aes_t4_encrypt; in aes_t4_xts_init_key()
695 xctx->xts.key1 = &xctx->ks1; in aes_t4_xts_init_key()
699 xctx->xts.key2 = &xctx->ks2; in aes_t4_xts_init_key()
3193 EVP_AES_XTS_CTX *xctx = EVP_C_DATA(EVP_AES_XTS_CTX, c); in aes_xts_ctrl() local
3199 if (xctx->xts.key1) { in aes_xts_ctrl()
3200 if (xctx->xts.key1 != &xctx->ks1) in aes_xts_ctrl()
3204 if (xctx->xts.key2) { in aes_xts_ctrl()
3205 if (xctx->xts.key2 != &xctx->ks2) in aes_xts_ctrl()
3213 xctx->xts.key1 = NULL; in aes_xts_ctrl()
3214 xctx->xts.key2 = NULL; in aes_xts_ctrl()
3221 EVP_AES_XTS_CTX *xctx = EVP_C_DATA(EVP_AES_XTS_CTX,ctx); in aes_xts_init_key() local
3260 xctx->stream = enc ? AES_xts_encrypt : AES_xts_decrypt; in aes_xts_init_key()
3262 xctx->stream = NULL; in aes_xts_init_key()
3268 HWAES_set_encrypt_key(key, bits, &xctx->ks1.ks); in aes_xts_init_key()
3269 xctx->xts.block1 = (block128_f) HWAES_encrypt; in aes_xts_init_key()
3271 xctx->stream = HWAES_xts_encrypt; in aes_xts_init_key()
3274 HWAES_set_decrypt_key(key, bits, &xctx->ks1.ks); in aes_xts_init_key()
3275 xctx->xts.block1 = (block128_f) HWAES_decrypt; in aes_xts_init_key()
3277 xctx->stream = HWAES_xts_decrypt; in aes_xts_init_key()
3281 HWAES_set_encrypt_key(key + bytes, bits, &xctx->ks2.ks); in aes_xts_init_key()
3282 xctx->xts.block2 = (block128_f) HWAES_encrypt; in aes_xts_init_key()
3284 xctx->xts.key1 = &xctx->ks1; in aes_xts_init_key()
3290 xctx->stream = enc ? ossl_bsaes_xts_encrypt : ossl_bsaes_xts_decrypt; in aes_xts_init_key()
3296 vpaes_set_encrypt_key(key, bits, &xctx->ks1.ks); in aes_xts_init_key()
3297 xctx->xts.block1 = (block128_f) vpaes_encrypt; in aes_xts_init_key()
3299 vpaes_set_decrypt_key(key, bits, &xctx->ks1.ks); in aes_xts_init_key()
3300 xctx->xts.block1 = (block128_f) vpaes_decrypt; in aes_xts_init_key()
3303 vpaes_set_encrypt_key(key + bytes, bits, &xctx->ks2.ks); in aes_xts_init_key()
3304 xctx->xts.block2 = (block128_f) vpaes_encrypt; in aes_xts_init_key()
3306 xctx->xts.key1 = &xctx->ks1; in aes_xts_init_key()
3313 AES_set_encrypt_key(key, bits, &xctx->ks1.ks); in aes_xts_init_key()
3314 xctx->xts.block1 = (block128_f) AES_encrypt; in aes_xts_init_key()
3316 AES_set_decrypt_key(key, bits, &xctx->ks1.ks); in aes_xts_init_key()
3317 xctx->xts.block1 = (block128_f) AES_decrypt; in aes_xts_init_key()
3320 AES_set_encrypt_key(key + bytes, bits, &xctx->ks2.ks); in aes_xts_init_key()
3321 xctx->xts.block2 = (block128_f) AES_encrypt; in aes_xts_init_key()
3323 xctx->xts.key1 = &xctx->ks1; in aes_xts_init_key()
3328 xctx->xts.key2 = &xctx->ks2; in aes_xts_init_key()
3338 EVP_AES_XTS_CTX *xctx = EVP_C_DATA(EVP_AES_XTS_CTX,ctx); in aes_xts_cipher() local
3340 if (xctx->xts.key1 == NULL in aes_xts_cipher()
3341 || xctx->xts.key2 == NULL in aes_xts_cipher()
3358 if (xctx->stream) in aes_xts_cipher()
3359 (*xctx->stream) (in, out, len, in aes_xts_cipher()
3360 xctx->xts.key1, xctx->xts.key2, in aes_xts_cipher()
3362 else if (CRYPTO_xts128_encrypt(&xctx->xts, ctx->iv, in, out, len, in aes_xts_cipher()