Home
last modified time | relevance | path

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

12345678910>>...18

/external/boringssl/src/crypto/bn/
Dbn.c69 BIGNUM *bn = OPENSSL_malloc(sizeof(BIGNUM)); in BN_new() local
71 if (bn == NULL) { in BN_new()
76 OPENSSL_memset(bn, 0, sizeof(BIGNUM)); in BN_new()
77 bn->flags = BN_FLG_MALLOCED; in BN_new()
79 return bn; in BN_new()
82 void BN_init(BIGNUM *bn) { in BN_init() argument
83 OPENSSL_memset(bn, 0, sizeof(BIGNUM)); in BN_init()
86 void BN_free(BIGNUM *bn) { in BN_free() argument
87 if (bn == NULL) { in BN_free()
91 if ((bn->flags & BN_FLG_STATIC_DATA) == 0) { in BN_free()
[all …]
Dcmp.c177 int BN_abs_is_word(const BIGNUM *bn, BN_ULONG w) { in BN_abs_is_word() argument
178 switch (bn->top) { in BN_abs_is_word()
180 return bn->d[0] == w; in BN_abs_is_word()
199 int BN_is_zero(const BIGNUM *bn) { in BN_is_zero() argument
200 return bn->top == 0; in BN_is_zero()
203 int BN_is_one(const BIGNUM *bn) { in BN_is_one() argument
204 return bn->neg == 0 && BN_abs_is_word(bn, 1); in BN_is_one()
207 int BN_is_word(const BIGNUM *bn, BN_ULONG w) { in BN_is_word() argument
208 return BN_abs_is_word(bn, w) && (w == 0 || bn->neg == 0); in BN_is_word()
211 int BN_is_odd(const BIGNUM *bn) { in BN_is_odd() argument
[all …]
Dbn_test.cc874 bssl::UniquePtr<BIGNUM> bn; in TestDec2BN() local
875 int ret = DecimalToBIGNUM(&bn, "0"); in TestDec2BN()
876 if (ret != 1 || !BN_is_zero(bn.get()) || BN_is_negative(bn.get())) { in TestDec2BN()
881 ret = DecimalToBIGNUM(&bn, "256"); in TestDec2BN()
882 if (ret != 3 || !BN_is_word(bn.get(), 256) || BN_is_negative(bn.get())) { in TestDec2BN()
887 ret = DecimalToBIGNUM(&bn, "-42"); in TestDec2BN()
888 if (ret != 3 || !BN_abs_is_word(bn.get(), 42) || !BN_is_negative(bn.get())) { in TestDec2BN()
893 ret = DecimalToBIGNUM(&bn, "-0"); in TestDec2BN()
894 if (ret != 2 || !BN_is_zero(bn.get()) || BN_is_negative(bn.get())) { in TestDec2BN()
899 ret = DecimalToBIGNUM(&bn, "42trailing garbage is ignored"); in TestDec2BN()
[all …]
Dconvert.c76 BIGNUM *bn = NULL; in BN_bin2bn() local
79 ret = bn = BN_new(); in BN_bin2bn()
94 if (bn) { in BN_bin2bn()
95 BN_free(bn); in BN_bin2bn()
122 BIGNUM *bn = NULL; in BN_le2bn() local
124 bn = BN_new(); in BN_le2bn()
125 ret = bn; in BN_le2bn()
141 BN_free(bn); in BN_le2bn()
256 char *BN_bn2hex(const BIGNUM *bn) { in BN_bn2hex() argument
258 bn->top * BN_BYTES * 2 + 1 /* trailing NUL */); in BN_bn2hex()
[all …]
Dbn_asn1.c61 int BN_marshal_asn1(CBB *cbb, const BIGNUM *bn) { in BN_marshal_asn1() argument
63 if (BN_is_negative(bn)) { in BN_marshal_asn1()
72 (BN_num_bits(bn) % 8 == 0 && !CBB_add_u8(&child, 0x00)) || in BN_marshal_asn1()
73 !BN_bn2cbb_padded(&child, BN_num_bytes(bn), bn) || in BN_marshal_asn1()
DCMakeLists.txt19 bn-586.${ASM_EXT}
42 bn target
48 bn.c
72 perlasm(bn-586.${ASM_EXT} asm/bn-586.pl)
Dctx.c246 BIGNUM *bn = p->head->vals; in BN_POOL_finish() local
248 if (bn->d) { in BN_POOL_finish()
249 BN_clear_free(bn); in BN_POOL_finish()
251 bn++; in BN_POOL_finish()
262 BIGNUM *bn; in BN_POOL_get() local
270 bn = item->vals; in BN_POOL_get()
272 BN_init(bn++); in BN_POOL_get()
Dmul.c778 int BN_mul_word(BIGNUM *bn, BN_ULONG w) { in BN_mul_word() argument
782 if (!bn->top) { in BN_mul_word()
787 BN_zero(bn); in BN_mul_word()
791 ll = bn_mul_words(bn->d, bn->d, bn->top, w); in BN_mul_word()
793 if (bn_wexpand(bn, bn->top + 1) == NULL) { in BN_mul_word()
796 bn->d[bn->top++] = ll; in BN_mul_word()
/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/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/boringssl/
Dsources.mk64 src/crypto/bn/add.c\
65 src/crypto/bn/asm/x86_64-gcc.c\
66 src/crypto/bn/bn.c\
67 src/crypto/bn/bn_asn1.c\
68 src/crypto/bn/cmp.c\
69 src/crypto/bn/convert.c\
70 src/crypto/bn/ctx.c\
71 src/crypto/bn/div.c\
72 src/crypto/bn/exponentiation.c\
73 src/crypto/bn/gcd.c\
[all …]
Dsources.bp66 "src/crypto/bn/add.c",
67 "src/crypto/bn/asm/x86_64-gcc.c",
68 "src/crypto/bn/bn.c",
69 "src/crypto/bn/bn_asn1.c",
70 "src/crypto/bn/cmp.c",
71 "src/crypto/bn/convert.c",
72 "src/crypto/bn/ctx.c",
73 "src/crypto/bn/div.c",
74 "src/crypto/bn/exponentiation.c",
75 "src/crypto/bn/gcd.c",
[all …]
/external/boringssl/src/crypto/asn1/
Da_enum.c139 ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai) in BN_to_ASN1_ENUMERATED() argument
152 if (BN_is_negative(bn)) in BN_to_ASN1_ENUMERATED()
156 j = BN_num_bits(bn); in BN_to_ASN1_ENUMERATED()
167 ret->length = BN_bn2bin(bn, ret->data); in BN_to_ASN1_ENUMERATED()
175 BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn) in ASN1_ENUMERATED_to_BN() argument
179 if ((ret = BN_bin2bn(ai->data, ai->length, bn)) == NULL) in ASN1_ENUMERATED_to_BN()
Da_int.c414 ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai) in BN_to_ASN1_INTEGER() argument
427 if (BN_is_negative(bn) && !BN_is_zero(bn)) in BN_to_ASN1_INTEGER()
431 j = BN_num_bits(bn); in BN_to_ASN1_INTEGER()
441 ret->length = BN_bn2bin(bn, ret->data); in BN_to_ASN1_INTEGER()
454 BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn) in ASN1_INTEGER_to_BN() argument
458 if ((ret = BN_bin2bn(ai->data, ai->length, bn)) == NULL) in ASN1_INTEGER_to_BN()
/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/libcxx/utils/google-benchmark/tools/gbench/
Dreport.py83 for bn in json1['benchmarks']:
84 other_bench = find_test(bn['name'])
96 tres = calculate_change(bn['real_time'], other_bench['real_time'])
97 cpures = calculate_change(bn['cpu_time'], other_bench['cpu_time'])
99 BC_HEADER, bn['name'], first_col_width,
101 bn['cpu_time'], other_bench['cpu_time'],
/external/google-benchmark/tools/gbench/
Dreport.py83 for bn in json1['benchmarks']:
84 other_bench = find_test(bn['name'])
96 tres = calculate_change(bn['real_time'], other_bench['real_time'])
97 cpures = calculate_change(bn['cpu_time'], other_bench['cpu_time'])
99 BC_HEADER, bn['name'], first_col_width,
101 bn['cpu_time'], other_bench['cpu_time'],
/external/ipsec-tools/src/racoon/
Dprsa_tok.l64 BIGNUM *bn = BN_new(); variable
65 BN_hex2bn(&bn, prsatext+2);
66 prsalval.bn = bn;
/external/clang/test/OpenMP/
Dtarget_firstprivate_codegen.cpp52 float bn[n]; in foo() local
113 #pragma omp target firstprivate(aa,b,bn,c,cn,d) in foo()
117 bn[3] = 1.0; in foo()
Dtarget_private_codegen.cpp29 float bn[n]; in foo() local
66 #pragma omp target private(a, b, bn, c, cn, d) in foo()
70 bn[3] = 1.0; in foo()
/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->fRenderTargetUniqueID = bn->fRenderTargetUniqueID; in copyOutFromOpList()
93 for (int j = 0; j < bn->fChildren.count(); j++) { in copyOutFromOpList()
95 const Op* currentOp = bn->fChildren[j]; in copyOutFromOpList()
/external/boringssl/src/crypto/dh/
Ddh_asn1.c77 static int marshal_integer(CBB *cbb, BIGNUM *bn) { in marshal_integer() argument
78 if (bn == NULL) { in marshal_integer()
83 return BN_marshal_asn1(cbb, bn); in marshal_integer()
Ddh_test.cc539 static bool BIGNUMEqualsHex(const BIGNUM *bn, const char *hex) { in BIGNUMEqualsHex() argument
545 return BN_cmp(bn, hex_bn) == 0; in BIGNUMEqualsHex()
630 bssl::UniquePtr<BIGNUM> bn(BN_get_rfc3526_prime_1536(nullptr)); in TestRFC3526() local
631 if (!bn) { in TestRFC3526()
655 if (BN_num_bytes(bn.get()) != sizeof(kPrime1536) || in TestRFC3526()
656 BN_bn2bin(bn.get(), buffer) != sizeof(kPrime1536) || in TestRFC3526()
/external/boringssl/src/crypto/chacha/asm/
Dchacha-x86.pl53 my ($an,$bn,$cn,$dn)=map(($_&~3)+(($_+1)&3),($ai,$bi,$ci,$di)); # next
72 ($an,$bn,$cn,$dn)=map(($_&~3)+(($_+$j++)&3),($an,$bn,$cn,$dn));
78 ($an,$bn,$cn,$dn)=map(($_&~3)+(($_-$j++)&3),($an,$bn,$cn,$dn));
91 &mov ($b_,&DWP(4*$bn,"esp")) if ($i<7);
360 my ($an,$bn,$cn,$dn)=map(($_&~3)+(($_+1)&3),($ai,$bi,$ci,$di)); # next
379 ($an,$bn,$cn,$dn)=map(($_&~3)+(($_+$j++)&3),($an,$bn,$cn,$dn));
385 ($an,$bn,$cn,$dn)=map(($_&~3)+(($_-$j++)&3),($an,$bn,$cn,$dn));
396 &movdqa($xb_,&QWP(16*$bn-128,"ebx")) if ($i<7);
/external/testng/src/main/java/org/testng/
DConverter.java68 String bn = fileName.substring(0, ind); in run() local
69 int ind2 = bn.lastIndexOf(File.separatorChar); in run()
70 String baseName = bn.substring(ind2 + 1); in run()

12345678910>>...18