/optee_os/core/lib/libtomcrypt/src/stream/rabbit/ |
A D | rabbit.c | 100 ulong32 g[8], c_old[8], i; in _rabbit_next_state() local 120 g[i] = _rabbit_g_func((ulong32)(p_instance->x[i] + p_instance->c[i])); in _rabbit_next_state() 124 p_instance->x[0] = (ulong32)(g[0] + ROLc(g[7],16) + ROLc(g[6], 16)); in _rabbit_next_state() 125 p_instance->x[1] = (ulong32)(g[1] + ROLc(g[0], 8) + g[7]); in _rabbit_next_state() 126 p_instance->x[2] = (ulong32)(g[2] + ROLc(g[1],16) + ROLc(g[0], 16)); in _rabbit_next_state() 127 p_instance->x[3] = (ulong32)(g[3] + ROLc(g[2], 8) + g[1]); in _rabbit_next_state() 128 p_instance->x[4] = (ulong32)(g[4] + ROLc(g[3],16) + ROLc(g[2], 16)); in _rabbit_next_state() 129 p_instance->x[5] = (ulong32)(g[5] + ROLc(g[4], 8) + g[3]); in _rabbit_next_state() 130 p_instance->x[6] = (ulong32)(g[6] + ROLc(g[5],16) + ROLc(g[4], 16)); in _rabbit_next_state() 131 p_instance->x[7] = (ulong32)(g[7] + ROLc(g[6], 8) + g[5]); in _rabbit_next_state()
|
/optee_os/core/lib/libtomcrypt/ |
A D | dsa.c | 20 if (!bn_alloc_max(&s->g)) in crypto_acipher_alloc_dsa_keypair() 33 crypto_bignum_free(s->g); in crypto_acipher_alloc_dsa_keypair() 44 if (!bn_alloc_max(&s->g)) in crypto_acipher_alloc_dsa_public_key() 55 crypto_bignum_free(s->g); in crypto_acipher_alloc_dsa_public_key() 69 ltc_res = mp_init_multi(<c_tmp_key.g, <c_tmp_key.p, <c_tmp_key.q, in crypto_acipher_gen_dsa_key() 75 mp_copy(key->g, ltc_tmp_key.g); in crypto_acipher_gen_dsa_key() 105 .qord = mp_unsigned_bin_size(key->g), in crypto_acipher_dsa_sign() 106 .g = key->g, in crypto_acipher_dsa_sign() 173 .qord = mp_unsigned_bin_size(key->g), in crypto_acipher_dsa_verify() 174 .g = key->g, in crypto_acipher_dsa_verify()
|
A D | dh.c | 19 if (!bn_alloc_max(&s->g)) in crypto_acipher_alloc_dh_keypair() 31 crypto_bignum_free(s->g); in crypto_acipher_alloc_dh_keypair() 53 mp_copy(key->g, ltc_tmp_key.base); in crypto_acipher_gen_dh_key()
|
/optee_os/scripts/ |
A D | update_changelog.py | 77 for g in gits: 78 gu = g.replace('/', '_') 82 "[{}_pr_{}]\n".format(g, gu, rvu, gu, rvu, gu, rvu) 86 for g in gits: 87 gu = g.replace('/', '_') 90 "{}\n".format(gu, rvu, g, rv) 92 "{}...{}\n".format(gu, rvu, g, prv, rv) 95 gu, rvu, g, prd, rd)
|
/optee_os/core/drivers/crypto/caam/acipher/ |
A D | caam_dsa.c | 52 caam_free_buf(&key->g); in do_keypair_free() 103 prime.g = &outkey->g; in get_keypair_domain_params() 115 crypto_bignum_bin2bn(outkey->g.data, outkey->g.length, key->g); in get_keypair_domain_params() 130 outkey->g.length); in get_keypair_domain_params() 167 crypto_bignum_bn2bin(inkey->g, outkey->g.data + l_bytes - field_size); in do_keypriv_conv() 196 cache_operation(TEE_CACHECLEAN, outkey->g.data, outkey->g.length); in do_keypriv_conv() 229 crypto_bignum_bn2bin(inkey->g, outkey->g.data + l_bytes - field_size); in do_keypub_conv() 258 cache_operation(TEE_CACHECLEAN, outkey->g.data, outkey->g.length); in do_keypub_conv() 284 if (!key->g) in do_allocate_keypair() 312 crypto_bignum_free(key->g); in do_allocate_keypair() [all …]
|
A D | caam_dh.c | 31 struct caambuf g; /* Generator */ member 44 caam_free_buf(&key->g); in do_keypair_free() 77 retstatus = caam_calloc_buf(&outkey->g, p_size); in do_keypair_conv_p_g() 82 field_size = crypto_bignum_num_bytes(inkey->g); in do_keypair_conv_p_g() 83 crypto_bignum_bn2bin(inkey->g, outkey->g.data + p_size - field_size); in do_keypair_conv_p_g() 84 cache_operation(TEE_CACHECLEAN, outkey->g.data, outkey->g.length); in do_keypair_conv_p_g() 169 key->g = crypto_bignum_allocate(size_bits); in do_allocate_keypair() 170 if (!key->g) in do_allocate_keypair() 198 crypto_bignum_free(key->g); in do_allocate_keypair() 303 caam_desc_add_ptr(desc, caam_dh_key.g.paddr); in do_gen_keypair()
|
A D | caam_prime_dsa.c | 651 caam_desc_add_word(desc, FIFO_ST(PKHA_A, prime->g->length)); in do_generator() 652 caam_desc_add_ptr(desc, prime->g->paddr); in do_generator() 656 cache_operation(TEE_CACHEFLUSH, prime->g->data, prime->g->length); in do_generator() 667 cache_operation(TEE_CACHEINVALIDATE, prime->g->data, prime->g->length); in do_generator() 668 DSA_DUMPBUF("Generator G", prime->g->data, prime->g->length); in do_generator()
|
/optee_os/core/lib/libtomcrypt/src/ciphers/safer/ |
A D | safer.c | 258 { unsigned char a, b, c, d, e, f, g, h, t; in _safer_ecb_encrypt() local 268 e = pt[4]; f = pt[5]; g = pt[6]; h = pt[7]; in _safer_ecb_encrypt() 277 g = LOG(g) ^ *++key; h = EXP(h) + *++key; in _safer_ecb_encrypt() 278 PHT(a, b); PHT(c, d); PHT(e, f); PHT(g, h); in _safer_ecb_encrypt() 281 t = b; b = e; e = c; c = t; t = d; d = f; f = g; g = t; in _safer_ecb_encrypt() 288 ct[6] = g & 0xFF; ct[7] = h & 0xFF; in _safer_ecb_encrypt() 312 { unsigned char a, b, c, d, e, f, g, h, t; in _safer_ecb_decrypt() local 322 e = ct[4]; f = ct[5]; g = ct[6]; h = ct[7]; in _safer_ecb_decrypt() 329 t = e; e = b; b = c; c = t; t = f; f = d; d = g; g = t; in _safer_ecb_decrypt() 335 h = LOG(h) ^ *--key; g = EXP(g) - *--key; in _safer_ecb_decrypt() [all …]
|
/optee_os/core/lib/libtomcrypt/src/math/fp/ |
A D | ltc_ecc_fp_mulmod.c | 595 if (z >= 0 && fp_cache[z].g) { in _find_hole() 601 fp_cache[z].g = NULL; in _find_hole() 616 if (fp_cache[x].g != NULL && in _find_base() 617 mp_cmp(fp_cache[x].g->x, g->x) == LTC_MP_EQ && in _find_base() 618 mp_cmp(fp_cache[x].g->y, g->y) == LTC_MP_EQ && in _find_base() 619 mp_cmp(fp_cache[x].g->z, g->z) == LTC_MP_EQ) { in _find_base() 636 if (fp_cache[idx].g == NULL) { in _add_entry() 641 if ((mp_copy(g->x, fp_cache[idx].g->x) != CRYPT_OK) || in _add_entry() 642 (mp_copy(g->y, fp_cache[idx].g->y) != CRYPT_OK) || in _add_entry() 643 (mp_copy(g->z, fp_cache[idx].g->z) != CRYPT_OK)) { in _add_entry() [all …]
|
/optee_os/core/lib/libtomcrypt/src/pk/dsa/ |
A D | dsa_set.c | 28 const unsigned char *g, unsigned long glen, in dsa_set_pqg() argument 35 LTC_ARGCHK(g != NULL); in dsa_set_pqg() 40 err = mp_init_multi(&key->p, &key->g, &key->q, &key->x, &key->y, NULL); in dsa_set_pqg() 44 … if ((err = mp_read_unsigned_bin(key->g, (unsigned char *)g , glen)) != CRYPT_OK) { goto LBL_ERR; } in dsa_set_pqg() 82 LTC_ARGCHK(key->g != NULL); in dsa_set_key() 89 …if ((err = mp_exptmod(key->g, key->x, key->p, key->y)) != CRYPT_OK) { goto LBL_ERR; } in dsa_set_key()
|
A D | dsa_import.c | 38 if (mp_init_multi(&key->p, &key->g, &key->q, &key->x, &key->y, NULL) != CRYPT_OK) { in dsa_import() 51 LTC_ASN1_INTEGER, 1UL, key->g, in dsa_import() 66 LTC_ASN1_INTEGER, 1UL, key->g, in dsa_import() 86 LTC_ASN1_INTEGER, 1UL, key->g, in dsa_import() 98 LTC_SET_ASN1(params, 2, LTC_ASN1_INTEGER, key->g, 1UL); in dsa_import()
|
A D | dsa_export.c | 50 LTC_ASN1_INTEGER, 1UL, key->g, in dsa_export() 58 LTC_ASN1_INTEGER, 1UL, key->g, in dsa_export() 83 LTC_SET_ASN1(int_list, 2, LTC_ASN1_INTEGER, key->g, 1UL); in dsa_export() 96 LTC_ASN1_INTEGER, 1UL, key->g, in dsa_export()
|
A D | dsa_verify_key.c | 68 if (mp_cmp_d(key->g, 1) != LTC_MP_GT || mp_cmp(key->g, key->p) != LTC_MP_LT) { in dsa_int_validate_pqg() 85 if ((err = mp_exptmod(key->g, key->q, key->p, tmp1)) != CRYPT_OK) { goto error; } in dsa_int_validate_pqg() 168 if ((err = mp_exptmod(key->g, key->x, key->p, tmp)) != CRYPT_OK) { in dsa_int_validate_xy()
|
A D | dsa_generate_pqg.c | 30 …ke_params(prng_state *prng, int wprng, int group_size, int modulus_size, void *p, void *q, void *g) in _dsa_make_params() argument 192 if ((err = mp_exptmod(h, e, p, g)) != CRYPT_OK) { goto cleanup; } in _dsa_make_params() 193 } while (mp_cmp_d(g, 1) == LTC_MP_EQ); in _dsa_make_params() 223 if ((err = mp_init_multi(&key->p, &key->g, &key->q, &key->x, &key->y, NULL)) != CRYPT_OK) { in dsa_generate_pqg() 227 err = _dsa_make_params(prng, wprng, group_size, modulus_size, key->p, key->q, key->g); in dsa_generate_pqg()
|
A D | dsa_set_pqg_dsaparam.c | 35 err = mp_init_multi(&key->p, &key->g, &key->q, &key->x, &key->y, NULL); in dsa_set_pqg_dsaparam() 41 LTC_ASN1_INTEGER, 1UL, key->g, in dsa_set_pqg_dsaparam()
|
/optee_os/core/lib/libtomcrypt/src/misc/base64/ |
A D | base64_decode.c | 91 int g; in _base64_decode_internal() local 97 g = 0; /* '=' counter */ in _base64_decode_internal() 104 g++; in _base64_decode_internal() 119 if ((g > 0) && (mode != insane)) { in _base64_decode_internal() 137 if (((y + g) != 4) && (mode == strict) && (map != map_base64url)) return CRYPT_INVALID_PACKET; in _base64_decode_internal()
|
/optee_os/lib/libmbedtls/core/ |
A D | dh.c | 21 s->g = crypto_bignum_allocate(key_size_bits); in crypto_acipher_alloc_dh_keypair() 22 if (!s->g) in crypto_acipher_alloc_dh_keypair() 38 crypto_bignum_free(s->g); in crypto_acipher_alloc_dh_keypair() 58 dhm.G = *(mbedtls_mpi *)key->g; in crypto_acipher_gen_dh_key() 109 dhm.G = *(mbedtls_mpi *)private_key->g; in crypto_acipher_dh_shared_secret()
|
/optee_os/core/lib/zlib/ |
A D | zlib.h | 1826 # define z_gzgetc(g) \ argument 1827 ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) 1829 # define gzgetc(g) \ argument 1830 ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
|
/optee_os/core/lib/libtomcrypt/src/pk/dh/ |
A D | dh_set.c | 26 const unsigned char *g, unsigned long glen, in dh_set_pg() argument 33 LTC_ARGCHK(g != NULL); in dh_set_pg() 40 …if ((err = mp_read_unsigned_bin(key->base, (unsigned char*)g, glen)) != CRYPT_OK) { goto LBL_E… in dh_set_pg()
|
/optee_os/out/arm/export-ta_arm32/host_include/mbedtls/ |
A D | asn1write.h | 33 #define MBEDTLS_ASN1_CHK_ADD(g, f) \ argument 39 (g) += ret; \
|
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
A D | asn1write.h | 33 #define MBEDTLS_ASN1_CHK_ADD(g, f) \ argument 39 (g) += ret; \
|
/optee_os/out/arm/export-ta_arm64/include/mbedtls/ |
A D | asn1write.h | 33 #define MBEDTLS_ASN1_CHK_ADD(g, f) \ argument 39 (g) += ret; \
|
/optee_os/out/arm/export-ta_arm32/include/mbedtls/ |
A D | asn1write.h | 33 #define MBEDTLS_ASN1_CHK_ADD(g, f) \ argument 39 (g) += ret; \
|
/optee_os/out/arm/export-ta_arm64/host_include/mbedtls/ |
A D | asn1write.h | 33 #define MBEDTLS_ASN1_CHK_ADD(g, f) \ argument 39 (g) += ret; \
|
/optee_os/core/lib/libtomcrypt/src/ciphers/twofish/ |
A D | twofish.c | 297 unsigned char g, i, y, z; in _g_func() local 305 g = sbox(qord[y][z++], (x >> (8*y)) & 255); in _g_func() 312 g = g ^ key->twofish.S[4*i++ + y]; in _g_func() 313 g = sbox(qord[y][z++], g); in _g_func() 317 res ^= mds_column_mult(g, y); in _g_func()
|