Lines Matching refs:chacha_state

295 				  u32 chacha_state[CHACHA_STATE_WORDS],  in crng_fast_key_erasure()
302 chacha_init_consts(chacha_state); in crng_fast_key_erasure()
303 memcpy(&chacha_state[4], key, CHACHA_KEY_SIZE); in crng_fast_key_erasure()
304 memset(&chacha_state[12], 0, sizeof(u32) * 4); in crng_fast_key_erasure()
305 chacha20_block(chacha_state, first_block); in crng_fast_key_erasure()
317 static void crng_make_state(u32 chacha_state[CHACHA_STATE_WORDS], in crng_make_state()
339 crng_fast_key_erasure(base_crng.key, chacha_state, in crng_make_state()
358 crng_fast_key_erasure(base_crng.key, chacha_state, in crng_make_state()
371 crng_fast_key_erasure(crng->key, chacha_state, random_data, random_data_len); in crng_make_state()
377 u32 chacha_state[CHACHA_STATE_WORDS]; in _get_random_bytes() local
385 crng_make_state(chacha_state, buf, first_block_len); in _get_random_bytes()
391 chacha20_block(chacha_state, tmp); in _get_random_bytes()
397 chacha20_block(chacha_state, buf); in _get_random_bytes()
398 if (unlikely(chacha_state[12] == 0)) in _get_random_bytes()
399 ++chacha_state[13]; in _get_random_bytes()
404 memzero_explicit(chacha_state, sizeof(chacha_state)); in _get_random_bytes()
423 u32 chacha_state[CHACHA_STATE_WORDS]; in get_random_bytes_user() local
435 crng_make_state(chacha_state, (u8 *)&chacha_state[4], CHACHA_KEY_SIZE); in get_random_bytes_user()
442 ret = copy_to_iter(&chacha_state[4], CHACHA_KEY_SIZE, iter); in get_random_bytes_user()
447 chacha20_block(chacha_state, block); in get_random_bytes_user()
448 if (unlikely(chacha_state[12] == 0)) in get_random_bytes_user()
449 ++chacha_state[13]; in get_random_bytes_user()
466 memzero_explicit(chacha_state, sizeof(chacha_state)); in get_random_bytes_user()