Home
last modified time | relevance | path

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

12345678910>>...24

/external/boringssl/src/crypto/fipsmodule/bn/
Dbn.c70 BIGNUM *bn = OPENSSL_malloc(sizeof(BIGNUM)); in BN_new() local
72 if (bn == NULL) { in BN_new()
77 OPENSSL_memset(bn, 0, sizeof(BIGNUM)); in BN_new()
78 bn->flags = BN_FLG_MALLOCED; in BN_new()
80 return bn; in BN_new()
83 void BN_init(BIGNUM *bn) { in BN_init() argument
84 OPENSSL_memset(bn, 0, sizeof(BIGNUM)); in BN_init()
87 void BN_free(BIGNUM *bn) { in BN_free() argument
88 if (bn == NULL) { in BN_free()
92 if ((bn->flags & BN_FLG_STATIC_DATA) == 0) { in BN_free()
[all …]
Dcmp.c215 int BN_abs_is_word(const BIGNUM *bn, BN_ULONG w) { in BN_abs_is_word() argument
216 switch (bn_minimal_width(bn)) { in BN_abs_is_word()
218 return bn->d[0] == w; in BN_abs_is_word()
237 int BN_is_zero(const BIGNUM *bn) { in BN_is_zero() argument
238 return bn_minimal_width(bn) == 0; in BN_is_zero()
241 int BN_is_one(const BIGNUM *bn) { in BN_is_one() argument
242 return bn->neg == 0 && BN_abs_is_word(bn, 1); in BN_is_one()
245 int BN_is_word(const BIGNUM *bn, BN_ULONG w) { in BN_is_word() argument
246 return BN_abs_is_word(bn, w) && (w == 0 || bn->neg == 0); in BN_is_word()
249 int BN_is_odd(const BIGNUM *bn) { in BN_is_odd() argument
[all …]
Dbytes.c69 BIGNUM *bn = NULL; in BN_bin2bn() local
72 ret = bn = BN_new(); in BN_bin2bn()
87 if (bn) { in BN_bin2bn()
88 BN_free(bn); in BN_bin2bn()
115 BIGNUM *bn = NULL; in BN_le2bn() local
117 bn = BN_new(); in BN_le2bn()
118 ret = bn; in BN_le2bn()
134 BN_free(bn); in BN_le2bn()
254 BN_ULONG BN_get_word(const BIGNUM *bn) { in BN_get_word() argument
255 switch (bn_minimal_width(bn)) { in BN_get_word()
[all …]
Dbn_test.cc932 bssl::UniquePtr<BIGNUM> bn; in TEST_F() local
933 int ret = DecimalToBIGNUM(&bn, "0"); in TEST_F()
935 EXPECT_TRUE(BN_is_zero(bn.get())); in TEST_F()
936 EXPECT_FALSE(BN_is_negative(bn.get())); in TEST_F()
938 ret = DecimalToBIGNUM(&bn, "256"); in TEST_F()
940 EXPECT_TRUE(BN_is_word(bn.get(), 256)); in TEST_F()
941 EXPECT_FALSE(BN_is_negative(bn.get())); in TEST_F()
943 ret = DecimalToBIGNUM(&bn, "-42"); in TEST_F()
945 EXPECT_TRUE(BN_abs_is_word(bn.get(), 42)); in TEST_F()
946 EXPECT_TRUE(BN_is_negative(bn.get())); in TEST_F()
[all …]
Dinternal.h202 int bn_minimal_width(const BIGNUM *bn); in OPENSSL_MSVC_PRAGMA()
206 void bn_correct_top(BIGNUM *bn); in OPENSSL_MSVC_PRAGMA()
211 int bn_wexpand(BIGNUM *bn, size_t words); in OPENSSL_MSVC_PRAGMA()
215 int bn_expand(BIGNUM *bn, size_t bits); in OPENSSL_MSVC_PRAGMA()
223 int bn_resize_words(BIGNUM *bn, size_t words); in OPENSSL_MSVC_PRAGMA()
227 int bn_set_words(BIGNUM *bn, const BN_ULONG *words, size_t num); in OPENSSL_MSVC_PRAGMA()
231 int bn_fits_in_words(const BIGNUM *bn, size_t num); in OPENSSL_MSVC_PRAGMA()
235 int bn_copy_words(BN_ULONG *out, size_t num, const BIGNUM *bn); in OPENSSL_MSVC_PRAGMA()
356 int bn_less_than_montgomery_R(const BIGNUM *bn, const BN_MONT_CTX *mont); in OPENSSL_MSVC_PRAGMA()
/external/google-tv-pairing-protocol/cpp/src/polo/util/
Dpoloutil.cc25 BIGNUM* bn = BN_bin2bn(bytes, length, NULL); in BytesToHexString() local
26 char* hex = BN_bn2hex(bn); in BytesToHexString()
28 BN_free(bn); in BytesToHexString()
36 BIGNUM* bn = NULL; in HexStringToBytes() local
37 BN_hex2bn(&bn, hex_string.c_str()); in HexStringToBytes()
38 int length = BN_num_bytes(bn); in HexStringToBytes()
40 BN_bn2bin(bn, &bytes[0]); in HexStringToBytes()
41 BN_free(bn); in HexStringToBytes()
48 BIGNUM* bn = BN_new(); in IntToBigEndianBytes() local
49 BN_add_word(bn, value); in IntToBigEndianBytes()
[all …]
/external/tensorflow/tensorflow/python/layers/
Dnormalization_test.py53 bn = bn_layer.apply(conv, training=training)
54 loss = math_ops.reduce_sum(math_ops.abs(bn))
260 bn = normalization_layers.BatchNormalization(axis=1)
263 outputs = bn.apply(inputs, training=training)
269 self.assertEqual(len(bn.updates), 2)
270 self.assertEqual(len(bn.variables), 4)
271 self.assertEqual(len(bn.trainable_variables), 2)
272 self.assertEqual(len(bn.non_trainable_variables), 2)
275 self.assertEqual(len(bn.updates), 2)
277 ops.get_collection(ops.GraphKeys.UPDATE_OPS), bn.updates)
[all …]
/external/boringssl/src/crypto/bn_extra/
Dconvert.c79 char *BN_bn2hex(const BIGNUM *bn) { in BN_bn2hex() argument
81 bn->top * BN_BYTES * 2 + 1 /* trailing NUL */); in BN_bn2hex()
88 if (bn->neg) { in BN_bn2hex()
92 if (BN_is_zero(bn)) { in BN_bn2hex()
97 for (int i = bn->top - 1; i >= 0; i--) { in BN_bn2hex()
100 int v = ((int)(bn->d[i] >> (long)j)) & 0xff; in BN_bn2hex()
114 static int decode_hex(BIGNUM *bn, const char *in, int in_len) { in decode_hex() argument
120 if (!bn_expand(bn, in_len * 4)) { in decode_hex()
152 bn->d[i++] = word; in decode_hex()
155 assert(i <= bn->dmax); in decode_hex()
[all …]
Dbn_asn1.c45 int BN_marshal_asn1(CBB *cbb, const BIGNUM *bn) { in BN_marshal_asn1() argument
47 if (BN_is_negative(bn)) { in BN_marshal_asn1()
56 (BN_num_bits(bn) % 8 == 0 && !CBB_add_u8(&child, 0x00)) || in BN_marshal_asn1()
57 !BN_bn2cbb_padded(&child, BN_num_bytes(bn), bn) || in BN_marshal_asn1()
/external/boringssl/src/include/openssl/
Dbn.h173 OPENSSL_EXPORT void BN_init(BIGNUM *bn);
177 OPENSSL_EXPORT void BN_free(BIGNUM *bn);
181 OPENSSL_EXPORT void BN_clear_free(BIGNUM *bn);
192 OPENSSL_EXPORT void BN_clear(BIGNUM *bn);
202 OPENSSL_EXPORT unsigned BN_num_bits(const BIGNUM *bn);
206 OPENSSL_EXPORT unsigned BN_num_bytes(const BIGNUM *bn);
209 OPENSSL_EXPORT void BN_zero(BIGNUM *bn);
213 OPENSSL_EXPORT int BN_one(BIGNUM *bn);
217 OPENSSL_EXPORT int BN_set_word(BIGNUM *bn, BN_ULONG value);
221 OPENSSL_EXPORT int BN_set_u64(BIGNUM *bn, uint64_t value);
[all …]
/external/google-benchmark/tools/gbench/
Dreport.py103 gen = (bn for bn in json1['benchmarks'] if 'real_time' in bn and 'cpu_time' in bn)
104 for bn in gen:
105 other_bench = find_test(bn['name'])
109 if bn['time_unit'] != other_bench['time_unit']:
120 tres = calculate_change(bn['real_time'], other_bench['real_time'])
121 cpures = calculate_change(bn['cpu_time'], other_bench['cpu_time'])
123 BC_HEADER, bn['name'], first_col_width,
125 bn['real_time'], other_bench['real_time'],
126 bn['cpu_time'], other_bench['cpu_time'],
/external/libcxx/utils/google-benchmark/tools/gbench/
Dreport.py103 gen = (bn for bn in json1['benchmarks'] if 'real_time' in bn and 'cpu_time' in bn)
104 for bn in gen:
105 other_bench = find_test(bn['name'])
109 if bn['time_unit'] != other_bench['time_unit']:
120 tres = calculate_change(bn['real_time'], other_bench['real_time'])
121 cpures = calculate_change(bn['cpu_time'], other_bench['cpu_time'])
123 BC_HEADER, bn['name'], first_col_width,
125 bn['real_time'], other_bench['real_time'],
126 bn['cpu_time'], other_bench['cpu_time'],
/external/eigen/unsupported/Eigen/CXX11/src/Tensor/
DTensorContractionThreadPool.h182 Index bm, bn, bk;
188 bn = blocking.nc();
195 bn = blocking.nc();
204 contractionCost(m, n, bm, bn, bk, shard_by_col, false);
232 bn = blocking.nc();
239 bn = blocking.nc();
245 Index nn0 = divup(n, bn);
257 gm = coarsenM(m, n, bm, bn, bk, gn, num_threads, shard_by_col);
258 gn = coarsenN(m, n, bm, bn, bk, gm, num_threads, shard_by_col);
260 gn = coarsenN(m, n, bm, bn, bk, gm, num_threads, shard_by_col);
[all …]
/external/boringssl/src/crypto/asn1/
Da_enum.c150 ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai) in BN_to_ASN1_ENUMERATED() argument
163 if (BN_is_negative(bn)) in BN_to_ASN1_ENUMERATED()
167 j = BN_num_bits(bn); in BN_to_ASN1_ENUMERATED()
178 ret->length = BN_bn2bin(bn, ret->data); in BN_to_ASN1_ENUMERATED()
186 BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn) in ASN1_ENUMERATED_to_BN() argument
190 if ((ret = BN_bin2bn(ai->data, ai->length, bn)) == NULL) in ASN1_ENUMERATED_to_BN()
Dasn1_test.cc69 bssl::UniquePtr<BIGNUM> bn(BN_new()); in TEST() local
79 ASSERT_TRUE(BN_set_u64(bn.get(), abs)); in TEST()
80 BN_set_negative(bn.get(), i < 0); in TEST()
81 ASSERT_TRUE(BN_to_ASN1_INTEGER(bn.get(), by_bn.get())); in TEST()
Da_int.c430 ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai) in BN_to_ASN1_INTEGER() argument
443 if (BN_is_negative(bn) && !BN_is_zero(bn)) in BN_to_ASN1_INTEGER()
447 j = BN_num_bits(bn); in BN_to_ASN1_INTEGER()
457 ret->length = BN_bn2bin(bn, ret->data); in BN_to_ASN1_INTEGER()
470 BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn) in ASN1_INTEGER_to_BN() argument
474 if ((ret = BN_bin2bn(ai->data, ai->length, bn)) == NULL) in ASN1_INTEGER_to_BN()
/external/boringssl/src/crypto/fipsmodule/
DCMakeLists.txt31 bn-586.${ASM_EXT}
89 perlasm(armv4-mont.${ASM_EXT} bn/asm/armv4-mont.pl)
90 perlasm(armv8-mont.${ASM_EXT} bn/asm/armv8-mont.pl)
91 perlasm(bn-586.${ASM_EXT} bn/asm/bn-586.pl)
94 perlasm(co-586.${ASM_EXT} bn/asm/co-586.pl)
104 perlasm(rsaz-avx2.${ASM_EXT} bn/asm/rsaz-avx2.pl)
119 perlasm(x86_64-mont5.${ASM_EXT} bn/asm/x86_64-mont5.pl)
120 perlasm(x86_64-mont.${ASM_EXT} bn/asm/x86_64-mont.pl)
121 perlasm(x86-mont.${ASM_EXT} bn/asm/x86-mont.pl)
/external/mesa3d/src/compiler/nir/
Dnir_from_ssa.c153 struct exec_node *bn = exec_list_get_head(&b->nodes); in merge_merge_sets() local
154 while (!exec_node_is_tail_sentinel(bn)) { in merge_merge_sets()
156 merge_node *b_node = exec_node_data(merge_node, bn, node); in merge_merge_sets()
160 struct exec_node *next = bn->next; in merge_merge_sets()
161 exec_node_remove(bn); in merge_merge_sets()
162 exec_node_insert_node_before(an, bn); in merge_merge_sets()
163 exec_node_data(merge_node, bn, node)->set = a; in merge_merge_sets()
164 bn = next; in merge_merge_sets()
189 struct exec_node *bn = exec_list_get_head(&b->nodes); in merge_sets_interfere() local
191 !exec_node_is_tail_sentinel(bn)) { in merge_sets_interfere()
[all …]
/external/ipsec-tools/src/racoon/
Dprsa_tok.l64 BIGNUM *bn = BN_new(); variable
65 BN_hex2bn(&bn, prsatext+2);
66 prsalval.bn = bn;
/external/boringssl/src/crypto/dh/
Ddh_test.cc321 static bool BIGNUMEqualsHex(const BIGNUM *bn, const char *hex) { in BIGNUMEqualsHex() argument
327 return BN_cmp(bn, hex_bn) == 0; in BIGNUMEqualsHex()
412 bssl::UniquePtr<BIGNUM> bn(BN_get_rfc3526_prime_1536(nullptr)); in TestRFC3526() local
413 if (!bn) { in TestRFC3526()
437 if (BN_num_bytes(bn.get()) != sizeof(kPrime1536) || in TestRFC3526()
438 BN_bn2bin(bn.get(), buffer) != sizeof(kPrime1536) || in TestRFC3526()
/external/tensorflow/tensorflow/python/keras/_impl/keras/
Dmodel_subclassing_test.py52 self.bn = keras.layers.BatchNormalization(axis=-1)
59 x = self.bn(x)
77 self.bn = keras.layers.BatchNormalization()
86 x2 = self.bn(x2)
99 self.bn = keras.layers.BatchNormalization()
106 x = self.bn(x)
129 self.bn = self.bn = keras.layers.BatchNormalization()
134 x = self.bn(x)
153 self.bn = keras.layers.BatchNormalization()
158 return self.bn(x)
[all …]
/external/skia/src/gpu/
DGrAuditTrail.cpp89 const OpNode* bn = fOpList[opListID].get(); in copyOutFromOpList() local
90 SkASSERT(bn); in copyOutFromOpList()
91 outOpInfo->fBounds = bn->fBounds; in copyOutFromOpList()
92 outOpInfo->fProxyUniqueID = bn->fProxyUniqueID; in copyOutFromOpList()
93 for (int j = 0; j < bn->fChildren.count(); j++) { in copyOutFromOpList()
95 const Op* currentOp = bn->fChildren[j]; in copyOutFromOpList()
/external/skqp/src/gpu/
DGrAuditTrail.cpp89 const OpNode* bn = fOpList[opListID].get(); in copyOutFromOpList() local
90 SkASSERT(bn); in copyOutFromOpList()
91 outOpInfo->fBounds = bn->fBounds; in copyOutFromOpList()
92 outOpInfo->fProxyUniqueID = bn->fProxyUniqueID; in copyOutFromOpList()
93 for (int j = 0; j < bn->fChildren.count(); j++) { in copyOutFromOpList()
95 const Op* currentOp = bn->fChildren[j]; in copyOutFromOpList()
/external/libchrome/crypto/
Drsa_private_key.cc27 bssl::UniquePtr<BIGNUM> bn(BN_new()); in Create() local
28 if (!rsa_key.get() || !bn.get() || !BN_set_word(bn.get(), 65537L)) in Create()
31 if (!RSA_generate_key_ex(rsa_key.get(), num_bits, bn.get(), nullptr)) in Create()
/external/tensorflow/tensorflow/contrib/quantize/python/
Dcommon.py55 bn = match.group(1)
56 if not bn.startswith(SKIPPED_PREFIXES):
57 bns.append(bn)

12345678910>>...24