Home
last modified time | relevance | path

Searched refs:seed (Results 1 – 21 of 21) sorted by relevance

/optee_os/core/lib/libtomcrypt/src/pk/pkcs1/
A Dpkcs_1_oaep_decode.c38 unsigned char *DB, *seed, *mask; in pkcs_1_oaep_decode() local
65 seed = XMALLOC(hLen); in pkcs_1_oaep_decode()
66 if (DB == NULL || mask == NULL || seed == NULL) { in pkcs_1_oaep_decode()
73 if (seed != NULL) { in pkcs_1_oaep_decode()
74 XFREE(seed); in pkcs_1_oaep_decode()
96 XMEMCPY(seed, msg + x, hLen); in pkcs_1_oaep_decode()
110 seed[y] ^= mask[y]; in pkcs_1_oaep_decode()
133 if ((err = hash_memory(hash_idx, DB, 0, seed, &x)) != CRYPT_OK) { in pkcs_1_oaep_decode()
139 if (XMEM_NEQ(seed, DB, hLen) != 0) { in pkcs_1_oaep_decode()
171 zeromem(seed, hLen); in pkcs_1_oaep_decode()
[all …]
A Dpkcs_1_oaep_encode.c39 unsigned char *DB, *seed, *mask; in pkcs_1_oaep_encode() local
68 seed = XMALLOC(hLen); in pkcs_1_oaep_encode()
69 if (DB == NULL || mask == NULL || seed == NULL) { in pkcs_1_oaep_encode()
76 if (seed != NULL) { in pkcs_1_oaep_encode()
77 XFREE(seed); in pkcs_1_oaep_encode()
110 if (prng_descriptor[prng_idx]->read(seed, hLen, prng) != hLen) { in pkcs_1_oaep_encode()
116 if ((err = pkcs_1_mgf1(hash_idx, seed, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) { in pkcs_1_oaep_encode()
132 seed[y] ^= mask[y]; in pkcs_1_oaep_encode()
145 XMEMCPY(out+x, seed, hLen); in pkcs_1_oaep_encode()
156 zeromem(seed, hLen); in pkcs_1_oaep_encode()
[all …]
A Dpkcs_1_mgf1.c29 const unsigned char *seed, unsigned long seedlen, in pkcs_1_mgf1() argument
38 LTC_ARGCHK(seed != NULL); in pkcs_1_mgf1()
74 if ((err = hash_descriptor[hash_idx]->process(md, seed, seedlen)) != CRYPT_OK) { in pkcs_1_mgf1()
/optee_os/core/arch/arm/plat-stm32mp1/
A Drng_seed.c27 uint8_t seed[PRNG_SEED_SIZE] = { }; in plat_rng_init() local
44 size = sizeof(seed); in plat_rng_init()
45 if (stm32_rng_read_raw(rng, seed, &size)) in plat_rng_init()
47 if (size != sizeof(seed)) in plat_rng_init()
50 if (crypto_rng_init(seed, sizeof(seed))) in plat_rng_init()
/optee_os/core/arch/arm/plat-rcar/
A Dmain.c70 unsigned long seed = 0; in plat_get_aslr_seed() local
74 for (i = 0; i < sizeof(seed); i++) in plat_get_aslr_seed()
75 seed = (seed << 8) | hw_get_random_byte(); in plat_get_aslr_seed()
77 return seed; in plat_get_aslr_seed()
/optee_os/core/drivers/crypto/crypto_api/acipher/
A Drsamgf.c26 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 Drsassa.c444 mgf_data.seed.data = hash.data; in emsa_pss_encode()
445 mgf_data.seed.length = hash.length; in emsa_pss_encode()
587 mgf_data.seed.data = hash.data; in emsa_pss_verify()
588 mgf_data.seed.length = hash.length; in emsa_pss_verify()
/optee_os/core/drivers/crypto/caam/acipher/
A Dcaam_prime_dsa.c86 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 Dcaam_rsa.c708 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/lib/libmbedtls/mbedtls/library/
A Dctr_drbg.c369 unsigned char seed[MBEDTLS_CTR_DRBG_MAX_SEED_INPUT]; in mbedtls_ctr_drbg_reseed_internal() local
380 memset( seed, 0, MBEDTLS_CTR_DRBG_MAX_SEED_INPUT ); in mbedtls_ctr_drbg_reseed_internal()
383 if( 0 != ctx->f_entropy( ctx->p_entropy, seed, ctx->entropy_len ) ) in mbedtls_ctr_drbg_reseed_internal()
392 if( 0 != ctx->f_entropy( ctx->p_entropy, seed + seedlen, nonce_len ) ) in mbedtls_ctr_drbg_reseed_internal()
402 memcpy( seed + seedlen, additional, len ); in mbedtls_ctr_drbg_reseed_internal()
407 if( ( ret = block_cipher_df( seed, seed, seedlen ) ) != 0 ) in mbedtls_ctr_drbg_reseed_internal()
411 if( ( ret = ctr_drbg_update_internal( ctx, seed ) ) != 0 ) in mbedtls_ctr_drbg_reseed_internal()
416 mbedtls_platform_zeroize( seed, sizeof( seed ) ); in mbedtls_ctr_drbg_reseed_internal()
A Dhmac_drbg.c157 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 Dssl_tls.c517 const unsigned char* seed, size_t seed_length, in setup_psa_key_derivation() argument
531 seed, seed_length ); in setup_psa_key_derivation()
/optee_os/core/arch/arm/kernel/
A Dlink_dummies_init.c16 core_init_mmu_map(unsigned long seed __unused, in core_init_mmu_map()
A Dboot.c1408 const uint64_t *seed = NULL; in get_aslr_seed() local
1422 seed = fdt_getprop(fdt, offs, "kaslr-seed", &len); in get_aslr_seed()
1423 if (!seed || len != sizeof(*seed)) { in get_aslr_seed()
1428 return fdt64_to_cpu(*seed); in get_aslr_seed()
/optee_os/core/lib/libtomcrypt/src/headers/
A Dtomcrypt_pkcs.h31 const unsigned char *seed, unsigned long seedlen,
/optee_os/core/drivers/crypto/crypto_api/include/
A Ddrvcrypt_acipher.h39 struct drvcrypt_buf seed; /* Seed to generate mask */ member
/optee_os/core/arch/arm/mm/
A Dcore_mmu.c1096 size_t num_elems, unsigned long seed) in init_mem_map() argument
1119 if (IS_ENABLED(CFG_CORE_ASLR) && seed) { in init_mem_map()
1120 vaddr_t base_addr = TEE_RAM_START + seed; in init_mem_map()
1142 EMSG("Failed to map core with seed %#lx", seed); in init_mem_map()
1228 void __weak core_init_mmu_map(unsigned long seed, struct core_mmu_config *cfg) in core_init_mmu_map() argument
1256 offs = init_mem_map(tmp_mmap, ARRAY_SIZE(static_memory_map), seed); in core_init_mmu_map()
/optee_os/core/arch/arm/include/mm/
A Dcore_mmu.h342 void core_init_mmu_map(unsigned long seed, struct core_mmu_config *cfg);
/optee_os/lib/libutils/isoc/
A Dbget.c1418 static void mysrand(unsigned int seed) in mysrand() argument
1420 next = seed; in mysrand()
/optee_os/ta/pkcs11/src/
A Dpkcs11_token.c1484 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/lib/libmbedtls/mbedtls/
A DChangeLog71 lead to seed file corruption in the case where the path to the seed file is
455 * In CTR_DRBG and HMAC_DRBG, don't reset the reseed interval in seed().
3207 * Entropy module now supports seed writing and reading
3513 * Entropy module now supports seed writing and reading

Completed in 58 milliseconds