Lines Matching refs:seed
19 int sun8i_ss_prng_seed(struct crypto_rng *tfm, const u8 *seed, in sun8i_ss_prng_seed() argument
24 if (ctx->seed && ctx->slen != slen) { in sun8i_ss_prng_seed()
25 kfree_sensitive(ctx->seed); in sun8i_ss_prng_seed()
27 ctx->seed = NULL; in sun8i_ss_prng_seed()
29 if (!ctx->seed) in sun8i_ss_prng_seed()
30 ctx->seed = kmalloc(slen, GFP_KERNEL); in sun8i_ss_prng_seed()
31 if (!ctx->seed) in sun8i_ss_prng_seed()
34 memcpy(ctx->seed, seed, slen); in sun8i_ss_prng_seed()
52 kfree_sensitive(ctx->seed); in sun8i_ss_prng_exit()
53 ctx->seed = NULL; in sun8i_ss_prng_exit()
108 dma_iv = dma_map_single(ss->dev, ctx->seed, ctx->slen, DMA_TO_DEVICE); in sun8i_ss_prng_generate()
171 memcpy(ctx->seed, d + dlen, ctx->slen); in sun8i_ss_prng_generate()