Searched refs:bn (Results 1 - 25 of 295) sorted by relevance

1234567891011>>

/external/chromium_org/third_party/boringssl/src/crypto/bn/
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 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 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 Drsaz_exp.h34 #include <openssl/bn.h>
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++);
/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/chromium_org/third_party/boringssl/src/crypto/dh/
H A Dinternal.h62 #include <openssl/bn.h>
/external/chromium_org/third_party/boringssl/src/crypto/dsa/
H A Dinternal.h65 #include <openssl/bn.h>
/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/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)
/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 Di2d_pu.c61 #include <openssl/bn.h>
/external/ipsec-tools/src/racoon/
H A Dprsa_tok.l39 #include <openssl/bn.h>
64 BIGNUM *bn = BN_new();
65 BN_hex2bn(&bn, prsatext+2);
66 prsalval.bn = bn;
/external/openssl/crypto/bn/
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...]
H A Dbn_ctx.c1 /* crypto/bn/bn_ctx.c */
371 BIGNUM *bn = p->head->vals; local
374 if(bn->d) BN_clear_free(bn);
375 bn++;
390 BIGNUM *bn = item->vals; local
393 if(bn->d) BN_clear(bn);
394 bn++;
407 BIGNUM *bn; local
[all...]
/external/chromium_org/third_party/boringssl/src/include/openssl/
H A Dbn.h158 OPENSSL_EXPORT void BN_init(BIGNUM *bn);
160 /* BN_free frees the data referenced by |bn| and, if |bn| was originally
161 * allocated on the heap, frees |bn| also. */
162 OPENSSL_EXPORT void BN_free(BIGNUM *bn);
164 /* BN_clear_free erases and frees the data referenced by |bn| and, if |bn| was
165 * originally allocated on the heap, frees |bn| also. */
166 OPENSSL_EXPORT void BN_clear_free(BIGNUM *bn);
175 /* BN_clear sets |bn| t
[all...]
/external/openssl/
H A DCrypto-config-trusty.mk56 crypto/bn/bn_add.c \
57 crypto/bn/bn_asm.c \
58 crypto/bn/bn_blind.c \
59 crypto/bn/bn_ctx.c \
60 crypto/bn/bn_div.c \
61 crypto/bn/bn_exp.c \
62 crypto/bn/bn_exp2.c \
63 crypto/bn/bn_gcd.c \
64 crypto/bn/bn_gf2m.c \
65 crypto/bn/bn_kro
[all...]
H A DCrypto-config-host.mk131 crypto/bn/bn_add.c \
132 crypto/bn/bn_asm.c \
133 crypto/bn/bn_blind.c \
134 crypto/bn/bn_const.c \
135 crypto/bn/bn_ctx.c \
136 crypto/bn/bn_div.c \
137 crypto/bn/bn_err.c \
138 crypto/bn/bn_exp.c \
139 crypto/bn/bn_exp2.c \
140 crypto/bn/bn_gc
[all...]
H A DCrypto-config-target.mk131 crypto/bn/bn_add.c \
132 crypto/bn/bn_asm.c \
133 crypto/bn/bn_blind.c \
134 crypto/bn/bn_const.c \
135 crypto/bn/bn_ctx.c \
136 crypto/bn/bn_div.c \
137 crypto/bn/bn_err.c \
138 crypto/bn/bn_exp.c \
139 crypto/bn/bn_exp2.c \
140 crypto/bn/bn_gc
[all...]
/external/openssl/crypto/dh/
H A Ddh_depr.c61 #include <openssl/bn.h>
/external/openssl/crypto/rsa/
H A Drsa_none.c61 #include <openssl/bn.h>
/external/chromium_org/crypto/
H A Drsa_private_key_openssl.cc8 #include <openssl/bn.h>
57 ScopedBIGNUM bn(BN_new());
58 if (!rsa_key.get() || !bn.get() || !BN_set_word(bn.get(), 65537L))
61 if (!RSA_generate_key_ex(rsa_key.get(), num_bits, bn.get(), NULL))

Completed in 348 milliseconds

1234567891011>>