Home
last modified time | relevance | path

Searched refs:chacha (Results 1 – 8 of 8) sorted by relevance

/optee_os/core/lib/libtomcrypt/src/prngs/
H A Dchacha20.c35 XMEMSET(&prng->u.chacha.ent, 0, sizeof(prng->u.chacha.ent)); in chacha20_prng_start()
36 prng->u.chacha.idx = 0; in chacha20_prng_start()
61 … if ((err = chacha_keystream(&prng->u.chacha.s, buf, sizeof(buf))) != CRYPT_OK) goto LBL_UNLOCK; in chacha20_prng_add_entropy()
64 if ((err = chacha_setup(&prng->u.chacha.s, buf, 32, 20)) != CRYPT_OK) goto LBL_UNLOCK; in chacha20_prng_add_entropy()
66 if ((err = chacha_ivctr64(&prng->u.chacha.s, buf + 32, 8, 0)) != CRYPT_OK) goto LBL_UNLOCK; in chacha20_prng_add_entropy()
72 … while (inlen--) prng->u.chacha.ent[prng->u.chacha.idx++ % sizeof(prng->u.chacha.ent)] ^= *in++; in chacha20_prng_add_entropy()
94 …if ((err = chacha_setup(&prng->u.chacha.s, prng->u.chacha.ent, 32, 20)) != CRYPT_OK) goto LBL… in chacha20_prng_ready()
96 …if ((err = chacha_ivctr64(&prng->u.chacha.s, prng->u.chacha.ent + 32, 8, 0)) != CRYPT_OK) goto LBL… in chacha20_prng_ready()
97 XMEMSET(&prng->u.chacha.ent, 0, sizeof(prng->u.chacha.ent)); in chacha20_prng_ready()
98 prng->u.chacha.idx = 0; in chacha20_prng_ready()
[all …]
/optee_os/core/lib/libtomcrypt/src/encauth/chachapoly/
H A Dchacha20poly1305_setiv.c28 if ((err = chacha_ivctr32(&st->chacha, iv, ivlen, 1)) != CRYPT_OK) return err; in chacha20poly1305_setiv()
32 if ((err = chacha_ivctr64(&st->chacha, iv, ivlen, 1)) != CRYPT_OK) return err; in chacha20poly1305_setiv()
36 for(i = 0; i < 12; i++) tmp_st.input[i] = st->chacha.input[i]; in chacha20poly1305_setiv()
H A Dchacha20poly1305_init.c17 return chacha_setup(&st->chacha, key, keylen, 20); in chacha20poly1305_init()
H A Dchacha20poly1305_encrypt.c24 if ((err = chacha_crypt(&st->chacha, in, inlen, out)) != CRYPT_OK) return err; in chacha20poly1305_encrypt()
H A Dchacha20poly1305_decrypt.c33 if ((err = chacha_crypt(&st->chacha, in, inlen, out)) != CRYPT_OK) return err; in chacha20poly1305_decrypt()
H A Dchacha20poly1305_done.c32 if ((err = chacha_done(&st->chacha)) != CRYPT_OK) return err; in chacha20poly1305_done()
/optee_os/core/lib/libtomcrypt/src/headers/
H A Dtomcrypt_prng.h61 struct chacha20_prng chacha; member
H A Dtomcrypt_mac.h541 chacha_state chacha; member