Home
last modified time | relevance | path

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

1234

/openssl/test/
H A Dbntests.pl17 sub bn subroutine
34 my $a = bn($s{'A'});
35 my $b = bn($s{'B'});
40 my $a = bn($s{'A'});
45 my $a = bn($s{'A'});
46 my $n = bn($s{'N'});
51 my $a = bn($s{'A'});
52 my $n = bn($s{'N'});
57 my $a = bn($s{'A'});
81 $a = bn($s{'A'});
[all …]
H A Dbn_internal_test.c31 BIGNUM *bn = NULL; in test_is_prime_enhanced() local
33 ret = TEST_ptr(bn = BN_new()) in test_is_prime_enhanced()
35 && TEST_true(BN_set_word(bn, 11)) in test_is_prime_enhanced()
37 && TEST_true(ossl_bn_miller_rabin_is_prime(bn, 10, ctx, NULL, 1, in test_is_prime_enhanced()
40 BN_free(bn); in test_is_prime_enhanced()
52 BIGNUM *bn = NULL; in test_is_composite_enhanced() local
54 ret = TEST_ptr(bn = BN_new()) in test_is_composite_enhanced()
56 && TEST_true(BN_set_word(bn, composites[id])) in test_is_composite_enhanced()
57 && TEST_true(ossl_bn_miller_rabin_is_prime(bn, 10, ctx, NULL, 1, in test_is_composite_enhanced()
61 BN_free(bn); in test_is_composite_enhanced()
H A Dbntest.c341 return bn; in set_signed_bn()
2001 bn = NULL; in test_dec2bn()
2011 bn = NULL; in test_dec2bn()
2021 bn = NULL; in test_dec2bn()
2032 bn = NULL; in test_dec2bn()
2041 bn = NULL; in test_dec2bn()
2068 bn = NULL; in test_hex2bn()
2078 bn = NULL; in test_hex2bn()
2088 bn = NULL; in test_hex2bn()
2098 bn = NULL; in test_hex2bn()
[all …]
H A Devp_libctx_test.c95 static const BIGNUM *bn[] = { in test_dsa_param_keygen() local
115 || !TEST_ptr(p = BN_dup(bn[pind])) in test_dsa_param_keygen()
116 || !TEST_ptr(q = BN_dup(bn[qind])) in test_dsa_param_keygen()
117 || !TEST_ptr(g = BN_dup(bn[gind])) in test_dsa_param_keygen()
152 static int do_dh_param_keygen(int tstid, const BIGNUM **bn) in do_dh_param_keygen() argument
178 || !TEST_ptr(p = BN_dup(bn[pind])) in do_dh_param_keygen()
179 || !TEST_ptr(q = BN_dup(bn[qind])) in do_dh_param_keygen()
180 || !TEST_ptr(g = BN_dup(bn[gind])) in do_dh_param_keygen()
220 static const BIGNUM *bn[] = { in test_dh_safeprime_param_keygen() local
224 return do_dh_param_keygen(tstid, bn); in test_dh_safeprime_param_keygen()
/openssl/crypto/bn/
H A Dbn_const.c25 BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn) in BN_get_rfc2409_prime_768() argument
53 BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn) in BN_get_rfc2409_prime_1024() argument
85 BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn) in BN_get_rfc3526_prime_1536() argument
87 return COPY_BN(bn, ossl_bignum_modp_1536_p); in BN_get_rfc3526_prime_1536()
98 BIGNUM *BN_get_rfc3526_prime_2048(BIGNUM *bn) in BN_get_rfc3526_prime_2048() argument
100 return COPY_BN(bn, ossl_bignum_modp_2048_p); in BN_get_rfc3526_prime_2048()
111 BIGNUM *BN_get_rfc3526_prime_3072(BIGNUM *bn) in BN_get_rfc3526_prime_3072() argument
113 return COPY_BN(bn, ossl_bignum_modp_3072_p); in BN_get_rfc3526_prime_3072()
124 BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *bn) in BN_get_rfc3526_prime_4096() argument
137 BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *bn) in BN_get_rfc3526_prime_6144() argument
[all …]
H A Dbn_conv.c148 if (bn == NULL) in BN_hex2bn()
152 if (*bn == NULL) { in BN_hex2bn()
156 ret = *bn; in BN_hex2bn()
191 *bn = ret; in BN_hex2bn()
198 if (*bn == NULL) in BN_hex2bn()
224 if (bn == NULL) in BN_dec2bn()
231 if (*bn == NULL) { in BN_dec2bn()
235 ret = *bn; in BN_dec2bn()
261 *bn = ret; in BN_dec2bn()
268 if (*bn == NULL) in BN_dec2bn()
[all …]
H A Dbn_nist.c336 BN_ULONG bn[BN_NIST_192_TOP]; in BN_nist_mod_192() member
421 nist_set_192(t_d, buf.bn, 0, 3, 3); in BN_nist_mod_192()
423 nist_set_192(t_d, buf.bn, 4, 4, 0); in BN_nist_mod_192()
425 nist_set_192(t_d, buf.bn, 5, 5, 5) in BN_nist_mod_192()
477 BN_ULONG bn[BN_NIST_224_TOP]; in BN_nist_mod_224() member
519 nist_set_224(buf.bn, c_d, 14, 13, 12, 11, 10, 9, 8); in BN_nist_mod_224()
586 nist_set_224(t_d, buf.bn, 10, 9, 8, 7, 0, 0, 0); in BN_nist_mod_224()
588 nist_set_224(t_d, buf.bn, 0, 13, 12, 11, 0, 0, 0); in BN_nist_mod_224()
592 nist_set_224(t_d, buf.bn, 0, 0, 0, 0, 13, 12, 11); in BN_nist_mod_224()
658 BN_ULONG bn[BN_NIST_256_TOP]; in BN_nist_mod_256() member
[all …]
H A Dbn_ctx.c303 BIGNUM *bn; in BN_POOL_finish() local
306 for (loop = 0, bn = p->head->vals; loop++ < BN_CTX_POOL_SIZE; bn++) in BN_POOL_finish()
307 if (bn->d) in BN_POOL_finish()
308 BN_clear_free(bn); in BN_POOL_finish()
318 BIGNUM *bn; in BN_POOL_get() local
329 for (loop = 0, bn = item->vals; loop++ < BN_CTX_POOL_SIZE; bn++) { in BN_POOL_get()
330 bn_init(bn); in BN_POOL_get()
332 BN_set_flags(bn, BN_FLG_SECURE); in BN_POOL_get()
H A Dbuild.info19 $BNASM_x86=bn-586.S co-586.S x86-mont.S x86-gf2m.S
37 $BNASM_ia64=bn-ia64.s ia64-mont.s
53 $BNASM_mips32=bn-mips.S mips-mont.S
80 $BNASM_ppc32=bn_ppc.c bn-ppc.s ppc-mont.s
85 $BNASM_c64xplus=asm/bn-c64xplus.asm
130 GENERATE[bn-586.S]=asm/bn-586.pl
131 DEPEND[bn-586.S]=../perlasm/x86asm.pl
150 GENERATE[bn-mips.S]=asm/mips.pl
151 INCLUDE[bn-mips.o]=..
167 GENERATE[bn-ia64.s]=asm/ia64.S
[all …]
/openssl/apps/
H A Dprime.c62 BIGNUM *bn = NULL; in prime_main() local
119 bn = BN_new(); in prime_main()
120 if (bn == NULL) { in prime_main()
124 if (!BN_generate_prime_ex(bn, bits, safe, NULL, NULL, NULL)) { in prime_main()
128 s = hex ? BN_bn2hex(bn) : BN_bn2dec(bn); in prime_main()
140 r = hex ? BN_hex2bn(&bn, argv[0]) : BN_dec2bn(&bn, argv[0]); in prime_main()
147 BN_print(bio_out, bn); in prime_main()
150 BN_check_prime(bn, NULL, NULL) in prime_main()
157 BN_free(bn); in prime_main()
H A Dgenrsa.c80 BIGNUM *bn = BN_new(); in genrsa_main() local
92 if (bn == NULL || cb == NULL) in genrsa_main()
194 if (!BN_set_word(bn, f4)) { in genrsa_main()
198 if (EVP_PKEY_CTX_set1_rsa_keygen_pubexp(ctx, bn) <= 0) { in genrsa_main()
237 BN_free(bn); in genrsa_main()
/openssl/crypto/
H A Dparam_build.c30 const BIGNUM *bn; member
205 if (bn != NULL) { in push_BN()
212 n = BN_num_bytes(bn); in push_BN()
227 pd->bn = bn; in push_BN()
232 const BIGNUM *bn) in OSSL_PARAM_BLD_push_BN() argument
234 if (BN_is_negative(bn)) in OSSL_PARAM_BLD_push_BN()
235 return push_BN(bld, key, bn, bn == NULL ? 0 : BN_num_bytes(bn) + 1, in OSSL_PARAM_BLD_push_BN()
237 return push_BN(bld, key, bn, bn == NULL ? 0 : BN_num_bytes(bn), in OSSL_PARAM_BLD_push_BN()
244 if (BN_is_negative(bn)) in OSSL_PARAM_BLD_push_BN_pad()
245 return push_BN(bld, key, bn, bn == NULL ? 0 : BN_num_bytes(bn), in OSSL_PARAM_BLD_push_BN_pad()
[all …]
H A Dparam_build_set.c70 const char *key, const BIGNUM *bn, size_t sz) in ossl_param_build_set_bn_pad() argument
73 return OSSL_PARAM_BLD_push_BN_pad(bld, key, bn, sz); in ossl_param_build_set_bn_pad()
81 return OSSL_PARAM_set_BN(p, bn); in ossl_param_build_set_bn_pad()
87 const char *key, const BIGNUM *bn) in ossl_param_build_set_bn() argument
90 return OSSL_PARAM_BLD_push_BN(bld, key, bn); in ossl_param_build_set_bn()
94 return OSSL_PARAM_set_BN(p, bn) > 0; in ossl_param_build_set_bn()
/openssl/crypto/asn1/
H A Dx_bignum.c97 BIGNUM *bn; in bn_i2c() local
101 bn = (BIGNUM *)*pval; in bn_i2c()
103 if (BN_num_bits(bn) & 0x7) in bn_i2c()
110 BN_bn2bin(bn, cont); in bn_i2c()
112 return pad + BN_num_bytes(bn); in bn_i2c()
118 BIGNUM *bn; in bn_c2i() local
122 bn = (BIGNUM *)*pval; in bn_c2i()
123 if (!BN_bin2bn(cont, len, bn)) { in bn_c2i()
134 BIGNUM *bn; in bn_secure_c2i() local
144 bn = (BIGNUM *)*pval; in bn_secure_c2i()
[all …]
H A Da_int.c477 if (BN_is_negative(bn) && !BN_is_zero(bn)) in bn_to_asn1_string()
480 len = BN_num_bytes(bn); in bn_to_asn1_string()
491 if (BN_is_zero(bn)) in bn_to_asn1_string()
494 len = BN_bn2bin(bn, ret->data); in bn_to_asn1_string()
503 static BIGNUM *asn1_string_to_bn(const ASN1_INTEGER *ai, BIGNUM *bn, in asn1_string_to_bn() argument
513 ret = BN_bin2bn(ai->data, ai->length, bn); in asn1_string_to_bn()
564 return bn_to_asn1_string(bn, ai, V_ASN1_INTEGER); in BN_to_ASN1_INTEGER()
567 BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn) in ASN1_INTEGER_to_BN() argument
569 return asn1_string_to_bn(ai, bn, V_ASN1_INTEGER); in ASN1_INTEGER_to_BN()
607 return bn_to_asn1_string(bn, ai, V_ASN1_ENUMERATED); in BN_to_ASN1_ENUMERATED()
[all …]
/openssl/providers/
H A Dfips.module.sources36 crypto/bn/asm/bn-586.pl
68 crypto/bn/bn_add.c
69 crypto/bn/bn_asm.c
73 crypto/bn/bn_ctx.c
74 crypto/bn/bn_dh.c
75 crypto/bn/bn_div.c
76 crypto/bn/bn_exp.c
78 crypto/bn/bn_gcd.c
82 crypto/bn/bn_lib.c
84 crypto/bn/bn_mod.c
[all …]
H A Dfips-sources.checksums36 cb4ad7b7461fcb8e2a0d52881158d0211b79544842d4eae36fc566869a2d62c8 crypto/bn/asm/bn-586.pl
68 0ea8185a037a2951bb3d1e590bbbdeac305176d5e618f3e43a04c09733a9de34 crypto/bn/bn_add.c
69 3962dfaa0142e67115ab84f7809d46d59bd122758be09a081b08b2e0d4743b2e crypto/bn/bn_asm.c
73 2893b6d03d4850d09c15959941b0759bbb50d8c20e873bed088e7cde4e15a65a crypto/bn/bn_ctx.c
74 d94295953ab91469fe2b9da2a542b8ea11ac38551ecde8f8202b7f645c2dea16 crypto/bn/bn_dh.c
75 a837ba52750ab30a57b6dd2fd4cf901e18a891a189b089f83add2f5dc8138eb7 crypto/bn/bn_div.c
76 160ea2c916774d6a7f8130e0a05cad7c0a954b4726c15017b3df67e3285231f3 crypto/bn/bn_exp.c
78 b32d83cee8c00d837a7e4fb8af3f5cf17cb8d2419302e8f5fbcf62119092e874 crypto/bn/bn_gcd.c
82 7e8f6e8bfc0958fc73d163f8139194a71385d98868e6ed51f4d52198b0649acf crypto/bn/bn_lib.c
84 07247dc2ccc55f3be525baed92fd20031bbaa80fd0bc56155e80ee0da3fc943d crypto/bn/bn_mod.c
[all …]
/openssl/test/testutil/
H A Dformat_output.c186 if (bn != NULL) in test_bignum_zero_null()
187 return BN_is_negative(bn) ? "-0" : "0"; in test_bignum_zero_null()
197 const char *v = test_bignum_zero_null(bn); in test_bignum_zero_print()
214 if (bn != NULL && !BN_is_zero(bn)) { in convert_bn_memory()
235 if (BN_is_negative(bn)) { in convert_bn_memory()
254 if (bn == NULL) in convert_bn_memory()
257 r = BN_is_negative(bn) ? "-0" : "0"; in convert_bn_memory()
382 test_fail_bignum_common(prefix, file, line, type, left, right, op, bn, bn); in test_fail_bignum_mono_message()
388 if (bn == NULL || BN_is_zero(bn)) { in test_output_bignum()
395 int n = BN_bn2bin(bn, buf); in test_output_bignum()
[all …]
/openssl/doc/man3/
H A DDH_get_1024_160.pod33 BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn);
34 BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn);
35 BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn);
36 BIGNUM *BN_get_rfc3526_prime_2048(BIGNUM *bn);
37 BIGNUM *BN_get_rfc3526_prime_3072(BIGNUM *bn);
38 BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *bn);
39 BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *bn);
40 BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn);
70 return a BIGNUM for the specified size from IETF RFC 2409. If B<bn>
H A DOSSL_PARAM_BLD.pod32 const BIGNUM *bn);
34 const BIGNUM *bn, size_t sz);
82 that holds the specified BIGNUM I<bn>.
83 When the I<bn> is zero or positive, its OSSL_PARAM type becomes
85 When the I<bn> is negative, its OSSL_PARAM type becomes B<OSSL_PARAM_INTEGER>.
86 If I<bn> is marked as being securely allocated, its OSSL_PARAM representation
88 The I<bn> argument is stored by reference and the underlying BIGNUM object
92 that holds the specified BIGNUM I<bn>.
95 When the I<bn> is zero or positive, its OSSL_PARAM type becomes
98 If I<bn> is marked as being securely allocated, its OSSL_PARAM representation
[all …]
H A DASN1_INTEGER_get_int64.pod22 ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
23 BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
31 ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai);
32 BIGNUM *ASN1_ENUMERATED_to_BN(const ASN1_ENUMERATED *ai, BIGNUM *bn);
62 BN_to_ASN1_INTEGER() converts B<BIGNUM> I<bn> to an B<ASN1_INTEGER>. If I<ai>
66 ASN1_INTEGER_to_BN() converts ASN1_INTEGER I<ai> into a B<BIGNUM>. If I<bn> is
67 NULL a new B<BIGNUM> structure is returned. If I<bn> is not NULL then the
/openssl/include/internal/
H A Dparam_build_set.h39 const char *key, const BIGNUM *bn);
41 const char *key, const BIGNUM *bn, size_t sz);
43 const char *key, const BIGNUM *bn);
45 const char *key, const BIGNUM *bn,
/openssl/crypto/ec/
H A Dec_deprecated.c42 const BIGNUM *bn, EC_POINT *point, BN_CTX *ctx) in EC_POINT_bn2point() argument
48 if ((buf_len = BN_num_bytes(bn)) == 0) in EC_POINT_bn2point()
55 if (BN_bn2binpad(bn, buf, buf_len) < 0) { in EC_POINT_bn2point()
/openssl/crypto/evp/
H A Dctrl_params_translate.c1651 if (bn == NULL) in get_payload_bn()
1655 ctx->p2 = (BIGNUM *)bn; in get_payload_bn()
1664 const BIGNUM *bn = NULL; in get_dh_dsa_payload_p() local
1689 const BIGNUM *bn = NULL; in get_dh_dsa_payload_q() local
1711 const BIGNUM *bn = NULL; in get_dh_dsa_payload_g() local
1771 const BIGNUM *bn = NULL; in get_rsa_payload_n() local
1784 const BIGNUM *bn = NULL; in get_rsa_payload_e() local
1797 const BIGNUM *bn = NULL; in get_rsa_payload_d() local
1812 const BIGNUM *bn = NULL; in get_rsa_payload_factor() local
1816 bn = RSA_get0_p(r); in get_rsa_payload_factor()
[all …]
/openssl/crypto/x509/
H A Dv3_asid.c261 BIGNUM *bn = NULL; in ASIdentifierChoice_is_canonical() local
301 if ((bn == NULL && (bn = BN_new()) == NULL) || in ASIdentifierChoice_is_canonical()
302 ASN1_INTEGER_to_BN(a_max, bn) == NULL || in ASIdentifierChoice_is_canonical()
303 !BN_add_word(bn, 1)) { in ASIdentifierChoice_is_canonical()
309 BN_to_ASN1_INTEGER(bn, orig = a_max_plus_one)) == NULL) { in ASIdentifierChoice_is_canonical()
340 BN_free(bn); in ASIdentifierChoice_is_canonical()
361 BIGNUM *bn = NULL; in ASIdentifierChoice_canonize() local
422 if ((bn == NULL && (bn = BN_new()) == NULL) || in ASIdentifierChoice_canonize()
423 ASN1_INTEGER_to_BN(a_max, bn) == NULL || in ASIdentifierChoice_canonize()
424 !BN_add_word(bn, 1)) { in ASIdentifierChoice_canonize()
[all …]

Completed in 69 milliseconds

1234