/openssl/test/ |
H A D | ecstresstest.c | 45 BIGNUM *scalar = NULL; in walk_curve() local 48 if (!TEST_ptr(scalar = BN_new()) in walk_curve() 49 || !TEST_true(EC_POINT_get_affine_coordinates(group, point, scalar, in walk_curve() 54 if (!TEST_true(EC_POINT_mul(group, point, NULL, point, scalar, NULL)) in walk_curve() 56 scalar, in walk_curve() 60 return scalar; in walk_curve() 63 BN_free(scalar); in walk_curve()
|
/openssl/crypto/bn/ |
H A D | bn_intern.c | 22 signed char *bn_compute_wNAF(const BIGNUM *scalar, int w, size_t *ret_len) in bn_compute_wNAF() argument 30 if (BN_is_zero(scalar)) { in bn_compute_wNAF() 48 if (BN_is_negative(scalar)) { in bn_compute_wNAF() 52 if (scalar->d == NULL || scalar->top == 0) { in bn_compute_wNAF() 57 len = BN_num_bits(scalar); in bn_compute_wNAF() 65 window_val = scalar->d[0] & mask; in bn_compute_wNAF() 117 window_val += bit * BN_is_bit_set(scalar, j + w); in bn_compute_wNAF()
|
/openssl/crypto/ec/ |
H A D | ecp_nistp521.c | 263 out[0] *= scalar; in felem_scalar64() 264 out[1] *= scalar; in felem_scalar64() 265 out[2] *= scalar; in felem_scalar64() 266 out[3] *= scalar; in felem_scalar64() 267 out[4] *= scalar; in felem_scalar64() 268 out[5] *= scalar; in felem_scalar64() 269 out[6] *= scalar; in felem_scalar64() 270 out[7] *= scalar; in felem_scalar64() 271 out[8] *= scalar; in felem_scalar64() 277 out[0] *= scalar; in felem_scalar128() [all …]
|
H A D | ecp_s390x_nistp.c | 48 const BIGNUM *scalar, in ec_GFp_s390x_nistp_mul() argument 80 if ((scalar != NULL && num == 0 && BN_is_negative(scalar) == 0) in ec_GFp_s390x_nistp_mul() 81 || (scalar == NULL && num == 1 && BN_is_negative(scalars[0]) == 0)) { in ec_GFp_s390x_nistp_mul() 85 scalar_ptr = scalar; in ec_GFp_s390x_nistp_mul() 118 rc = ossl_ec_wNAF_mul(group, r, scalar, num, points, scalars, ctx); in ec_GFp_s390x_nistp_mul() 288 const BIGNUM *scalar, \ 294 return ec_GFp_s390x_nistp_mul(group, r, scalar, num, points, \
|
H A D | ecp_nistp224.c | 470 out[0] *= scalar; in felem_scalar() 471 out[1] *= scalar; in felem_scalar() 472 out[2] *= scalar; in felem_scalar() 473 out[3] *= scalar; in felem_scalar() 482 out[0] *= scalar; in widefelem_scalar() 483 out[1] *= scalar; in widefelem_scalar() 484 out[2] *= scalar; in widefelem_scalar() 485 out[3] *= scalar; in widefelem_scalar() 486 out[4] *= scalar; in widefelem_scalar() 487 out[5] *= scalar; in widefelem_scalar() [all …]
|
H A D | ec_mult.c | 140 const BIGNUM *scalar, const EC_POINT *point, in ossl_ec_scalar_mul_ladder() argument 215 if (!BN_copy(k, scalar)) { in ossl_ec_scalar_mul_ladder() 404 int ossl_ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, in ossl_ec_wNAF_mul() argument 438 if ((scalar != group->order) && (scalar != NULL) && (num == 0)) { in ossl_ec_wNAF_mul() 447 return ossl_ec_scalar_mul_ladder(group, r, scalar, NULL, ctx); in ossl_ec_wNAF_mul() 449 if ((scalar == NULL) && (num == 1) && (scalars[0] != group->order)) { in ossl_ec_wNAF_mul() 462 if (scalar != NULL) { in ossl_ec_wNAF_mul() 481 numblocks = (BN_num_bits(scalar) / blocksize) + 1; in ossl_ec_wNAF_mul() 528 bits = i < num ? BN_num_bits(scalars[i]) : BN_num_bits(scalar); in ossl_ec_wNAF_mul() 533 bn_compute_wNAF((i < num ? scalars[i] : scalar), wsize[i], in ossl_ec_wNAF_mul() [all …]
|
H A D | ec_local.h | 135 int (*mul) (const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, 356 int ossl_ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, 529 const BIGNUM *scalar, size_t num, 533 const BIGNUM *scalar, size_t num, 549 const BIGNUM *scalar, size_t num, 553 const BIGNUM *scalar, size_t num, 569 const BIGNUM *scalar, size_t num, 573 const BIGNUM *scalar, size_t num, 590 const BIGNUM *scalar, size_t num, 594 const BIGNUM *scalar, size_t num, [all …]
|
H A D | ecp_nistp256.c | 227 out[0] *= scalar; in felem_scalar() 228 out[1] *= scalar; in felem_scalar() 229 out[2] *= scalar; in felem_scalar() 230 out[3] *= scalar; in felem_scalar() 236 out[0] *= scalar; in longfelem_scalar() 237 out[1] *= scalar; in longfelem_scalar() 238 out[2] *= scalar; in longfelem_scalar() 239 out[3] *= scalar; in longfelem_scalar() 240 out[4] *= scalar; in longfelem_scalar() 241 out[5] *= scalar; in longfelem_scalar() [all …]
|
H A D | ecp_sm2p256.c | 506 const BIGNUM **scalar, in ecp_sm2p256_windowed_mul() argument 532 if ((BN_num_bits(scalar[i]) > 256) || BN_is_negative(scalar[i])) { in ecp_sm2p256_windowed_mul() 537 if (!BN_nnmod(tmp, scalar[i], group->order, ctx)) { in ecp_sm2p256_windowed_mul() 543 scalars[i] = scalar[i]; in ecp_sm2p256_windowed_mul() 568 const BIGNUM *scalar, in ecp_sm2p256_points_mul() argument 588 if (scalar) { in ecp_sm2p256_points_mul() 595 if (!ecp_sm2p256_bignum_field_elem(k, scalar)) { in ecp_sm2p256_points_mul() 610 g_scalars[0] = scalar; in ecp_sm2p256_points_mul()
|
H A D | ecp_nistp384.c | 194 static void felem_scalar(felem out, const felem in, limb scalar) in felem_scalar() argument 199 out[i] = in[i] * scalar; in felem_scalar() 203 static void felem_scalar64(felem out, limb scalar) in felem_scalar64() argument 208 out[i] *= scalar; in felem_scalar64() 212 static void felem_scalar128(widefelem out, limb scalar) in felem_scalar128() argument 217 out[i] *= scalar; in felem_scalar128() 1731 if (scalar != NULL) { in ossl_ec_GFp_nistp384_points_mul() 1792 p_scalar = scalar; in ossl_ec_GFp_nistp384_points_mul() 1845 if (scalar != NULL && have_pre_comp) { in ossl_ec_GFp_nistp384_points_mul() 1848 if ((BN_num_bits(scalar) > 384) || (BN_is_negative(scalar))) { in ossl_ec_GFp_nistp384_points_mul() [all …]
|
H A D | ecp_nistz256.c | 609 const BIGNUM **scalar, in ecp_nistz256_windowed_mul() argument 640 if ((BN_num_bits(scalar[i]) > 256) || BN_is_negative(scalar[i])) { in ecp_nistz256_windowed_mul() 645 if (!BN_nnmod(mod, scalar[i], group->order, ctx)) { in ecp_nistz256_windowed_mul() 651 scalars[i] = scalar[i]; in ecp_nistz256_windowed_mul() 941 const BIGNUM *scalar, in ecp_nistz256_points_mul() argument 971 if (scalar) { in ecp_nistz256_points_mul() 1016 if ((BN_num_bits(scalar) > 256) in ecp_nistz256_points_mul() 1017 || BN_is_negative(scalar)) { in ecp_nistz256_points_mul() 1025 scalar = tmp_scalar; in ecp_nistz256_points_mul() 1029 BN_ULONG d = bn_get_words(scalar)[i / BN_BYTES]; in ecp_nistz256_points_mul() [all …]
|
H A D | ec2_smpl.c | 869 const BIGNUM *scalar, size_t num, in ec_GF2m_simple_points_mul() argument 892 return ossl_ec_wNAF_mul(group, r, scalar, num, points, scalars, ctx); in ec_GF2m_simple_points_mul() 894 if (scalar != NULL && num == 0) in ec_GF2m_simple_points_mul() 896 return ossl_ec_scalar_mul_ladder(group, r, scalar, NULL, ctx); in ec_GF2m_simple_points_mul() 898 if (scalar == NULL && num == 1) in ec_GF2m_simple_points_mul() 912 if (!ossl_ec_scalar_mul_ladder(group, t, scalar, NULL, ctx) in ec_GF2m_simple_points_mul()
|
/openssl/crypto/ec/curve448/ |
H A D | point_448.h | 228 const uint8_t scalar[X448_PRIVATE_BYTES]); 263 const uint8_t scalar[X448_PRIVATE_BYTES]); 275 const curve448_scalar_t scalar); 311 void ossl_curve448_scalar_destroy(curve448_scalar_t scalar);
|
H A D | curve448.c | 234 const curve448_scalar_t scalar) in ossl_curve448_precomputed_scalarmul() argument 241 ossl_curve448_scalar_add(scalar1x, scalar, precomputed_scalarmul_adjustment); in ossl_curve448_precomputed_scalarmul() 389 const uint8_t scalar[X_PRIVATE_BYTES]) in ossl_x448_int() 403 uint8_t sb = scalar[t / 8]; in ossl_x448_int() 482 const uint8_t scalar[X_PRIVATE_BYTES]) in ossl_x448_derive_public_key() 490 memcpy(scalar2, scalar, sizeof(scalar2)); in ossl_x448_derive_public_key() 555 const curve448_scalar_t scalar, in recode_wnaf() argument 560 uint64_t current = scalar->limb[0] & 0xFFFF; in recode_wnaf() 563 const unsigned int B_OVER_16 = sizeof(scalar->limb[0]) / 2; in recode_wnaf() 580 current += (uint32_t)((scalar->limb[w / B_OVER_16] in recode_wnaf()
|
H A D | scalar.c | 170 void ossl_curve448_scalar_destroy(curve448_scalar_t scalar) in ossl_curve448_scalar_destroy() argument 172 OPENSSL_cleanse(scalar, sizeof(curve448_scalar_t)); in ossl_curve448_scalar_destroy()
|
/openssl/test/recipes/ |
H A D | 15-test_ecparam.t | 128 plan tests => 2 * scalar(@valid); 133 plan tests => 2 * scalar(@valid); 139 plan tests => 2 * scalar(@apps);
|
H A D | 90-test_store.t | 112 * ( (3 * scalar @noexist_files) 113 + (6 * scalar @src_files) 114 + (2 * scalar @data_files) 115 + (4 * scalar @generated_files) 129 $n += 4 * scalar @src_rsa_files;
|
H A D | 80-test_ca_internals.t | 87 plan tests => 3 * scalar(@updatedb_tests) + 88 1 * scalar(@unsupported_commands);
|
H A D | 15-test_genec.t | 173 plan tests => scalar(@curve_list) * scalar(keys %params_encodings) 252 plan tests => scalar(@explicit_only_curves) * scalar(keys %params_encodings)
|
H A D | 04-test_conf.t | 27 plan tests => 2 * scalar(keys %input_result);
|
H A D | 61-test_bio_prefix.t | 22 plan tests => 2 * scalar(keys %input_result);
|
H A D | 30-test_evp_fetch_prov.t | 99 plan tests => 1 + $testcount * scalar(@types);
|
/openssl/exporters/pkg-config/ |
H A D | libssl.pc.in | 21 if (scalar @OpenSSL::safe::installdata::INCLUDEDIR_REL_PREFIX > 1) {
|
H A D | libcrypto.pc.in | 23 if (scalar @OpenSSL::safe::installdata::INCLUDEDIR_REL_PREFIX > 1) {
|
/openssl/apps/ |
H A D | CA.pl.in | 61 while ( scalar(@_) > 0 ) { 69 unless scalar grep { $arg eq $_ } @OPENSSL_CMDS;
|