• Home
  • Raw
  • Download

Lines Matching refs:tfm

130 	struct crypto_aead *tfm;  member
262 static void *tipc_aead_mem_alloc(struct crypto_aead *tfm,
417 crypto_free_aead(tfm_entry->tfm); in tipc_aead_free()
422 crypto_free_aead(head->tfm); in tipc_aead_free()
491 struct crypto_aead *tfm; in tipc_aead_tfm_next() local
495 tfm = (*tfm_entry)->tfm; in tipc_aead_tfm_next()
498 return tfm; in tipc_aead_tfm_next()
518 struct crypto_aead *tfm; in tipc_aead_init() local
543 tfm = crypto_alloc_aead(ukey->alg_name, 0, 0); in tipc_aead_init()
544 if (IS_ERR(tfm)) { in tipc_aead_init()
545 err = PTR_ERR(tfm); in tipc_aead_init()
550 crypto_aead_ivsize(tfm) != TIPC_AES_GCM_IV_SIZE)) { in tipc_aead_init()
551 crypto_free_aead(tfm); in tipc_aead_init()
556 err = crypto_aead_setauthsize(tfm, TIPC_AES_GCM_TAG_SIZE); in tipc_aead_init()
557 err |= crypto_aead_setkey(tfm, ukey->key, keylen); in tipc_aead_init()
559 crypto_free_aead(tfm); in tipc_aead_init()
565 crypto_free_aead(tfm); in tipc_aead_init()
570 tfm_entry->tfm = tfm; in tipc_aead_init()
685 static void *tipc_aead_mem_alloc(struct crypto_aead *tfm, in tipc_aead_mem_alloc() argument
694 iv_size = crypto_aead_ivsize(tfm); in tipc_aead_mem_alloc()
695 req_size = sizeof(**req) + crypto_aead_reqsize(tfm); in tipc_aead_mem_alloc()
699 len += crypto_aead_alignmask(tfm) & ~(crypto_tfm_ctx_alignment() - 1); in tipc_aead_mem_alloc()
710 crypto_aead_alignmask(tfm) + 1); in tipc_aead_mem_alloc()
737 struct crypto_aead *tfm = tipc_aead_tfm_next(aead); in tipc_aead_encrypt() local
784 ctx = tipc_aead_mem_alloc(tfm, sizeof(*tx_ctx), &iv, &req, &sg, nsg); in tipc_aead_encrypt()
813 aead_request_set_tfm(req, tfm); in tipc_aead_encrypt()
893 struct crypto_aead *tfm; in tipc_aead_decrypt() local
912 tfm = tipc_aead_tfm_next(aead); in tipc_aead_decrypt()
913 ctx = tipc_aead_mem_alloc(tfm, sizeof(*rx_ctx), &iv, &req, &sg, nsg); in tipc_aead_decrypt()
938 aead_request_set_tfm(req, tfm); in tipc_aead_decrypt()