Lines Matching refs:tfm
177 crypto_free_aead(sa->key.tfm); in free_rxsa()
205 crypto_free_aead(sa->key.tfm); in free_txsa()
535 static struct aead_request *macsec_alloc_req(struct crypto_aead *tfm, in macsec_alloc_req() argument
544 size = sizeof(struct aead_request) + crypto_aead_reqsize(tfm); in macsec_alloc_req()
560 aead_request_set_tfm(req, tfm); in macsec_alloc_req()
652 req = macsec_alloc_req(tx_sa->key.tfm, &iv, &sg, ret); in macsec_encrypt()
878 req = macsec_alloc_req(rx_sa->key.tfm, &iv, &sg, ret); in macsec_decrypt()
1338 struct crypto_aead *tfm; in macsec_alloc_tfm() local
1341 tfm = crypto_alloc_aead("gcm(aes)", 0, 0); in macsec_alloc_tfm()
1343 if (IS_ERR(tfm)) in macsec_alloc_tfm()
1344 return tfm; in macsec_alloc_tfm()
1346 ret = crypto_aead_setkey(tfm, key, key_len); in macsec_alloc_tfm()
1350 ret = crypto_aead_setauthsize(tfm, icv_len); in macsec_alloc_tfm()
1354 return tfm; in macsec_alloc_tfm()
1356 crypto_free_aead(tfm); in macsec_alloc_tfm()
1367 rx_sa->key.tfm = macsec_alloc_tfm(sak, key_len, icv_len); in init_rx_sa()
1368 if (IS_ERR(rx_sa->key.tfm)) { in init_rx_sa()
1370 return PTR_ERR(rx_sa->key.tfm); in init_rx_sa()
1467 tx_sa->key.tfm = macsec_alloc_tfm(sak, key_len, icv_len); in init_tx_sa()
1468 if (IS_ERR(tx_sa->key.tfm)) { in init_tx_sa()
1470 return PTR_ERR(tx_sa->key.tfm); in init_tx_sa()