Home
last modified time | relevance | path

Searched refs:size_bits (Results 1 – 23 of 23) sorted by relevance

/optee_os/core/drivers/crypto/crypto_api/acipher/
H A Ddsa.c22 static TEE_Result get_keys_size(size_t size_bits, size_t *l_bits, in get_keys_size() argument
25 if (size_bits <= 1024) in get_keys_size()
27 else if (size_bits <= 3072) in get_keys_size()
32 *l_bits = size_bits; in get_keys_size()
38 size_t size_bits) in crypto_acipher_alloc_dsa_keypair() argument
45 if (!key || !size_bits) { in crypto_acipher_alloc_dsa_keypair()
47 (uintptr_t)key, size_bits); in crypto_acipher_alloc_dsa_keypair()
51 ret = get_keys_size(size_bits, &l_bits, &n_bits); in crypto_acipher_alloc_dsa_keypair()
60 CRYPTO_TRACE("DSA Keypair (%zu bits) alloc ret = 0x%" PRIx32, size_bits, in crypto_acipher_alloc_dsa_keypair()
66 size_t size_bits) in crypto_acipher_alloc_dsa_public_key() argument
[all …]
H A Ddh.c13 size_t size_bits) in crypto_acipher_alloc_dh_keypair() argument
18 if (!key || !size_bits) { in crypto_acipher_alloc_dh_keypair()
20 (uintptr_t)key, size_bits); in crypto_acipher_alloc_dh_keypair()
26 ret = dh->alloc_keypair(key, size_bits); in crypto_acipher_alloc_dh_keypair()
28 CRYPTO_TRACE("DH Keypair (%zu bits) alloc ret = 0x%" PRIx32, size_bits, in crypto_acipher_alloc_dh_keypair()
H A Drsa.c18 size_t size_bits) in crypto_acipher_alloc_rsa_keypair() argument
24 if (!key || !size_bits) { in crypto_acipher_alloc_rsa_keypair()
26 size_bits); in crypto_acipher_alloc_rsa_keypair()
32 ret = rsa->alloc_keypair(key, size_bits); in crypto_acipher_alloc_rsa_keypair()
34 CRYPTO_TRACE("RSA Keypair (%zu bits) alloc ret = 0x%" PRIx32, size_bits, in crypto_acipher_alloc_rsa_keypair()
40 size_t size_bits) in crypto_acipher_alloc_rsa_public_key() argument
45 if (!key || !size_bits) { in crypto_acipher_alloc_rsa_public_key()
47 size_bits); in crypto_acipher_alloc_rsa_public_key()
53 ret = rsa->alloc_publickey(key, size_bits); in crypto_acipher_alloc_rsa_public_key()
56 size_bits, ret); in crypto_acipher_alloc_rsa_public_key()
[all …]
H A Decc.c127 size_t size_bits __maybe_unused) in ecc_generate_keypair()
503 uint32_t type, size_t size_bits) in drvcrypt_asym_alloc_ecc_keypair() argument
508 if (!key || !size_bits) { in drvcrypt_asym_alloc_ecc_keypair()
510 size_bits); in drvcrypt_asym_alloc_ecc_keypair()
526 ret = ecc->alloc_keypair(key, type, size_bits); in drvcrypt_asym_alloc_ecc_keypair()
542 CRYPTO_TRACE("ECC Keypair (%zu bits) alloc ret = 0x%" PRIx32, size_bits, in drvcrypt_asym_alloc_ecc_keypair()
554 uint32_t type, size_t size_bits) in drvcrypt_asym_alloc_ecc_public_key() argument
559 if (!key || !size_bits) { in drvcrypt_asym_alloc_ecc_public_key()
561 size_bits); in drvcrypt_asym_alloc_ecc_public_key()
577 ret = ecc->alloc_publickey(key, type, size_bits); in drvcrypt_asym_alloc_ecc_public_key()
[all …]
/optee_os/core/drivers/crypto/crypto_api/include/
H A Ddrvcrypt_acipher.h83 TEE_Result (*alloc_keypair)(struct rsa_keypair *key, size_t size_bits);
86 size_t size_bits);
92 TEE_Result (*gen_keypair)(struct rsa_keypair *key, size_t size_bits);
155 size_t size_bits);
158 size_t size_bits);
162 TEE_Result (*gen_keypair)(struct ecc_keypair *key, size_t size_bits);
190 TEE_Result (*alloc_keypair)(struct dh_keypair *key, size_t size_bits);
193 size_t size_bits);
246 size_t size_bits);
/optee_os/lib/libmbedtls/core/
H A Dbignum.c71 struct bignum *crypto_bignum_allocate(size_t size_bits) in crypto_bignum_allocate() argument
75 if (size_bits > CFG_CORE_BIGNUM_MAX_BITS) in crypto_bignum_allocate()
76 size_bits = CFG_CORE_BIGNUM_MAX_BITS; in crypto_bignum_allocate()
82 if (mbedtls_mpi_grow(bn, BITS_TO_LIMBS(size_bits)) != 0) { in crypto_bignum_allocate()
/optee_os/core/drivers/crypto/hisilicon/
H A Dhpre_dh.c21 size_t size_bits) in hpre_dh_alloc_keypair() argument
23 if (!key || !size_bits) { in hpre_dh_alloc_keypair()
29 key->g = crypto_bignum_allocate(size_bits); in hpre_dh_alloc_keypair()
33 key->p = crypto_bignum_allocate(size_bits); in hpre_dh_alloc_keypair()
37 key->x = crypto_bignum_allocate(size_bits); in hpre_dh_alloc_keypair()
41 key->y = crypto_bignum_allocate(size_bits); in hpre_dh_alloc_keypair()
46 key->q = crypto_bignum_allocate(size_bits); in hpre_dh_alloc_keypair()
H A Dhpre_montgomery.c95 size_t size_bits) in hpre_montgomery_alloc_keypair() argument
97 size_t key_size = BITS_TO_BYTES(size_bits); in hpre_montgomery_alloc_keypair()
99 if (!key || (size_bits != X25519_KEY_BITS && in hpre_montgomery_alloc_keypair()
100 size_bits != X448_KEY_BITS)) { in hpre_montgomery_alloc_keypair()
391 size_t size_bits) in hpre_montgomery_gen_keypair() argument
402 if (size_bits == X25519_KEY_BITS) in hpre_montgomery_gen_keypair()
404 else if (size_bits == X448_KEY_BITS) in hpre_montgomery_gen_keypair()
409 ret = gen_random_privkey(key->priv, size_bits); in hpre_montgomery_gen_keypair()
H A Dhpre_ecc.c612 size_t size_bits) in hpre_ecc_alloc_keypair() argument
614 if (!key || !key_size_is_supported(size_bits)) { in hpre_ecc_alloc_keypair()
621 key->d = crypto_bignum_allocate(size_bits); in hpre_ecc_alloc_keypair()
625 key->x = crypto_bignum_allocate(size_bits); in hpre_ecc_alloc_keypair()
629 key->y = crypto_bignum_allocate(size_bits); in hpre_ecc_alloc_keypair()
647 size_t size_bits) in hpre_ecc_alloc_publickey() argument
649 if (!key || !key_size_is_supported(size_bits)) { in hpre_ecc_alloc_publickey()
656 key->x = crypto_bignum_allocate(size_bits); in hpre_ecc_alloc_publickey()
660 key->y = crypto_bignum_allocate(size_bits); in hpre_ecc_alloc_publickey()
905 size_t size_bits) in hpre_ecc_gen_keypair() argument
[all …]
/optee_os/core/lib/libtomcrypt/
H A Decc.c37 size_t size_bits = 0; in ecc_get_curve_info() local
51 size_bits = 192; in ecc_get_curve_info()
59 size_bits = 224; in ecc_get_curve_info()
67 size_bits = 256; in ecc_get_curve_info()
75 size_bits = 384; in ecc_get_curve_info()
83 size_bits = 521; in ecc_get_curve_info()
91 size_bits = 256; in ecc_get_curve_info()
106 *key_size_bits = size_bits; in ecc_get_curve_info()
H A Dmpi_desc.c75 static int init_size(int size_bits __unused, void **a) in init_size()
749 struct bignum *crypto_bignum_allocate(size_t size_bits) in crypto_bignum_allocate() argument
757 if (mbedtls_mpi_grow(bn, BITS_TO_LIMBS(size_bits))) { in crypto_bignum_allocate()
/optee_os/core/lib/libtomcrypt/src/math/
H A Dmulti.c37 int ltc_init_multi_size(int size_bits, void **a, ...) in ltc_init_multi_size() argument
45 if (mp_init_size(size_bits, cur) != CRYPT_OK) { in ltc_init_multi_size()
/optee_os/core/drivers/crypto/caam/acipher/
H A Dcaam_dh.c161 static TEE_Result do_allocate_keypair(struct dh_keypair *key, size_t size_bits) in do_allocate_keypair() argument
163 DH_TRACE("Allocate Keypair of %zu bits", size_bits); in do_allocate_keypair()
169 key->g = crypto_bignum_allocate(size_bits); in do_allocate_keypair()
174 key->p = crypto_bignum_allocate(size_bits); in do_allocate_keypair()
184 key->y = crypto_bignum_allocate(size_bits); in do_allocate_keypair()
189 key->q = crypto_bignum_allocate(size_bits); in do_allocate_keypair()
H A Dcaam_ecc.c150 size_t size_bits) in do_allocate_keypair() argument
152 ECC_TRACE("Allocate Keypair of %zu bits", size_bits); in do_allocate_keypair()
172 key->x = crypto_bignum_allocate(size_bits); in do_allocate_keypair()
177 key->y = crypto_bignum_allocate(size_bits); in do_allocate_keypair()
201 size_t size_bits) in do_allocate_publickey() argument
203 ECC_TRACE("Allocate Public Key of %zu bits", size_bits); in do_allocate_publickey()
218 key->x = crypto_bignum_allocate(size_bits); in do_allocate_publickey()
223 key->y = crypto_bignum_allocate(size_bits); in do_allocate_publickey()
H A Dcaam_rsa.c325 size_t size_bits) in do_allocate_keypair() argument
327 RSA_TRACE("Allocate Keypair of %zu bits", size_bits); in do_allocate_keypair()
343 key->n = crypto_bignum_allocate(size_bits); in do_allocate_keypair()
389 size_t size_bits) in do_allocate_publickey() argument
391 RSA_TRACE("Allocate Public Key of %zu bits", size_bits); in do_allocate_publickey()
402 key->n = crypto_bignum_allocate(size_bits); in do_allocate_publickey()
/optee_os/core/drivers/crypto/versal/
H A Decc.c359 static TEE_Result do_gen_keypair(struct ecc_keypair *s, size_t size_bits) in do_gen_keypair() argument
366 return pair_ops->generate(s, size_bits); in do_gen_keypair()
370 uint32_t type, size_t size_bits) in do_alloc_keypair() argument
380 size_bits); in do_alloc_keypair()
394 uint32_t type, size_t size_bits) in do_alloc_publickey() argument
404 size_bits); in do_alloc_publickey()
H A Drsa.c301 static TEE_Result do_gen_keypair(struct rsa_keypair *s, size_t size_bits) in do_gen_keypair() argument
303 return sw_crypto_acipher_gen_rsa_key(s, size_bits); in do_gen_keypair()
306 static TEE_Result do_alloc_keypair(struct rsa_keypair *s, size_t size_bits) in do_alloc_keypair() argument
308 return sw_crypto_acipher_alloc_rsa_keypair(s, size_bits); in do_alloc_keypair()
/optee_os/core/lib/libtomcrypt/src/headers/
H A Dtomcrypt_math.h51 int (*init_size)(int size_bits, void **a);
513 int ltc_init_multi_size(int size_bits, void **a, ...) LTC_NULL_TERMINATED;
/optee_os/core/drivers/crypto/stm32/
H A Decc.c70 static TEE_Result stm32_gen_keypair(struct ecc_keypair *key, size_t size_bits) in stm32_gen_keypair() argument
90 if (size_bits > bytes * 8 || in stm32_gen_keypair()
292 size_t size_bits __unused) in stm32_alloc_keypair()
326 size_t size_bits __unused) in stm32_alloc_publickey()
/optee_os/core/arch/arm/mm/
H A Dcore_mmu_lpae.c1166 const unsigned int size_bits = read_id_aa64mmfr0_el1() & in get_physical_addr_size_bits() local
1171 return size_bits; in get_physical_addr_size_bits()
1174 assert(b <= size_bits); in get_physical_addr_size_bits()
1181 unsigned int size_bits = get_physical_addr_size_bits(); in core_mmu_arm64_get_pa_width() local
1183 size_bits = MIN(size_bits, ARRAY_SIZE(map) - 1); in core_mmu_arm64_get_pa_width()
1184 return map[size_bits]; in core_mmu_arm64_get_pa_width()
/optee_os/core/drivers/crypto/se050/core/
H A Decc.c730 size_t size_bits __unused) in do_alloc_keypair()
753 size_t size_bits __unused) in do_alloc_publickey()
/optee_os/core/include/crypto/
H A Dcrypto.h94 struct bignum *crypto_bignum_allocate(size_t size_bits);
/optee_os/core/crypto/
H A Dcrypto.c481 struct bignum *crypto_bignum_allocate(size_t size_bits __unused) in crypto_bignum_allocate()