Lines Matching refs:seed
29 kfree_sensitive(ctx->seed); in sun8i_ce_prng_exit()
30 ctx->seed = NULL; in sun8i_ce_prng_exit()
34 int sun8i_ce_prng_seed(struct crypto_rng *tfm, const u8 *seed, in sun8i_ce_prng_seed() argument
39 if (ctx->seed && ctx->slen != slen) { in sun8i_ce_prng_seed()
40 kfree_sensitive(ctx->seed); in sun8i_ce_prng_seed()
42 ctx->seed = NULL; in sun8i_ce_prng_seed()
44 if (!ctx->seed) in sun8i_ce_prng_seed()
45 ctx->seed = kmalloc(slen, GFP_KERNEL | GFP_DMA); in sun8i_ce_prng_seed()
46 if (!ctx->seed) in sun8i_ce_prng_seed()
49 memcpy(ctx->seed, seed, slen); in sun8i_ce_prng_seed()
97 dma_iv = dma_map_single(ce->dev, ctx->seed, ctx->slen, DMA_TO_DEVICE); in sun8i_ce_prng_generate()
154 memcpy(ctx->seed, d + dlen, ctx->slen); in sun8i_ce_prng_generate()