• Home
  • Raw
  • Download

Lines Matching refs:tcw

149 		struct iv_tcw_private tcw;  member
619 struct iv_tcw_private *tcw = &cc->iv_gen_private.tcw; in crypt_iv_tcw_dtr() local
621 kzfree(tcw->iv_seed); in crypt_iv_tcw_dtr()
622 tcw->iv_seed = NULL; in crypt_iv_tcw_dtr()
623 kzfree(tcw->whitening); in crypt_iv_tcw_dtr()
624 tcw->whitening = NULL; in crypt_iv_tcw_dtr()
626 if (tcw->crc32_tfm && !IS_ERR(tcw->crc32_tfm)) in crypt_iv_tcw_dtr()
627 crypto_free_shash(tcw->crc32_tfm); in crypt_iv_tcw_dtr()
628 tcw->crc32_tfm = NULL; in crypt_iv_tcw_dtr()
634 struct iv_tcw_private *tcw = &cc->iv_gen_private.tcw; in crypt_iv_tcw_ctr() local
641 tcw->crc32_tfm = crypto_alloc_shash("crc32", 0, 0); in crypt_iv_tcw_ctr()
642 if (IS_ERR(tcw->crc32_tfm)) { in crypt_iv_tcw_ctr()
644 return PTR_ERR(tcw->crc32_tfm); in crypt_iv_tcw_ctr()
647 tcw->iv_seed = kzalloc(cc->iv_size, GFP_KERNEL); in crypt_iv_tcw_ctr()
648 tcw->whitening = kzalloc(TCW_WHITENING_SIZE, GFP_KERNEL); in crypt_iv_tcw_ctr()
649 if (!tcw->iv_seed || !tcw->whitening) { in crypt_iv_tcw_ctr()
660 struct iv_tcw_private *tcw = &cc->iv_gen_private.tcw; in crypt_iv_tcw_init() local
663 memcpy(tcw->iv_seed, &cc->key[key_offset], cc->iv_size); in crypt_iv_tcw_init()
664 memcpy(tcw->whitening, &cc->key[key_offset + cc->iv_size], in crypt_iv_tcw_init()
672 struct iv_tcw_private *tcw = &cc->iv_gen_private.tcw; in crypt_iv_tcw_wipe() local
674 memset(tcw->iv_seed, 0, cc->iv_size); in crypt_iv_tcw_wipe()
675 memset(tcw->whitening, 0, TCW_WHITENING_SIZE); in crypt_iv_tcw_wipe()
684 struct iv_tcw_private *tcw = &cc->iv_gen_private.tcw; in crypt_iv_tcw_whitening() local
687 SHASH_DESC_ON_STACK(desc, tcw->crc32_tfm); in crypt_iv_tcw_whitening()
691 memcpy(buf, tcw->whitening, TCW_WHITENING_SIZE); in crypt_iv_tcw_whitening()
696 desc->tfm = tcw->crc32_tfm; in crypt_iv_tcw_whitening()
723 struct iv_tcw_private *tcw = &cc->iv_gen_private.tcw; in crypt_iv_tcw_gen() local
736 memcpy(iv, tcw->iv_seed, cc->iv_size); in crypt_iv_tcw_gen()