Searched refs:rc4 (Results 1 – 3 of 3) sorted by relevance
/optee_os-3.20.0/core/lib/libtomcrypt/src/prngs/ |
A D | rc4.c | 36 prng->u.rc4.s.x = 0; in rc4_start() 38 XMEMSET(&prng->u.rc4.s.buf, 0, sizeof(prng->u.rc4.s.buf)); in rc4_start() 68 for (i = 0; i < 12; i++) rc4_stream_keystream(&prng->u.rc4.s, buf, sizeof(buf)); in rc4_add_entropy() 73 while (inlen--) prng->u.rc4.s.buf[prng->u.rc4.s.x++ % sizeof(prng->u.rc4.s.buf)] ^= *in++; in rc4_add_entropy() 96 XMEMCPY(buf, prng->u.rc4.s.buf, sizeof(buf)); in rc4_ready() 98 len = MIN(prng->u.rc4.s.x, 256); /* TODO: we can perhaps always use all 256 bytes */ in rc4_ready() 99 if ((err = rc4_stream_setup(&prng->u.rc4.s, buf, len)) != CRYPT_OK) goto LBL_UNLOCK; in rc4_ready() 101 for (i = 0; i < 12; i++) rc4_stream_keystream(&prng->u.rc4.s, buf, sizeof(buf)); in rc4_ready() 120 if (rc4_stream_keystream(&prng->u.rc4.s, out, outlen) != CRYPT_OK) outlen = 0; in rc4_read() 137 err = rc4_stream_done(&prng->u.rc4.s); in rc4_done() [all …]
|
A D | sub.mk | 6 srcs-y += rc4.c
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/headers/ |
A D | tomcrypt_prng.h | 58 struct rc4_prng rc4; member
|
Completed in 4 milliseconds