Searched refs:bn (Results 1 – 6 of 6) sorted by relevance
/optee_os/core/lib/libtomcrypt/ |
A D | mpi_desc.c | 67 if (!bn) in init() 71 *a = bn; in init() 129 if (!bn->n) in get_int() 132 return bn->p[bn->n - 1]; in get_int() 175 mbedtls_mpi_add_int(&bn, &bn, v & mask); in compare_d() 752 mbedtls_mpi *bn = malloc(sizeof(*bn)); in crypto_bignum_allocate() local 754 if (!bn) in crypto_bignum_allocate() 759 free(bn); in crypto_bignum_allocate() 776 bn->s = 1; in crypto_bignum_clear() 777 if (bn->p) in crypto_bignum_clear() [all …]
|
/optee_os/lib/libmbedtls/core/ |
A D | bignum.c | 73 mbedtls_mpi *bn = NULL; in crypto_bignum_allocate() local 78 bn = calloc(1, sizeof(mbedtls_mpi)); in crypto_bignum_allocate() 79 if (!bn) in crypto_bignum_allocate() 81 mbedtls_mpi_init(bn); in crypto_bignum_allocate() 82 if (mbedtls_mpi_grow(bn, BITS_TO_LIMBS(size_bits)) != 0) { in crypto_bignum_allocate() 83 free(bn); in crypto_bignum_allocate() 87 return (struct bignum *)bn; in crypto_bignum_allocate() 98 mbedtls_mpi *bn = (mbedtls_mpi *)s; in crypto_bignum_clear() local 100 memset(bn->p, 0, mbedtls_mpi_size((const mbedtls_mpi *)bn)); in crypto_bignum_clear()
|
/optee_os/core/lib/libtomcrypt/src/pk/ecc/ |
A D | ecc_set_curve_internal.c | 24 void *bn; in _ecc_oid_lookup() local 28 if (mp_init(&bn) != CRYPT_OK) return; in _ecc_oid_lookup() 30 if (_ecc_cmp_hex_bn(curve->prime, key->dp.prime, bn) != 1) continue; in _ecc_oid_lookup() 31 if (_ecc_cmp_hex_bn(curve->order, key->dp.order, bn) != 1) continue; in _ecc_oid_lookup() 32 if (_ecc_cmp_hex_bn(curve->A, key->dp.A, bn) != 1) continue; in _ecc_oid_lookup() 33 if (_ecc_cmp_hex_bn(curve->B, key->dp.B, bn) != 1) continue; in _ecc_oid_lookup() 34 if (_ecc_cmp_hex_bn(curve->Gx, key->dp.base.x, bn) != 1) continue; in _ecc_oid_lookup() 35 if (_ecc_cmp_hex_bn(curve->Gy, key->dp.base.y, bn) != 1) continue; in _ecc_oid_lookup() 39 mp_clear(bn); in _ecc_oid_lookup()
|
/optee_os/lib/libutils/isoc/ |
A D | bget.c | 926 struct bfhead *b, *bn; local 966 bn = NULL; 1017 if (bn->bh.bsize > 0) { 1022 assert(BH((char *) bn + bn->bh.bsize)->prevfree == bn->bh.bsize); 1023 assert(bn->ql.blink->ql.flink == bn); 1024 assert(bn->ql.flink->ql.blink == bn); 1025 bn->ql.blink->ql.flink = bn->ql.flink; 1026 bn->ql.flink->ql.blink = bn->ql.blink; 1027 b->bh.bsize += bn->bh.bsize; 1103 struct bhead *bn; local [all …]
|
/optee_os/core/pta/tests/ |
A D | fs_htree.c | 180 static uint32_t val_from_bn_n_salt(size_t bn, size_t n, uint8_t salt) in val_from_bn_n_salt() argument 182 assert(bn < UINT16_MAX); in val_from_bn_n_salt() 184 return SHIFT_U32(n, 16) | SHIFT_U32(bn, 8) | salt; in val_from_bn_n_salt() 193 b[n] = val_from_bn_n_salt(bn, n, salt); in write_block() 195 return tee_fs_htree_write_block(ht, bn, b); in write_block() 198 static TEE_Result read_block(struct tee_fs_htree **ht, size_t bn, uint8_t salt) in read_block() argument 204 res = tee_fs_htree_read_block(ht, bn, b); in read_block() 209 if (b[n] != val_from_bn_n_salt(bn, n, salt)) { in read_block() 212 n, b[n], val_from_bn_n_salt(bn, n, salt)); in read_block() 221 size_t bn, uint8_t salt), in do_range() argument [all …]
|
/optee_os/core/tee/ |
A D | tee_svc_cryp.c | 664 struct bignum **bn = attr; in op_attr_bignum_from_user() local 674 struct bignum **bn = attr; in op_attr_bignum_to_user() local 711 struct bignum **bn = attr; in op_attr_bignum_to_binary() local 732 struct bignum **bn = attr; in op_attr_bignum_from_binary() local 748 struct bignum **bn = attr; in op_attr_bignum_from_obj() local 751 crypto_bignum_copy(*bn, *src_bn); in op_attr_bignum_from_obj() 757 struct bignum **bn = attr; in op_attr_bignum_clear() local 759 crypto_bignum_clear(*bn); in op_attr_bignum_clear() 764 struct bignum **bn = attr; in op_attr_bignum_free() local 766 crypto_bignum_free(*bn); in op_attr_bignum_free() [all …]
|
Completed in 16 milliseconds