/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/pkcs1/ |
A D | pkcs_1_oaep_decode.c | 31 unsigned char *DB, *seed, *mask; in pkcs_1_oaep_decode() local 58 seed = XMALLOC(hLen); in pkcs_1_oaep_decode() 59 if (DB == NULL || mask == NULL || seed == NULL) { in pkcs_1_oaep_decode() 66 if (seed != NULL) { in pkcs_1_oaep_decode() 67 XFREE(seed); in pkcs_1_oaep_decode() 89 XMEMCPY(seed, msg + x, hLen); in pkcs_1_oaep_decode() 103 seed[y] ^= mask[y]; in pkcs_1_oaep_decode() 126 if ((err = hash_memory(hash_idx, DB, 0, seed, &x)) != CRYPT_OK) { in pkcs_1_oaep_decode() 132 if (XMEM_NEQ(seed, DB, hLen) != 0) { in pkcs_1_oaep_decode() 164 zeromem(seed, hLen); in pkcs_1_oaep_decode() [all …]
|
A D | pkcs_1_oaep_encode.c | 32 unsigned char *DB, *seed, *mask; in pkcs_1_oaep_encode() local 61 seed = XMALLOC(hLen); in pkcs_1_oaep_encode() 62 if (DB == NULL || mask == NULL || seed == NULL) { in pkcs_1_oaep_encode() 69 if (seed != NULL) { in pkcs_1_oaep_encode() 70 XFREE(seed); in pkcs_1_oaep_encode() 103 if (prng_descriptor[prng_idx]->read(seed, hLen, prng) != hLen) { in pkcs_1_oaep_encode() 109 if ((err = pkcs_1_mgf1(hash_idx, seed, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) { in pkcs_1_oaep_encode() 125 seed[y] ^= mask[y]; in pkcs_1_oaep_encode() 138 XMEMCPY(out+x, seed, hLen); in pkcs_1_oaep_encode() 149 zeromem(seed, hLen); in pkcs_1_oaep_encode() [all …]
|
A D | pkcs_1_mgf1.c | 22 const unsigned char *seed, unsigned long seedlen, in pkcs_1_mgf1() argument 31 LTC_ARGCHK(seed != NULL); in pkcs_1_mgf1() 67 if ((err = hash_descriptor[hash_idx]->process(md, seed, seedlen)) != CRYPT_OK) { in pkcs_1_mgf1()
|
/optee_os-3.20.0/core/arch/arm/plat-rcar/ |
A D | main.c | 81 unsigned long seed = 0; in plat_get_aslr_seed() local 84 if (crypto_rng_read(&seed, sizeof(seed))) in plat_get_aslr_seed() 87 return seed; in plat_get_aslr_seed()
|
/optee_os-3.20.0/core/drivers/crypto/crypto_api/acipher/ |
A D | rsamgf.c | 26 mgf_data->mask.length, mgf_data->seed.length); in drvcrypt_rsa_mgf1() 56 ret = crypto_hash_update(ctx, mgf_data->seed.data, in drvcrypt_rsa_mgf1() 57 mgf_data->seed.length); in drvcrypt_rsa_mgf1() 80 ret = crypto_hash_update(ctx, mgf_data->seed.data, in drvcrypt_rsa_mgf1() 81 mgf_data->seed.length); in drvcrypt_rsa_mgf1()
|
A D | rsassa.c | 446 mgf_data.seed.data = hash.data; in emsa_pss_encode() 447 mgf_data.seed.length = hash.length; in emsa_pss_encode() 589 mgf_data.seed.data = hash.data; in emsa_pss_verify() 590 mgf_data.seed.length = hash.length; in emsa_pss_verify()
|
/optee_os-3.20.0/core/drivers/crypto/caam/acipher/ |
A D | caam_prime_dsa.c | 86 if (seed->length > 16) { in do_desc_prime_q() 93 RND, seed->length - 16)); in do_desc_prime_q() 97 MSG, RND, seed->length)); in do_desc_prime_q() 102 caam_desc_add_ptr(desc, seed->paddr); in do_desc_prime_q() 266 caam_desc_add_ptr(desc, seed->paddr); in do_desc_gen_x() 269 caam_desc_add_ptr(desc, seed->paddr); in do_desc_gen_x() 297 MOVE_WAIT(OFIFO, IFIFO_C2_LC2, 0, seed->length)); in do_desc_gen_x() 680 struct caambuf seed = { }; in caam_prime_dsa_gen() local 724 do_desc_prime_q(desc_q, &seed, data, &hash_func); in caam_prime_dsa_gen() 730 cache_operation(TEE_CACHEFLUSH, seed.data, seed.length); in caam_prime_dsa_gen() [all …]
|
A D | caam_rsa.c | 708 struct caambuf seed = { }; in do_oaep_decoding() local 846 mod_op.b.data = seed.data; in do_oaep_decoding() 857 RSA_DUMPBUF("Seed", seed.data, seed.length); in do_oaep_decoding() 864 mgf_data.seed.data = seed.data; in do_oaep_decoding() 865 mgf_data.seed.length = seed.length; in do_oaep_decoding() 939 caam_free_buf(&seed); in do_oaep_decoding() 1046 ret = crypto_rng_read(seed.data, seed.length); in do_oaep_encoding() 1052 RSA_DUMPBUF("Seed", seed.data, seed.length); in do_oaep_encoding() 1061 mgf_data.seed.data = seed.data; in do_oaep_encoding() 1062 mgf_data.seed.length = seed.length; in do_oaep_encoding() [all …]
|
/optee_os-3.20.0/core/drivers/ |
A D | smccc_trng.c | 204 uint8_t seed[32] = { 0 }; in plat_rng_init() local 206 if (smccc_trng_read(seed, sizeof(seed))) in plat_rng_init() 209 if (crypto_rng_init(seed, sizeof(seed))) in plat_rng_init()
|
A D | stm32_rng.c | 207 uint8_t seed[RNG_FIFO_BYTE_DEPTH] = { }; in plat_rng_init() local 209 if (stm32_rng_read(seed, sizeof(seed))) in plat_rng_init() 212 if (crypto_rng_init(seed, sizeof(seed))) in plat_rng_init()
|
A D | versal_trng.c | 658 uint8_t *seed = NULL; in trng_reseed_internal_nodf() local 673 seed = entropy; in trng_reseed_internal_nodf() 676 seed = eseed; in trng_reseed_internal_nodf() 679 seed = NULL; in trng_reseed_internal_nodf() 683 trng_write32_range(trng, TRNG_EXT_SEED_0, TRNG_SEED_REGS, seed); in trng_reseed_internal_nodf() 771 uint8_t *seed = NULL; in trng_instantiate() local 813 seed = (void *)trng->usr_cfg.init_seed; in trng_instantiate() 819 if (trng_reseed_internal(trng, seed, pers, trng->usr_cfg.dfmul)) in trng_instantiate()
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/ |
A D | ctr_drbg.c | 366 unsigned char seed[MBEDTLS_CTR_DRBG_MAX_SEED_INPUT]; in mbedtls_ctr_drbg_reseed_internal() local 377 memset( seed, 0, MBEDTLS_CTR_DRBG_MAX_SEED_INPUT ); in mbedtls_ctr_drbg_reseed_internal() 380 if( 0 != ctx->f_entropy( ctx->p_entropy, seed, ctx->entropy_len ) ) in mbedtls_ctr_drbg_reseed_internal() 389 if( 0 != ctx->f_entropy( ctx->p_entropy, seed + seedlen, nonce_len ) ) in mbedtls_ctr_drbg_reseed_internal() 399 memcpy( seed + seedlen, additional, len ); in mbedtls_ctr_drbg_reseed_internal() 404 if( ( ret = block_cipher_df( seed, seed, seedlen ) ) != 0 ) in mbedtls_ctr_drbg_reseed_internal() 408 if( ( ret = ctr_drbg_update_internal( ctx, seed ) ) != 0 ) in mbedtls_ctr_drbg_reseed_internal() 413 mbedtls_platform_zeroize( seed, sizeof( seed ) ); in mbedtls_ctr_drbg_reseed_internal()
|
A D | hmac_drbg.c | 157 unsigned char seed[MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT]; in hmac_drbg_reseed_core() local 177 memset( seed, 0, MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT ); in hmac_drbg_reseed_core() 181 seed, ctx->entropy_len ) ) != 0 ) in hmac_drbg_reseed_core() 199 seed + seedlen, in hmac_drbg_reseed_core() 212 memcpy( seed + seedlen, additional, len ); in hmac_drbg_reseed_core() 217 if( ( ret = mbedtls_hmac_drbg_update_ret( ctx, seed, seedlen ) ) != 0 ) in hmac_drbg_reseed_core() 225 mbedtls_platform_zeroize( seed, seedlen ); in hmac_drbg_reseed_core()
|
A D | ssl_tls.c | 561 const unsigned char* seed, size_t seed_length, in setup_psa_key_derivation() argument 575 seed, seed_length ); in setup_psa_key_derivation()
|
/optee_os-3.20.0/core/arch/arm/kernel/ |
A D | link_dummies_init.c | 16 core_init_mmu_map(unsigned long seed __unused, in core_init_mmu_map()
|
A D | boot.c | 1506 const uint64_t *seed = NULL; in get_aslr_seed() local 1520 seed = fdt_getprop(fdt, offs, "kaslr-seed", &len); in get_aslr_seed() 1521 if (!seed || len != sizeof(*seed)) { in get_aslr_seed() 1526 return fdt64_to_cpu(*seed); in get_aslr_seed()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/headers/ |
A D | tomcrypt_pkcs.h | 24 const unsigned char *seed, unsigned long seedlen,
|
/optee_os-3.20.0/core/drivers/crypto/crypto_api/include/ |
A D | drvcrypt_acipher.h | 39 struct drvcrypt_buf seed; /* Seed to generate mask */ member
|
/optee_os-3.20.0/core/mm/ |
A D | core_mmu.c | 1205 size_t num_elems, unsigned long seed) in init_mem_map() argument 1228 if (IS_ENABLED(CFG_CORE_ASLR) && seed) { in init_mem_map() 1229 vaddr_t base_addr = TEE_RAM_START + seed; in init_mem_map() 1251 EMSG("Failed to map core with seed %#lx", seed); in init_mem_map() 1337 void __weak core_init_mmu_map(unsigned long seed, struct core_mmu_config *cfg) in core_init_mmu_map() argument 1365 offs = init_mem_map(tmp_mmap, ARRAY_SIZE(static_memory_map), seed); in core_init_mmu_map()
|
/optee_os-3.20.0/core/include/mm/ |
A D | core_mmu.h | 276 void core_init_mmu_map(unsigned long seed, struct core_mmu_config *cfg);
|
/optee_os-3.20.0/lib/libutils/isoc/ |
A D | bget.c | 1421 static void mysrand(unsigned int seed) in mysrand() argument 1423 next = seed; in mysrand()
|
/optee_os-3.20.0/ta/pkcs11/src/ |
A D | pkcs11_token.c | 1484 static TEE_Result seed_rng_pool(void *seed, size_t length) in seed_rng_pool() argument 1496 params[0].memref.buffer = seed; in seed_rng_pool()
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/ |
A D | ChangeLog | 286 lead to seed file corruption in the case where the path to the seed file is 670 * In CTR_DRBG and HMAC_DRBG, don't reset the reseed interval in seed(). 3422 * Entropy module now supports seed writing and reading 3728 * Entropy module now supports seed writing and reading
|
/optee_os-3.20.0/core/arch/riscv/include/ |
A D | encoding.h | 4517 DECLARE_CSR(seed, CSR_SEED)
|