Searched refs:xts_ctx (Results 1 - 1 of 1) sorted by relevance
/linux-4.1.27/arch/s390/crypto/ |
H A D | aes_s390.c | 534 struct s390_xts_ctx *xts_ctx = crypto_tfm_ctx(tfm); xts_fallback_setkey() local 537 xts_ctx->fallback->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK; xts_fallback_setkey() 538 xts_ctx->fallback->base.crt_flags |= (tfm->crt_flags & xts_fallback_setkey() 541 ret = crypto_blkcipher_setkey(xts_ctx->fallback, key, len); xts_fallback_setkey() 544 tfm->crt_flags |= (xts_ctx->fallback->base.crt_flags & xts_fallback_setkey() 554 struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm); xts_fallback_decrypt() local 559 desc->tfm = xts_ctx->fallback; xts_fallback_decrypt() 571 struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm); xts_fallback_encrypt() local 576 desc->tfm = xts_ctx->fallback; xts_fallback_encrypt() 587 struct s390_xts_ctx *xts_ctx = crypto_tfm_ctx(tfm); xts_aes_set_key() local 592 xts_ctx->enc = KM_XTS_128_ENCRYPT; xts_aes_set_key() 593 xts_ctx->dec = KM_XTS_128_DECRYPT; xts_aes_set_key() 594 memcpy(xts_ctx->key + 16, in_key, 16); xts_aes_set_key() 595 memcpy(xts_ctx->pcc_key + 16, in_key + 16, 16); xts_aes_set_key() 598 xts_ctx->enc = 0; xts_aes_set_key() 599 xts_ctx->dec = 0; xts_aes_set_key() 603 xts_ctx->enc = KM_XTS_256_ENCRYPT; xts_aes_set_key() 604 xts_ctx->dec = KM_XTS_256_DECRYPT; xts_aes_set_key() 605 memcpy(xts_ctx->key, in_key, 32); xts_aes_set_key() 606 memcpy(xts_ctx->pcc_key, in_key + 32, 32); xts_aes_set_key() 612 xts_ctx->key_len = key_len; xts_aes_set_key() 617 struct s390_xts_ctx *xts_ctx, xts_aes_crypt() 620 unsigned int offset = (xts_ctx->key_len >> 1) & 0x10; xts_aes_crypt() 638 memcpy(pcc_param.key, xts_ctx->pcc_key, 32); xts_aes_crypt() 643 memcpy(xts_param.key, xts_ctx->key, 32); xts_aes_crypt() 666 struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm); xts_aes_encrypt() local 669 if (unlikely(xts_ctx->key_len == 48)) xts_aes_encrypt() 673 return xts_aes_crypt(desc, xts_ctx->enc, xts_ctx, &walk); xts_aes_encrypt() 680 struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm); xts_aes_decrypt() local 683 if (unlikely(xts_ctx->key_len == 48)) xts_aes_decrypt() 687 return xts_aes_crypt(desc, xts_ctx->dec, xts_ctx, &walk); xts_aes_decrypt() 693 struct s390_xts_ctx *xts_ctx = crypto_tfm_ctx(tfm); xts_fallback_init() local 695 xts_ctx->fallback = crypto_alloc_blkcipher(name, 0, xts_fallback_init() 698 if (IS_ERR(xts_ctx->fallback)) { xts_fallback_init() 701 return PTR_ERR(xts_ctx->fallback); xts_fallback_init() 708 struct s390_xts_ctx *xts_ctx = crypto_tfm_ctx(tfm); xts_fallback_exit() local 710 crypto_free_blkcipher(xts_ctx->fallback); xts_fallback_exit() 711 xts_ctx->fallback = NULL; xts_fallback_exit() 616 xts_aes_crypt(struct blkcipher_desc *desc, long func, struct s390_xts_ctx *xts_ctx, struct blkcipher_walk *walk) xts_aes_crypt() argument
|
Completed in 37 milliseconds