Home
last modified time | relevance | path

Searched refs:rounds (Results 1 – 25 of 40) sorted by relevance

12

/optee_os/core/lib/libtomcrypt/src/ciphers/safer/
A Dsaferp.c228 static const int rounds[3] = { 8, 12, 16 }; in saferp_setup() local
273 skey->saferp.rounds = 8; in saferp_setup()
300 skey->saferp.rounds = 12; in saferp_setup()
327 skey->saferp.rounds = 16; in saferp_setup()
364 if (skey->saferp.rounds > 8) { in saferp_ecb_encrypt()
371 if (skey->saferp.rounds > 12) { in saferp_ecb_encrypt()
377 ct[0] = b[0] ^ skey->saferp.K[skey->saferp.rounds*2][0]; in saferp_ecb_encrypt()
380 ct[3] = b[3] ^ skey->saferp.K[skey->saferp.rounds*2][3]; in saferp_ecb_encrypt()
381 ct[4] = b[4] ^ skey->saferp.K[skey->saferp.rounds*2][4]; in saferp_ecb_encrypt()
433 if (skey->saferp.rounds > 12) { in saferp_ecb_decrypt()
[all …]
/optee_os/core/arch/arm/crypto/
A Daes_armv8a_ce.h15 int rounds, int blocks, int first);
17 int rounds, int blocks, int first);
19 int rounds, int blocks, uint8_t iv[]);
21 int rounds, int blocks, uint8_t iv[]);
23 int rounds, int blocks, uint8_t ctr[], int first);
25 int rounds, int blocks, uint8_t const rk2[],
28 int rounds, int blocks, uint8_t const rk2[],
A Daes-gcm-ce.c53 enc_key->rounds, state->ctr, k); in internal_aes_gcm_set_key()
110 (const uint8_t *)ek->data, ek->rounds, in encrypt_pl()
126 ek->rounds, 1, (uint8_t *)state->ctr, 1); in decrypt_pl()
157 pmull_gcm_load_round_keys(ek->data, ek->rounds); in update_payload_2block()
159 (uint8_t *)state->ctr, ek->rounds); in update_payload_2block()
162 state->ctr, NULL, ek->rounds, ks); in update_payload_2block()
167 state->ctr, ek->data, ek->rounds); in update_payload_2block()
A Daes_modes_armv8a_ce_a64.S15 .macro load_round_keys, rounds, rk
16 cmp \rounds, #12
27 .macro enc_prepare, rounds, rk, ignore
28 load_round_keys \rounds, \rk
33 load_round_keys \rounds, \rk
38 load_round_keys \rounds, \rk
87 cmp \rounds, #12
101 do_block_Nx e, \rounds, \in
105 do_block_Nx e, \rounds, \i0, \i1
113 do_block_Nx d, \rounds, \in
[all …]
/optee_os/core/lib/libtomcrypt/src/stream/salsa20/
A Dxsalsa20_setup.c31 static void _xsalsa20_doubleround(ulong32 *x, int rounds) in _xsalsa20_doubleround() argument
35 for (i = rounds; i > 0; i -= 2) { in _xsalsa20_doubleround()
63 int rounds) in xsalsa20_setup() argument
75 if (rounds == 0) rounds = 20; in xsalsa20_setup()
76 LTC_ARGCHK(rounds % 2 == 0); /* number of rounds must be evenly divisible by 2 */ in xsalsa20_setup()
97 _xsalsa20_doubleround(x, rounds); in xsalsa20_setup()
121 st->rounds = rounds; in xsalsa20_setup()
A Dsalsa20_setup.c32 int salsa20_setup(salsa20_state *st, const unsigned char *key, unsigned long keylen, int rounds) in salsa20_setup() argument
40 if (rounds == 0) rounds = 20; in salsa20_setup()
41 LTC_ARGCHK(rounds % 2 == 0); /* number of rounds must be evenly divisible by 2 */ in salsa20_setup()
61 st->rounds = rounds; /* default is 20 for salsa20 */ in salsa20_setup()
A Dsalsa20_test.c40 int rounds; in salsa20_test()
46 rounds = 12; in salsa20_test()
47 …if ((err = salsa20_setup(&st, k, sizeof(k), rounds)) != CRYPT_OK) return er… in salsa20_test()
57 rounds = 20; in salsa20_test()
58 if ((err = salsa20_setup(&st, k, sizeof(k), rounds)) != CRYPT_OK) return err; in salsa20_test()
64 if ((err = salsa20_memory(k, sizeof(k), rounds, n, sizeof(n), counter, in salsa20_test()
A Dxsalsa20_test.c46 int rounds = 20; in xsalsa20_test()
52 if ((err = xsalsa20_setup(&st, key, 32, nonce, 24, rounds)) != CRYPT_OK) return err; in xsalsa20_test()
56 if ((err = xsalsa20_setup(&st, key, 32, nonce, 24, rounds)) != CRYPT_OK) return err; in xsalsa20_test()
77 int rounds = 20; in xsalsa20_test()
84 if ((err = xsalsa20_setup(&st, key, 32, nonce, 24, rounds)) != CRYPT_OK) return err; in xsalsa20_test()
A Dxsalsa20_memory.c27 int xsalsa20_memory(const unsigned char *key, unsigned long keylen, unsigned long rounds, in xsalsa20_memory() argument
34 if ((err = xsalsa20_setup(&st, key, keylen, nonce, noncelen, rounds)) != CRYPT_OK) goto WIPE_KEY; in xsalsa20_memory()
A Dsalsa20_memory.c27 int salsa20_memory(const unsigned char *key, unsigned long keylen, unsigned long rounds, in salsa20_memory() argument
34 if ((err = salsa20_setup(&st, key, keylen, rounds)) != CRYPT_OK) goto WIPE_KEY; in salsa20_memory()
A Dsalsa20_crypt.c27 static void _salsa20_block(unsigned char *output, const ulong32 *input, int rounds) in _salsa20_block() argument
32 for (i = rounds; i > 0; i -= 2) { in _salsa20_block()
77 _salsa20_block(buf, st->input, st->rounds); in salsa20_crypt()
/optee_os/core/lib/libtomcrypt/
A Daes.c15 unsigned int *rounds) in crypto_aes_expand_enc_key() argument
19 enc_keylen, rounds); in crypto_aes_expand_enc_key()
30 *rounds = skey.rijndael.Nr; in crypto_aes_expand_enc_key()
36 unsigned int rounds, const void *src, void *dst) in crypto_aes_enc_block() argument
39 crypto_accel_aes_ecb_enc(dst, src, enc_key, rounds, 1); in crypto_aes_enc_block()
45 skey.rijndael.Nr = rounds; in crypto_aes_enc_block()
/optee_os/core/lib/libtomcrypt/src/stream/chacha/
A Dchacha_setup.c31 int chacha_setup(chacha_state *st, const unsigned char *key, unsigned long keylen, int rounds) in chacha_setup() argument
39 if (rounds == 0) rounds = 20; in chacha_setup()
59 st->rounds = rounds; /* e.g. 20 for chacha20 */ in chacha_setup()
A Dchacha_memory.c27 int chacha_memory(const unsigned char *key, unsigned long keylen, unsigned long rounds, in chacha_memory() argument
36 if ((err = chacha_setup(&st, key, keylen, rounds)) != CRYPT_OK) goto WIPE_KEY; in chacha_memory()
A Dchacha_crypt.c26 static void _chacha_block(unsigned char *output, const ulong32 *input, int rounds) in _chacha_block() argument
31 for (i = rounds; i > 0; i -= 2) { in _chacha_block()
76 _chacha_block(buf, st->input, st->rounds); in chacha_crypt()
/optee_os/lib/libmbedtls/core/
A Daes.c18 unsigned int *rounds) in crypto_aes_expand_enc_key() argument
22 enc_keylen, rounds); in crypto_aes_expand_enc_key()
34 *rounds = ctx.nr; in crypto_aes_expand_enc_key()
41 unsigned int rounds, const void *src, void *dst) in crypto_aes_enc_block() argument
44 crypto_accel_aes_ecb_enc(dst, src, enc_key, rounds, 1); in crypto_aes_enc_block()
54 ctx.nr = rounds; in crypto_aes_enc_block()
/optee_os/core/arch/arm/include/crypto/
A Dghash-ce-core.h25 void pmull_gcm_load_round_keys(const uint64_t rk[30], int rounds);
30 uint64_t ctr[], const uint64_t rk[], int rounds,
37 uint64_t ctr[], const uint64_t rk[], int rounds);
41 void pmull_gcm_encrypt_block(uint8_t dst[], const uint8_t src[], int rounds);
/optee_os/core/lib/libtomcrypt/src/ciphers/
A Drc5.c77 skey->rc5.rounds = num_rounds; in _rc5_setup()
146 if ((skey->rc5.rounds & 1) == 0) { in _rc5_ecb_encrypt()
147 for (r = 0; r < skey->rc5.rounds; r += 2) { in _rc5_ecb_encrypt()
155 for (r = 0; r < skey->rc5.rounds; r++) { in _rc5_ecb_encrypt()
198 K = skey->rc5.K + (skey->rc5.rounds << 1); in _rc5_ecb_decrypt()
200 if ((skey->rc5.rounds & 1) == 0) { in _rc5_ecb_decrypt()
202 for (r = skey->rc5.rounds - 1; r >= 0; r -= 2) { in _rc5_ecb_decrypt()
210 for (r = skey->rc5.rounds - 1; r >= 0; r--) { in _rc5_ecb_decrypt()
A Dkseed.c240 static void rounds(ulong32 *P, const ulong32 *K) in rounds() function
265 rounds(P, skey->kseed.K); in kseed_ecb_encrypt()
287 rounds(P, skey->kseed.dK); in kseed_ecb_decrypt()
A Dmulti2.c196 int rounds; in multi2_test() member
253 if ((err = multi2_setup(tests[x].key, 40, tests[x].rounds, &skey)) != CRYPT_OK) { in multi2_test()
/optee_os/core/crypto/
A Daes-gcm-sw.c19 crypto_aes_enc_block(ek->data, sizeof(ek->data), ek->rounds, in internal_aes_gcm_set_key()
64 enc_key->rounds, state->ctr, state->buf_cryp); in encrypt_block()
99 enc_key->rounds, state->ctr, buf_cryp); in decrypt_block()
A Daes-gcm.c95 crypto_aes_enc_block(ek->data, sizeof(ek->data), ek->rounds, in __gcm_init()
116 crypto_aes_enc_block(ek->data, sizeof(ek->data), ek->rounds, in __gcm_init()
133 sizeof(ek->data), &ek->rounds); in internal_aes_gcm_init()
216 ek->rounds, state->ctr, in __gcm_update_payload()
241 ek->rounds, state->ctr, in __gcm_update_payload()
/optee_os/core/lib/libtomcrypt/src/headers/
A Dtomcrypt_cipher.h25 int rounds; member
39 long rounds; member
1003 int rounds; member
1006 int chacha_setup(chacha_state *st, const unsigned char *key, unsigned long keylen, int rounds);
1013 int chacha_memory(const unsigned char *key, unsigned long keylen, unsigned long rounds,
1026 int rounds; member
1029 int salsa20_setup(salsa20_state *st, const unsigned char *key, unsigned long keylen, int rounds);
1035 int salsa20_memory(const unsigned char *key, unsigned long keylen, unsigned long rounds,
1045 int rounds);
1047 int xsalsa20_memory(const unsigned char *key, unsigned long keylen, unsigned long rounds,
/optee_os/core/lib/libtomcrypt/src/encauth/chachapoly/
A Dchacha20poly1305_setiv.c44 tmp_st.rounds = 20; in chacha20poly1305_setiv()
/optee_os/lib/libmbedtls/mbedtls/library/
A Dhmac_drbg.c67 unsigned char rounds = ( additional != NULL && add_len != 0 ) ? 2 : 1; in mbedtls_hmac_drbg_update_ret() local
72 for( sep[0] = 0; sep[0] < rounds; sep[0]++ ) in mbedtls_hmac_drbg_update_ret()
83 if( rounds == 2 ) in mbedtls_hmac_drbg_update_ret()

Completed in 109 milliseconds

12