Home
last modified time | relevance | path

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

/optee_os-3.20.0/core/lib/libtomcrypt/src/prngs/
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()
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()
117 if (chacha_keystream(&prng->u.chacha.s, out, outlen) != CRYPT_OK) outlen = 0; in chacha20_prng_read()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/encauth/chachapoly/
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()
A Dchacha20poly1305_init.c17 return chacha_setup(&st->chacha, key, keylen, 20); in chacha20poly1305_init()
A Dchacha20poly1305_encrypt.c24 if ((err = chacha_crypt(&st->chacha, in, inlen, out)) != CRYPT_OK) return err; in chacha20poly1305_encrypt()
A Dchacha20poly1305_decrypt.c33 if ((err = chacha_crypt(&st->chacha, in, inlen, out)) != CRYPT_OK) return err; in chacha20poly1305_decrypt()
A Dchacha20poly1305_done.c32 if ((err = chacha_done(&st->chacha)) != CRYPT_OK) return err; in chacha20poly1305_done()
/optee_os-3.20.0/core/lib/libtomcrypt/src/headers/
A Dtomcrypt_prng.h61 struct chacha20_prng chacha; member
A Dtomcrypt_mac.h542 chacha_state chacha; member

Completed in 7 milliseconds