Searched defs:bn (Results 1 - 25 of 58) sorted by relevance

123

/external/chromium_org/third_party/boringssl/src/crypto/asn1/
H A Dx_bignum.c60 #include <openssl/bn.h>
111 BIGNUM *bn; local
114 bn = (BIGNUM *)*pval;
116 if(BN_num_bits(bn) & 0x7) pad = 0;
120 BN_bn2bin(bn, cont);
122 return pad + BN_num_bytes(bn);
128 BIGNUM *bn; local
130 bn = (BIGNUM *)*pval;
131 if(!BN_bin2bn(cont, len, bn)) {
H A Da_enum.c137 ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai) argument
151 if(BN_is_negative(bn)) ret->type = V_ASN1_NEG_ENUMERATED;
153 j=BN_num_bits(bn);
166 ret->length=BN_bn2bin(bn,ret->data);
173 BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn) argument
177 if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL)
H A Da_int.c403 ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai) argument
417 if (BN_is_negative(bn))
420 j=BN_num_bits(bn);
432 ret->length=BN_bn2bin(bn,ret->data);
445 BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn) argument
449 if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL)
H A Dtasn_prn.c479 BIGNUM *bn = NULL; local
483 bn = ASN1_INTEGER_to_BN(str, NULL);
484 if (bn == NULL) {
487 s = BN_bn2dec(bn);
488 BN_free(bn);
/external/google-tv-pairing-protocol/cpp/src/polo/util/
H A Dpoloutil.cc25 BIGNUM* bn = BN_bin2bn(bytes, length, NULL); local
26 char* hex = BN_bn2hex(bn);
28 BN_free(bn);
36 BIGNUM* bn = NULL; local
37 BN_hex2bn(&bn, hex_string.c_str());
38 int length = BN_num_bytes(bn);
40 BN_bn2bin(bn, &bytes[0]);
41 BN_free(bn);
48 BIGNUM* bn = BN_new(); local
49 BN_add_word(bn, valu
66 BIGNUM* bn = BN_bin2bn(bytes, 4, NULL); local
[all...]
/external/openssl/apps/
H A Dprime.c53 #include <openssl/bn.h>
68 BIGNUM *bn=NULL; local
132 bn=BN_new();
133 BN_generate_prime_ex(bn,bits,safe,NULL,NULL,NULL);
134 s=hex ? BN_bn2hex(bn) : BN_bn2dec(bn);
141 BN_hex2bn(&bn,argv[0]);
143 BN_dec2bn(&bn,argv[0]);
145 BN_print(bio_out,bn);
147 BN_is_prime_ex(bn,check
[all...]
H A Dgenrsa.c74 #include <openssl/bn.h>
107 BIGNUM *bn = BN_new(); local
110 if(!bn) goto err;
276 if(!BN_set_word(bn, f4) || !RSA_generate_key_ex(rsa, num, bn, &cb))
304 if (bn) BN_free(bn);
/external/openssl/crypto/asn1/
H A Dx_bignum.c62 #include <openssl/bn.h>
112 BIGNUM *bn; local
115 bn = (BIGNUM *)*pval;
117 if(BN_num_bits(bn) & 0x7) pad = 0;
121 BN_bn2bin(bn, cont);
123 return pad + BN_num_bytes(bn);
129 BIGNUM *bn; local
131 bn = (BIGNUM *)*pval;
132 if(!BN_bin2bn(cont, len, bn)) {
H A Da_enum.c62 #include <openssl/bn.h>
138 ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai) argument
152 if(BN_is_negative(bn)) ret->type = V_ASN1_NEG_ENUMERATED;
154 j=BN_num_bits(bn);
167 ret->length=BN_bn2bin(bn,ret->data);
174 BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn) argument
178 if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL)
H A Da_int.c62 #include <openssl/bn.h>
404 ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai) argument
418 if (BN_is_negative(bn))
421 j=BN_num_bits(bn);
433 ret->length=BN_bn2bin(bn,ret->data);
446 BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn) argument
450 if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL)
/external/openssl/crypto/bn/
H A Dbn_const.c1 /* crypto/bn/knownprimes.c */
4 #include "bn.h"
14 BIGNUM *get_rfc2409_prime_768(BIGNUM *bn) argument
26 return BN_bin2bn(RFC2409_PRIME_768,sizeof(RFC2409_PRIME_768),bn);
37 BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn) argument
52 return BN_bin2bn(RFC2409_PRIME_1024,sizeof(RFC2409_PRIME_1024),bn);
63 BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn) argument
83 return BN_bin2bn(RFC3526_PRIME_1536,sizeof(RFC3526_PRIME_1536),bn);
93 BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn) argument
119 return BN_bin2bn(RFC3526_PRIME_2048,sizeof(RFC3526_PRIME_2048),bn);
129 get_rfc3526_prime_3072(BIGNUM *bn) argument
175 get_rfc3526_prime_4096(BIGNUM *bn) argument
232 get_rfc3526_prime_6144(BIGNUM *bn) argument
310 get_rfc3526_prime_8192(BIGNUM *bn) argument
[all...]
H A Dbn_print.c1 /* crypto/bn/bn_print.c */
172 int BN_hex2bn(BIGNUM **bn, const char *a) argument
187 if (bn == NULL) return(num);
190 if (*bn == NULL)
196 ret= *bn;
231 *bn=ret;
235 if (*bn == NULL) BN_free(ret);
239 int BN_dec2bn(BIGNUM **bn, const char *a) argument
253 if (bn == NULL) return(num);
257 if (*bn
297 BN_asc2bn(BIGNUM **bn, const char *a) argument
[all...]
/external/openssl/crypto/ec/
H A Dec_print.c90 const BIGNUM *bn,
98 if ((buf_len = BN_num_bytes(bn)) == 0) return NULL;
103 if (!BN_bn2bin(bn, buf))
89 EC_POINT_bn2point(const EC_GROUP *group, const BIGNUM *bn, EC_POINT *point, BN_CTX *ctx) argument
/external/openssl/crypto/jpake/
H A Djpaketest.c18 static void showbn(const char *name, const BIGNUM *bn) argument
22 BN_print_fp(stdout, bn);
/external/chromium_org/third_party/boringssl/src/crypto/bn/
H A Dcmp.c57 #include <openssl/bn.h>
175 int BN_abs_is_word(const BIGNUM *bn, BN_ULONG w) { argument
176 switch (bn->top) {
178 return bn->d[0] == w;
186 int BN_is_zero(const BIGNUM *bn) { argument
187 return bn->top == 0;
190 int BN_is_one(const BIGNUM *bn) { argument
191 return bn->neg == 0 && BN_abs_is_word(bn, 1);
194 int BN_is_word(const BIGNUM *bn, BN_ULON argument
198 BN_is_odd(const BIGNUM *bn) argument
[all...]
H A Dbn.c57 #include <openssl/bn.h>
67 BIGNUM *bn = OPENSSL_malloc(sizeof(BIGNUM)); local
69 if (bn == NULL) {
74 memset(bn, 0, sizeof(BIGNUM));
75 bn->flags = BN_FLG_MALLOCED;
77 return bn;
80 void BN_init(BIGNUM *bn) { argument
81 memset(bn, 0, sizeof(BIGNUM));
84 void BN_free(BIGNUM *bn) { argument
85 if (bn
100 BN_clear_free(BIGNUM *bn) argument
157 BN_clear(BIGNUM *bn) argument
228 BN_num_bits(const BIGNUM *bn) argument
238 BN_num_bytes(const BIGNUM *bn) argument
242 BN_zero(BIGNUM *bn) argument
246 BN_one(BIGNUM *bn) argument
250 BN_set_word(BIGNUM *bn, BN_ULONG value) argument
266 BN_is_negative(const BIGNUM *bn) argument
270 BN_set_negative(BIGNUM *bn, int sign) argument
278 bn_wexpand(BIGNUM *bn, unsigned words) argument
312 bn_expand(BIGNUM *bn, unsigned bits) argument
316 bn_correct_top(BIGNUM *bn) argument
330 BN_get_flags(const BIGNUM *bn, int flags) argument
334 BN_set_flags(BIGNUM *bn, int flags) argument
[all...]
H A Dconvert.c57 #include <openssl/bn.h>
71 BIGNUM *bn = NULL; local
74 ret = bn = BN_new();
89 if (bn) {
90 BN_free(bn);
193 char *BN_bn2hex(const BIGNUM *bn) { argument
198 buf = (char *)OPENSSL_malloc(bn->top * BN_BYTES * 2 + 2);
205 if (bn->neg) {
209 if (BN_is_zero(bn)) {
213 for (i = bn
230 decode_hex(BIGNUM *bn, const char *in, int i) argument
266 decode_dec(BIGNUM *bn, const char *in, int i) argument
494 BN_get_word(const BIGNUM *bn) argument
[all...]
H A Dctx.c55 #include <openssl/bn.h>
246 BIGNUM *bn = p->head->vals; local
248 if (bn->d) {
249 BN_clear_free(bn);
251 bn++;
262 BIGNUM *bn; local
270 bn = item->vals;
272 BN_init(bn++);
H A Dmul.c57 #include <openssl/bn.h>
792 int BN_mul_word(BIGNUM *bn, BN_ULONG w) { argument
796 if (!bn->top) {
801 BN_zero(bn);
805 ll = bn_mul_words(bn->d, bn->d, bn->top, w);
807 if (bn_wexpand(bn, bn->top + 1) == NULL) {
810 bn
[all...]
H A Dprime.c109 #include <openssl/bn.h>
449 static BN_ULONG get_word(const BIGNUM *bn) { argument
450 if (bn->top == 1) {
451 return bn->d[0];
/external/ipsec-tools/src/racoon/
H A Dprsa_par.h95 BIGNUM *bn; member in union:YYSTYPE
/external/openssl/crypto/rsa/
H A Drsa_lib.c63 #include <openssl/bn.h>
294 BIGNUM *bn,**t[6],*b; local
314 bn=(BIGNUM *)p;
319 *(t[i])= &(bn[i]);
320 memcpy((char *)&(bn[i]),(char *)b,sizeof(BIGNUM));
321 bn[i].flags=BN_FLG_STATIC_DATA;
322 bn[i].d=ul;
/external/openssl/crypto/srp/
H A Dsrp.h72 #include <openssl/bn.h>
78 BIGNUM *bn; member in struct:SRP_gN_cache_st
/external/openssl/include/openssl/
H A Dsrp.h72 #include <openssl/bn.h>
78 BIGNUM *bn; member in struct:SRP_gN_cache_st
/external/chromium_org/third_party/mesa/src/src/gallium/drivers/nv50/codegen/
H A Dnv50_ir_bb.cpp351 Graph::Node *bn = &that->dom; local
354 while (dn && dn != bn)

Completed in 8573 milliseconds

123