Home
last modified time | relevance | path

Searched refs:bn (Results 1 – 7 of 7) sorted by relevance

/optee_os-3.20.0/lib/libmbedtls/core/
A Dbignum.c73 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-3.20.0/core/lib/libtomcrypt/
A Dmpi_desc.c67 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-3.20.0/core/lib/libtomcrypt/src/pk/ecc/
A Decc_set_curve_internal.c17 void *bn; in s_ecc_oid_lookup() local
21 if (mp_init(&bn) != CRYPT_OK) return; in s_ecc_oid_lookup()
23 if (s_ecc_cmp_hex_bn(curve->prime, key->dp.prime, bn) != 1) continue; in s_ecc_oid_lookup()
24 if (s_ecc_cmp_hex_bn(curve->order, key->dp.order, bn) != 1) continue; in s_ecc_oid_lookup()
25 if (s_ecc_cmp_hex_bn(curve->A, key->dp.A, bn) != 1) continue; in s_ecc_oid_lookup()
26 if (s_ecc_cmp_hex_bn(curve->B, key->dp.B, bn) != 1) continue; in s_ecc_oid_lookup()
27 if (s_ecc_cmp_hex_bn(curve->Gx, key->dp.base.x, bn) != 1) continue; in s_ecc_oid_lookup()
28 if (s_ecc_cmp_hex_bn(curve->Gy, key->dp.base.y, bn) != 1) continue; in s_ecc_oid_lookup()
32 mp_clear(bn); in s_ecc_oid_lookup()
/optee_os-3.20.0/lib/libutils/isoc/
A Dbget.c924 struct bfhead *b, *bn; local
963 bn = NULL;
1020 if (bn->bh.bsize > 0) {
1025 assert(BH((char *) bn + bn->bh.bsize)->prevfree == bn->bh.bsize);
1026 assert(bn->ql.blink->ql.flink == bn);
1027 assert(bn->ql.flink->ql.blink == bn);
1028 bn->ql.blink->ql.flink = bn->ql.flink;
1029 bn->ql.flink->ql.blink = bn->ql.blink;
1030 b->bh.bsize += bn->bh.bsize;
1106 struct bhead *bn; local
[all …]
/optee_os-3.20.0/core/pta/tests/
A Dfs_htree.c180 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-3.20.0/core/pta/
A Dattestation.c81 static size_t serialize_bignum(uint8_t *buf, size_t buf_sz, struct bignum *bn) in serialize_bignum() argument
84 size_t sz = crypto_bignum_num_bytes(bn); in serialize_bignum()
94 crypto_bignum_bn2bin(bn, p); in serialize_bignum()
151 static size_t deserialize_bignum(uint8_t *buf, size_t max_sz, struct bignum *bn) in deserialize_bignum() argument
168 res = crypto_bignum_bin2bn(p, sz, bn); in deserialize_bignum()
/optee_os-3.20.0/core/tee/
A Dtee_svc_cryp.c768 struct bignum **bn = attr; in op_attr_bignum_from_user() local
778 struct bignum **bn = attr; in op_attr_bignum_to_user() local
817 struct bignum **bn = attr; in op_attr_bignum_to_binary() local
838 struct bignum **bn = attr; in op_attr_bignum_from_binary() local
854 struct bignum **bn = attr; in op_attr_bignum_from_obj() local
857 crypto_bignum_copy(*bn, *src_bn); in op_attr_bignum_from_obj()
863 struct bignum **bn = attr; in op_attr_bignum_clear() local
865 crypto_bignum_clear(*bn); in op_attr_bignum_clear()
870 struct bignum **bn = attr; in op_attr_bignum_free() local
872 crypto_bignum_free(*bn); in op_attr_bignum_free()
[all …]

Completed in 20 milliseconds