Lines Matching refs:sdesc
90 struct kdf_sdesc *sdesc; in kdf_alloc() local
107 sdesc = kmalloc(size, GFP_KERNEL); in kdf_alloc()
108 if (!sdesc) in kdf_alloc()
110 sdesc->shash.tfm = tfm; in kdf_alloc()
112 *sdesc_ret = sdesc; in kdf_alloc()
121 static void kdf_dealloc(struct kdf_sdesc *sdesc) in kdf_dealloc() argument
123 if (!sdesc) in kdf_dealloc()
126 if (sdesc->shash.tfm) in kdf_dealloc()
127 crypto_free_shash(sdesc->shash.tfm); in kdf_dealloc()
129 kfree_sensitive(sdesc); in kdf_dealloc()
143 static int kdf_ctr(struct kdf_sdesc *sdesc, const u8 *src, unsigned int slen, in kdf_ctr() argument
146 struct shash_desc *desc = &sdesc->shash; in kdf_ctr()
199 static int keyctl_dh_compute_kdf(struct kdf_sdesc *sdesc, in keyctl_dh_compute_kdf() argument
206 crypto_shash_digestsize(sdesc->shash.tfm)); in keyctl_dh_compute_kdf()
214 ret = kdf_ctr(sdesc, kbuf, kbuflen, outbuf, outbuf_len, lzero); in keyctl_dh_compute_kdf()
243 struct kdf_sdesc *sdesc = NULL; in __keyctl_dh_compute() local
276 ret = kdf_alloc(&sdesc, hashname); in __keyctl_dh_compute()
386 ret = keyctl_dh_compute_kdf(sdesc, buffer, buflen, outbuf, in __keyctl_dh_compute()
406 kdf_dealloc(sdesc); in __keyctl_dh_compute()