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

12

/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);
H A Docsp.c77 #include <openssl/bn.h>
1161 BIGNUM *bn = NULL; local
1164 bn = ASN1_INTEGER_to_BN(ser,NULL);
1165 OPENSSL_assert(bn); /* FIXME: should report an error at this point and abort */
1166 if (BN_is_zero(bn))
1169 itmp = BN_bn2hex(bn);
1171 BN_free(bn);
H A Dca.c69 #include <openssl/bn.h>
2415 BIGNUM *bn = NULL; local
2421 bn = ASN1_INTEGER_to_BN(X509_get_serialNumber(x509),NULL);
2422 if (!bn)
2424 if (BN_is_zero(bn))
2427 row[DB_serial]=BN_bn2hex(bn);
2428 BN_free(bn);
H A Ds_client.c165 #include <openssl/bn.h>
232 BIGNUM *bn=NULL; local
251 ret=BN_hex2bn(&bn, psk_key);
255 if (bn)
256 BN_free(bn);
260 if ((unsigned int)BN_num_bytes(bn) > max_psk_len)
263 max_psk_len, BN_num_bytes(bn));
264 BN_free(bn);
268 psk_len=BN_bn2bin(bn, psk);
269 BN_free(bn);
[all...]
H A Ds_server.c174 #include <openssl/bn.h>
321 BIGNUM *bn = NULL; local
346 ret = BN_hex2bn(&bn, psk_key);
350 if (bn)
351 BN_free(bn);
354 if (BN_num_bytes(bn) > (int)max_psk_len)
357 max_psk_len, BN_num_bytes(bn));
358 BN_free(bn);
362 ret = BN_bn2bin(bn, psk);
363 BN_free(bn);
2938 BIGNUM *bn = NULL; local
[all...]
/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...]
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...]
H A Dbn_nist.c1 /* crypto/bn/bn_nist.c */
363 BN_ULONG bn[BN_NIST_192_TOP]; member in union:__anon8375
399 nist_cp_bn_0(buf.bn, a_d + BN_NIST_192_TOP, top - BN_NIST_192_TOP, BN_NIST_192_TOP);
433 nist_set_192(t_d, buf.bn, 0, 3, 3);
435 nist_set_192(t_d, buf.bn, 4, 4, 0);
437 nist_set_192(t_d, buf.bn, 5, 5, 5)
637 BN_ULONG bn[BN_NIST_256_TOP]; member in union:__anon8377
674 nist_cp_bn_0(buf.bn, a_d + BN_NIST_256_TOP, top - BN_NIST_256_TOP, BN_NIST_256_TOP);
752 nist_set_256(t_d, buf.bn, 15, 14, 13, 12, 11, 0, 0, 0);
754 nist_set_256(c_d, buf.bn,
840 BN_ULONG bn[BN_NIST_384_TOP]; member in union:__anon8379
[all...]
H A Dbn_lib.c1 /* crypto/bn/bn_lib.c */
583 BIGNUM *bn = NULL; local
586 ret = bn = BN_new();
600 if (bn) BN_free(bn);
/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);
H A Djpake.c150 static void hashbn(SHA_CTX *sha, const BIGNUM *bn) argument
152 size_t l = BN_num_bytes(bn);
156 BN_bn2bin(bn, bin);
444 static void quickhashbn(unsigned char *md, const BIGNUM *bn) argument
449 hashbn(&sha, bn);
/external/ipsec-tools/src/racoon/
H A Dprsa_par.h95 BIGNUM *bn; member in union:YYSTYPE
H A Dcrypto_openssl.c56 #include <openssl/bn.h>
237 BIGNUM *bn = BN_new(); local
245 if (BN_hex2bn(&bn, hex) != len) {
252 binlen = BN_num_bytes(bn);
260 BN_bn2bin(bn, (unsigned char *) binbuf);
263 BN_free(bn);
2539 eay_v2bn(bn, var)
2540 BIGNUM **bn;
2543 if ((*bn = BN_bin2bn((unsigned char *) var->v, var->l, NULL)) == NULL)
2550 eay_bn2v(var, bn)
[all...]
/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/openssl/crypto/pem/
H A Dpvkfmt.c65 #include <openssl/bn.h>
450 static void write_lebn(unsigned char **out, const BIGNUM *bn, int len) argument
454 nb = BN_num_bytes(bn);
455 BN_bn2bin(bn, p);
/external/openssl/crypto/x509v3/
H A Dv3_utl.c66 #include <openssl/bn.h>
161 BIGNUM *bn = NULL; local
169 bn = BN_new();
180 if (ishex) ret = BN_hex2bn(&bn, value);
181 else ret = BN_dec2bn(&bn, value);
184 BN_free(bn);
189 if (isneg && BN_is_zero(bn)) isneg = 0;
191 aint = BN_to_ASN1_INTEGER(bn, NULL);
192 BN_free(bn);
/external/openssl/ssl/
H A Dssltest.c187 #include <openssl/bn.h>
2366 BIGNUM *bn = NULL; local
2369 bn = BN_new();
2371 if(!bn || !rsa_tmp || !BN_set_word(bn, RSA_F4))
2378 if(!RSA_generate_key_ex(rsa_tmp,keylength,bn,NULL))
2388 if(bn) BN_free(bn);
2506 BIGNUM *bn = NULL; local
2508 ret = BN_hex2bn(&bn, pskke
[all...]

Completed in 3602 milliseconds

12