Lines Matching refs:xts_ctx
386 struct s390_xts_ctx *xts_ctx = crypto_skcipher_ctx(tfm); in xts_fallback_setkey() local
388 crypto_skcipher_clear_flags(xts_ctx->fallback, CRYPTO_TFM_REQ_MASK); in xts_fallback_setkey()
389 crypto_skcipher_set_flags(xts_ctx->fallback, in xts_fallback_setkey()
392 return crypto_skcipher_setkey(xts_ctx->fallback, key, len); in xts_fallback_setkey()
398 struct s390_xts_ctx *xts_ctx = crypto_skcipher_ctx(tfm); in xts_aes_set_key() local
411 xts_ctx->fc = (fc && cpacf_test_func(&km_functions, fc)) ? fc : 0; in xts_aes_set_key()
412 if (!xts_ctx->fc) in xts_aes_set_key()
417 xts_ctx->key_len = key_len; in xts_aes_set_key()
418 memcpy(xts_ctx->key, in_key, key_len); in xts_aes_set_key()
419 memcpy(xts_ctx->pcc_key, in_key + key_len, key_len); in xts_aes_set_key()
426 struct s390_xts_ctx *xts_ctx = crypto_skcipher_ctx(tfm); in xts_aes_crypt() local
445 if (unlikely(!xts_ctx->fc || (req->cryptlen % AES_BLOCK_SIZE) != 0)) { in xts_aes_crypt()
449 skcipher_request_set_tfm(subreq, xts_ctx->fallback); in xts_aes_crypt()
458 offset = xts_ctx->key_len & 0x10; in xts_aes_crypt()
463 memcpy(pcc_param.key + offset, xts_ctx->pcc_key, xts_ctx->key_len); in xts_aes_crypt()
464 cpacf_pcc(xts_ctx->fc, pcc_param.key + offset); in xts_aes_crypt()
466 memcpy(xts_param.key + offset, xts_ctx->key, xts_ctx->key_len); in xts_aes_crypt()
472 cpacf_km(xts_ctx->fc | modifier, xts_param.key + offset, in xts_aes_crypt()
494 struct s390_xts_ctx *xts_ctx = crypto_skcipher_ctx(tfm); in xts_fallback_init() local
496 xts_ctx->fallback = crypto_alloc_skcipher(name, 0, in xts_fallback_init()
499 if (IS_ERR(xts_ctx->fallback)) { in xts_fallback_init()
502 return PTR_ERR(xts_ctx->fallback); in xts_fallback_init()
505 crypto_skcipher_reqsize(xts_ctx->fallback)); in xts_fallback_init()
511 struct s390_xts_ctx *xts_ctx = crypto_skcipher_ctx(tfm); in xts_fallback_exit() local
513 crypto_free_skcipher(xts_ctx->fallback); in xts_fallback_exit()
537 struct s390_xts_ctx *xts_ctx = crypto_skcipher_ctx(tfm); in fullxts_aes_set_key() local
550 xts_ctx->fc = (fc && cpacf_test_func(&km_functions, fc)) ? fc : 0; in fullxts_aes_set_key()
551 if (!xts_ctx->fc) in fullxts_aes_set_key()
555 memcpy(xts_ctx->keys, in_key, key_len); in fullxts_aes_set_key()
556 xts_ctx->key_len = key_len; in fullxts_aes_set_key()
563 struct s390_xts_ctx *xts_ctx = crypto_skcipher_ctx(tfm); in fullxts_aes_crypt() local
578 if (unlikely(!xts_ctx->fc || (req->cryptlen % AES_BLOCK_SIZE) != 0)) { in fullxts_aes_crypt()
582 skcipher_request_set_tfm(subreq, xts_ctx->fallback); in fullxts_aes_crypt()
592 offset = xts_ctx->key_len & 0x20; in fullxts_aes_crypt()
593 memcpy(fxts_param.key + offset, xts_ctx->keys, xts_ctx->key_len); in fullxts_aes_crypt()
600 cpacf_km(xts_ctx->fc | modifier, fxts_param.key + offset, in fullxts_aes_crypt()