crypto/krb5/src/plugins/preauth/spake/edwards25519.c
1019
uint8_t index = scalar[31 - i/8];
crypto/krb5/src/plugins/preauth/spake/edwards25519.c
982
static void x25519_ge_scalarmult(ge_p2 *r, const uint8_t *scalar,
crypto/libecc/src/curves/prj_pt.c
1835
static int __prj_pt_unprotected_mult(prj_pt_t out, nn_src_t scalar, prj_pt_src_t public_in)
crypto/libecc/src/curves/prj_pt.c
1842
ret = nn_check_initialized(scalar); EG(ret, err);
crypto/libecc/src/curves/prj_pt.c
1850
ret = nn_iszero(scalar, &iszero); EG(ret, err);
crypto/libecc/src/curves/prj_pt.c
1857
ret = nn_bitlen(scalar, &explen); EG(ret, err);
crypto/libecc/src/curves/prj_pt.c
1865
ret = nn_getbit(scalar, explen, &expbit); EG(ret, err);
crypto/libecc/src/curves/prj_pt.c
1883
int _prj_pt_unprotected_mult(prj_pt_t out, nn_src_t scalar, prj_pt_src_t public_in)
crypto/libecc/src/curves/prj_pt.c
1892
ret = __prj_pt_unprotected_mult(out, scalar, &A);
crypto/libecc/src/curves/prj_pt.c
1898
ret = __prj_pt_unprotected_mult(out, scalar, public_in);
crypto/libecc/src/ecdh/x25519_448.c
164
nn scalar;
crypto/libecc/src/ecdh/x25519_448.c
170
scalar.magic = WORD(0);
crypto/libecc/src/ecdh/x25519_448.c
263
ret = nn_init_from_buf(&scalar, k_, len); EG(ret, err);
crypto/libecc/src/ecdh/x25519_448.c
266
ret = prj_pt_mul_blind(&Q, &scalar, &Q); EG(ret, err);
crypto/libecc/src/ecdh/x25519_448.c
268
ret = prj_pt_mul(&Q, &scalar, &Q); EG(ret, err);
crypto/libecc/src/ecdh/x25519_448.c
288
nn_uninit(&scalar);
crypto/libecc/src/ecdh/x25519_448.c
53
ATTRIBUTE_WARN_UNUSED_RET static int decode_scalar(u8 *scalar_decoded, const u8 *scalar, u8 len)
crypto/libecc/src/ecdh/x25519_448.c
59
MUST_HAVE((scalar != scalar_decoded), ret, err);
crypto/libecc/src/ecdh/x25519_448.c
65
scalar_decoded[len - 1 - i] = scalar[i];
crypto/libecc/src/sig/bip0340.c
698
u8 *scalar, u32 scalar_len, u32 num)
crypto/libecc/src/sig/bip0340.c
711
ret = _bip0340_chacha20_block(seed, nonce, num, scalar, scalar_len);
crypto/libecc/src/sig/bip0340.c
718
u8 *scalar, u32 scalar_len,
crypto/libecc/src/sig/bip0340.c
726
MUST_HAVE((seed != NULL) && (scalar != NULL) && (num != NULL) && (a != NULL), ret, err);
crypto/libecc/src/sig/bip0340.c
735
&scalar[size], remain,
crypto/libecc/src/sig/bip0340.c
74
ATTRIBUTE_WARN_UNUSED_RET static int _bip0340_set_scalar(nn_t scalar,
crypto/libecc/src/sig/bip0340.c
742
scalar[0] &= (u8)((0x1 << (q_bit_len % 8)) - 1);
crypto/libecc/src/sig/bip0340.c
745
ret = nn_init_from_buf(a, scalar, q_len); EG(ret, err);
crypto/libecc/src/sig/bip0340.c
96
ret = nn_mod_neg(scalar, scalar, q); EG(ret, err);
crypto/openssl/crypto/bn/bn_intern.c
117
window_val += bit * BN_is_bit_set(scalar, j + w);
crypto/openssl/crypto/bn/bn_intern.c
22
signed char *bn_compute_wNAF(const BIGNUM *scalar, int w, size_t *ret_len)
crypto/openssl/crypto/bn/bn_intern.c
30
if (BN_is_zero(scalar)) {
crypto/openssl/crypto/bn/bn_intern.c
48
if (BN_is_negative(scalar)) {
crypto/openssl/crypto/bn/bn_intern.c
52
if (scalar->d == NULL || scalar->top == 0) {
crypto/openssl/crypto/bn/bn_intern.c
57
len = BN_num_bits(scalar);
crypto/openssl/crypto/bn/bn_intern.c
65
window_val = scalar->d[0] & mask;
crypto/openssl/crypto/ec/curve25519.c
210
static void x25519_scalar_mulx(uint8_t out[32], const uint8_t scalar[32],
crypto/openssl/crypto/ec/curve25519.c
218
memcpy(e, scalar, 32);
crypto/openssl/crypto/ec/curve25519.c
4525
const uint8_t scalar[32],
crypto/openssl/crypto/ec/curve25519.c
4533
memcpy(e, scalar, 32);
crypto/openssl/crypto/ec/curve25519.c
4576
static void x25519_scalar_mult(uint8_t out[32], const uint8_t scalar[32],
crypto/openssl/crypto/ec/curve25519.c
4579
x25519_scalar_mult_generic(out, scalar, point);
crypto/openssl/crypto/ec/curve25519.c
727
static void x25519_scalar_mult(uint8_t out[32], const uint8_t scalar[32],
crypto/openssl/crypto/ec/curve25519.c
737
x25519_scalar_mulx(out, scalar, point);
crypto/openssl/crypto/ec/curve25519.c
742
memcpy(e, scalar, 32);
crypto/openssl/crypto/ec/curve448/curve448.c
229
const curve448_scalar_t scalar)
crypto/openssl/crypto/ec/curve448/curve448.c
236
ossl_curve448_scalar_add(scalar1x, scalar, precomputed_scalarmul_adjustment);
crypto/openssl/crypto/ec/curve448/curve448.c
382
const uint8_t scalar[X_PRIVATE_BYTES])
crypto/openssl/crypto/ec/curve448/curve448.c
396
uint8_t sb = scalar[t / 8];
crypto/openssl/crypto/ec/curve448/curve448.c
474
const uint8_t scalar[X_PRIVATE_BYTES])
crypto/openssl/crypto/ec/curve448/curve448.c
482
memcpy(scalar2, scalar, sizeof(scalar2));
crypto/openssl/crypto/ec/curve448/curve448.c
547
const curve448_scalar_t scalar,
crypto/openssl/crypto/ec/curve448/curve448.c
552
uint64_t current = scalar->limb[0] & 0xFFFF;
crypto/openssl/crypto/ec/curve448/curve448.c
555
const unsigned int B_OVER_16 = sizeof(scalar->limb[0]) / 2;
crypto/openssl/crypto/ec/curve448/curve448.c
572
current += (uint32_t)((scalar->limb[w / B_OVER_16]
crypto/openssl/crypto/ec/curve448/point_448.h
221
const uint8_t scalar[X448_PRIVATE_BYTES]);
crypto/openssl/crypto/ec/curve448/point_448.h
254
const uint8_t scalar[X448_PRIVATE_BYTES]);
crypto/openssl/crypto/ec/curve448/point_448.h
265
const curve448_scalar_t scalar);
crypto/openssl/crypto/ec/curve448/point_448.h
300
void ossl_curve448_scalar_destroy(curve448_scalar_t scalar);
crypto/openssl/crypto/ec/curve448/scalar.c
157
void ossl_curve448_scalar_destroy(curve448_scalar_t scalar)
crypto/openssl/crypto/ec/curve448/scalar.c
159
OPENSSL_cleanse(scalar, sizeof(curve448_scalar_t));
crypto/openssl/crypto/ec/ec2_smpl.c
863
const BIGNUM *scalar, size_t num,
crypto/openssl/crypto/ec/ec2_smpl.c
886
return ossl_ec_wNAF_mul(group, r, scalar, num, points, scalars, ctx);
crypto/openssl/crypto/ec/ec2_smpl.c
888
if (scalar != NULL && num == 0)
crypto/openssl/crypto/ec/ec2_smpl.c
890
return ossl_ec_scalar_mul_ladder(group, r, scalar, NULL, ctx);
crypto/openssl/crypto/ec/ec2_smpl.c
892
if (scalar == NULL && num == 1)
crypto/openssl/crypto/ec/ec2_smpl.c
906
if (!ossl_ec_scalar_mul_ladder(group, t, scalar, NULL, ctx)
crypto/openssl/crypto/ec/ec_lib.c
1070
int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
crypto/openssl/crypto/ec/ec_lib.c
1085
if (scalar == NULL && num == 0)
crypto/openssl/crypto/ec/ec_lib.c
1105
ret = group->meth->mul(group, r, scalar, num, points, scalars, ctx);
crypto/openssl/crypto/ec/ec_lib.c
1108
ret = ossl_ec_wNAF_mul(group, r, scalar, num, points, scalars, ctx);
crypto/openssl/crypto/ec/ec_local.h
135
int (*mul)(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
crypto/openssl/crypto/ec/ec_local.h
360
int ossl_ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
crypto/openssl/crypto/ec/ec_local.h
533
const BIGNUM *scalar, size_t num,
crypto/openssl/crypto/ec/ec_local.h
537
const BIGNUM *scalar, size_t num,
crypto/openssl/crypto/ec/ec_local.h
553
const BIGNUM *scalar, size_t num,
crypto/openssl/crypto/ec/ec_local.h
557
const BIGNUM *scalar, size_t num,
crypto/openssl/crypto/ec/ec_local.h
573
const BIGNUM *scalar, size_t num,
crypto/openssl/crypto/ec/ec_local.h
577
const BIGNUM *scalar, size_t num,
crypto/openssl/crypto/ec/ec_local.h
594
const BIGNUM *scalar, size_t num,
crypto/openssl/crypto/ec/ec_local.h
598
const BIGNUM *scalar, size_t num,
crypto/openssl/crypto/ec/ec_local.h
756
const BIGNUM *scalar, const EC_POINT *point,
crypto/openssl/crypto/ec/ec_mult.c
141
const BIGNUM *scalar, const EC_POINT *point,
crypto/openssl/crypto/ec/ec_mult.c
216
if (!BN_copy(k, scalar)) {
crypto/openssl/crypto/ec/ec_mult.c
403
int ossl_ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
crypto/openssl/crypto/ec/ec_mult.c
437
if ((scalar != group->order) && (scalar != NULL) && (num == 0)) {
crypto/openssl/crypto/ec/ec_mult.c
446
return ossl_ec_scalar_mul_ladder(group, r, scalar, NULL, ctx);
crypto/openssl/crypto/ec/ec_mult.c
448
if ((scalar == NULL) && (num == 1) && (scalars[0] != group->order)) {
crypto/openssl/crypto/ec/ec_mult.c
461
if (scalar != NULL) {
crypto/openssl/crypto/ec/ec_mult.c
479
numblocks = (BN_num_bits(scalar) / blocksize) + 1;
crypto/openssl/crypto/ec/ec_mult.c
526
bits = i < num ? BN_num_bits(scalars[i]) : BN_num_bits(scalar);
crypto/openssl/crypto/ec/ec_mult.c
530
wNAF[i] = bn_compute_wNAF((i < num ? scalars[i] : scalar), wsize[i],
crypto/openssl/crypto/ec/ec_mult.c
560
tmp_wNAF = bn_compute_wNAF(scalar, wsize[num], &tmp_len);
crypto/openssl/crypto/ec/ecp_nistp224.c
1391
const BIGNUM *scalar, size_t num,
crypto/openssl/crypto/ec/ecp_nistp224.c
1422
if (scalar != NULL) {
crypto/openssl/crypto/ec/ecp_nistp224.c
1477
p_scalar = scalar;
crypto/openssl/crypto/ec/ecp_nistp224.c
1533
if ((scalar != NULL) && (have_pre_comp)) {
crypto/openssl/crypto/ec/ecp_nistp224.c
1536
if ((BN_num_bits(scalar) > 224) || (BN_is_negative(scalar))) {
crypto/openssl/crypto/ec/ecp_nistp224.c
1541
if (!BN_nnmod(tmp_scalar, scalar, group->order, ctx)) {
crypto/openssl/crypto/ec/ecp_nistp224.c
1547
num_bytes = BN_bn2lebinpad(scalar, g_secret, sizeof(g_secret));
crypto/openssl/crypto/ec/ecp_nistp224.c
462
static void felem_scalar(felem out, const limb scalar)
crypto/openssl/crypto/ec/ecp_nistp224.c
464
out[0] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp224.c
465
out[1] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp224.c
466
out[2] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp224.c
467
out[3] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp224.c
474
static void widefelem_scalar(widefelem out, const widelimb scalar)
crypto/openssl/crypto/ec/ecp_nistp224.c
476
out[0] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp224.c
477
out[1] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp224.c
478
out[2] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp224.c
479
out[3] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp224.c
480
out[4] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp224.c
481
out[5] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp224.c
482
out[6] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp256.c
2010
const BIGNUM *scalar, size_t num,
crypto/openssl/crypto/ec/ecp_nistp256.c
2042
if (scalar != NULL) {
crypto/openssl/crypto/ec/ecp_nistp256.c
2101
p_scalar = scalar;
crypto/openssl/crypto/ec/ecp_nistp256.c
2159
if ((scalar != NULL) && (have_pre_comp)) {
crypto/openssl/crypto/ec/ecp_nistp256.c
2162
if ((BN_num_bits(scalar) > 256) || (BN_is_negative(scalar))) {
crypto/openssl/crypto/ec/ecp_nistp256.c
2167
if (!BN_nnmod(tmp_scalar, scalar, group->order, ctx)) {
crypto/openssl/crypto/ec/ecp_nistp256.c
2173
num_bytes = BN_bn2lebinpad(scalar, g_secret, sizeof(g_secret));
crypto/openssl/crypto/ec/ecp_nistp256.c
225
static void felem_scalar(felem out, const u64 scalar)
crypto/openssl/crypto/ec/ecp_nistp256.c
227
out[0] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp256.c
228
out[1] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp256.c
229
out[2] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp256.c
230
out[3] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp256.c
234
static void longfelem_scalar(longfelem out, const u64 scalar)
crypto/openssl/crypto/ec/ecp_nistp256.c
236
out[0] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp256.c
237
out[1] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp256.c
238
out[2] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp256.c
239
out[3] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp256.c
240
out[4] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp256.c
241
out[5] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp256.c
242
out[6] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp256.c
243
out[7] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp384.c
1731
const BIGNUM *scalar, size_t num,
crypto/openssl/crypto/ec/ecp_nistp384.c
1762
if (scalar != NULL) {
crypto/openssl/crypto/ec/ecp_nistp384.c
1820
p_scalar = scalar;
crypto/openssl/crypto/ec/ecp_nistp384.c
1871
if (scalar != NULL && have_pre_comp) {
crypto/openssl/crypto/ec/ecp_nistp384.c
1874
if ((BN_num_bits(scalar) > 384) || (BN_is_negative(scalar))) {
crypto/openssl/crypto/ec/ecp_nistp384.c
1879
if (!BN_nnmod(tmp_scalar, scalar, group->order, ctx)) {
crypto/openssl/crypto/ec/ecp_nistp384.c
1885
num_bytes = BN_bn2lebinpad(scalar, g_secret, sizeof(g_secret));
crypto/openssl/crypto/ec/ecp_nistp384.c
194
static void felem_scalar(felem out, const felem in, limb scalar)
crypto/openssl/crypto/ec/ecp_nistp384.c
199
out[i] = in[i] * scalar;
crypto/openssl/crypto/ec/ecp_nistp384.c
203
static void felem_scalar64(felem out, limb scalar)
crypto/openssl/crypto/ec/ecp_nistp384.c
208
out[i] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp384.c
212
static void felem_scalar128(widefelem out, limb scalar)
crypto/openssl/crypto/ec/ecp_nistp384.c
217
out[i] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
1825
const BIGNUM *scalar, size_t num,
crypto/openssl/crypto/ec/ecp_nistp521.c
1856
if (scalar != NULL) {
crypto/openssl/crypto/ec/ecp_nistp521.c
1914
p_scalar = scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
1970
if ((scalar != NULL) && (have_pre_comp)) {
crypto/openssl/crypto/ec/ecp_nistp521.c
1973
if ((BN_num_bits(scalar) > 521) || (BN_is_negative(scalar))) {
crypto/openssl/crypto/ec/ecp_nistp521.c
1978
if (!BN_nnmod(tmp_scalar, scalar, group->order, ctx)) {
crypto/openssl/crypto/ec/ecp_nistp521.c
1984
num_bytes = BN_bn2lebinpad(scalar, g_secret, sizeof(g_secret));
crypto/openssl/crypto/ec/ecp_nistp521.c
247
static void felem_scalar(felem out, const felem in, limb scalar)
crypto/openssl/crypto/ec/ecp_nistp521.c
249
out[0] = in[0] * scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
250
out[1] = in[1] * scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
251
out[2] = in[2] * scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
252
out[3] = in[3] * scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
253
out[4] = in[4] * scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
254
out[5] = in[5] * scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
255
out[6] = in[6] * scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
256
out[7] = in[7] * scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
257
out[8] = in[8] * scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
261
static void felem_scalar64(felem out, limb scalar)
crypto/openssl/crypto/ec/ecp_nistp521.c
263
out[0] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
264
out[1] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
265
out[2] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
266
out[3] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
267
out[4] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
268
out[5] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
269
out[6] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
270
out[7] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
271
out[8] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
275
static void felem_scalar128(largefelem out, limb scalar)
crypto/openssl/crypto/ec/ecp_nistp521.c
277
out[0] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
278
out[1] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
279
out[2] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
280
out[3] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
281
out[4] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
282
out[5] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
283
out[6] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
284
out[7] *= scalar;
crypto/openssl/crypto/ec/ecp_nistp521.c
285
out[8] *= scalar;
crypto/openssl/crypto/ec/ecp_nistz256.c
1007
if ((BN_num_bits(scalar) > 256)
crypto/openssl/crypto/ec/ecp_nistz256.c
1008
|| BN_is_negative(scalar)) {
crypto/openssl/crypto/ec/ecp_nistz256.c
1012
if (!BN_nnmod(tmp_scalar, scalar, group->order, ctx)) {
crypto/openssl/crypto/ec/ecp_nistz256.c
1016
scalar = tmp_scalar;
crypto/openssl/crypto/ec/ecp_nistz256.c
1019
for (i = 0; i < bn_get_top(scalar) * BN_BYTES; i += BN_BYTES) {
crypto/openssl/crypto/ec/ecp_nistz256.c
1020
BN_ULONG d = bn_get_words(scalar)[i / BN_BYTES];
crypto/openssl/crypto/ec/ecp_nistz256.c
1110
new_scalars[num] = scalar;
crypto/openssl/crypto/ec/ecp_nistz256.c
607
const BIGNUM **scalar,
crypto/openssl/crypto/ec/ecp_nistz256.c
637
if ((BN_num_bits(scalar[i]) > 256) || BN_is_negative(scalar[i])) {
crypto/openssl/crypto/ec/ecp_nistz256.c
642
if (!BN_nnmod(mod, scalar[i], group->order, ctx)) {
crypto/openssl/crypto/ec/ecp_nistz256.c
648
scalars[i] = scalar[i];
crypto/openssl/crypto/ec/ecp_nistz256.c
932
const BIGNUM *scalar,
crypto/openssl/crypto/ec/ecp_nistz256.c
962
if (scalar) {
crypto/openssl/crypto/ec/ecp_s390x_nistp.c
123
rc = ossl_ec_wNAF_mul(group, r, scalar, num, points, scalars, ctx);
crypto/openssl/crypto/ec/ecp_s390x_nistp.c
309
const BIGNUM *scalar, \
crypto/openssl/crypto/ec/ecp_s390x_nistp.c
315
return ec_GFp_s390x_nistp_mul(group, r, scalar, num, points, \
crypto/openssl/crypto/ec/ecp_s390x_nistp.c
50
const BIGNUM *scalar,
crypto/openssl/crypto/ec/ecp_s390x_nistp.c
82
if ((scalar != NULL && num == 0 && BN_is_negative(scalar) == 0)
crypto/openssl/crypto/ec/ecp_s390x_nistp.c
83
|| (scalar == NULL && num == 1 && BN_is_negative(scalars[0]) == 0)) {
crypto/openssl/crypto/ec/ecp_s390x_nistp.c
87
scalar_ptr = scalar;
crypto/openssl/crypto/ec/ecp_sm2p256.c
450
const BIGNUM **scalar,
crypto/openssl/crypto/ec/ecp_sm2p256.c
476
if ((BN_num_bits(scalar[i]) > 256) || BN_is_negative(scalar[i])) {
crypto/openssl/crypto/ec/ecp_sm2p256.c
481
if (!BN_nnmod(tmp, scalar[i], group->order, ctx)) {
crypto/openssl/crypto/ec/ecp_sm2p256.c
487
scalars[i] = scalar[i];
crypto/openssl/crypto/ec/ecp_sm2p256.c
512
const BIGNUM *scalar,
crypto/openssl/crypto/ec/ecp_sm2p256.c
532
if (scalar) {
crypto/openssl/crypto/ec/ecp_sm2p256.c
539
if (!ecp_sm2p256_bignum_field_elem(k, scalar)) {
crypto/openssl/crypto/ec/ecp_sm2p256.c
554
g_scalars[0] = scalar;
crypto/openssl/crypto/ml_kem/ml_kem.c
100
scalar tbuf[(rank)]; \
crypto/openssl/crypto/ml_kem/ml_kem.c
1010
static void scalar_decode(scalar *out, const uint8_t *in, int bits)
crypto/openssl/crypto/ml_kem/ml_kem.c
102
scalar mbuf[(rank) * (rank)] /* optional private key data */ \
crypto/openssl/crypto/ml_kem/ml_kem.c
1055
static __owur int scalar_decode_12(scalar *out, const uint8_t in[3 * DEGREE / 2])
crypto/openssl/crypto/ml_kem/ml_kem.c
1086
scalar_decode_decompress_add(scalar *out, const uint8_t in[DEGREE / 8])
crypto/openssl/crypto/ml_kem/ml_kem.c
109
DECLARE_ML_KEM_KEYDATA(prvkey_##bits, ML_KEM_##bits##_RANK, ; scalar sbuf[ML_KEM_##bits##_RANK]; uint8_t zbuf[2 * ML_KEM_RANDOM_BYTES];)
crypto/openssl/crypto/ml_kem/ml_kem.c
116
typedef __owur int (*CBD_FUNC)(scalar *out, uint8_t in[ML_KEM_RANDOM_BYTES + 1],
crypto/openssl/crypto/ml_kem/ml_kem.c
1177
static void scalar_compress(scalar *s, int bits)
crypto/openssl/crypto/ml_kem/ml_kem.c
118
static void scalar_encode(uint8_t *out, const scalar *s, int bits);
crypto/openssl/crypto/ml_kem/ml_kem.c
1189
static void scalar_decompress(scalar *s, int bits)
crypto/openssl/crypto/ml_kem/ml_kem.c
1198
static void vector_add(scalar *lhs, const scalar *rhs, int rank)
crypto/openssl/crypto/ml_kem/ml_kem.c
1210
static void vector_encode(uint8_t *out, const scalar *a, int bits, int rank)
crypto/openssl/crypto/ml_kem/ml_kem.c
1228
vector_decode_decompress_ntt(scalar *out, const uint8_t *in, int bits, int rank)
crypto/openssl/crypto/ml_kem/ml_kem.c
1240
static __owur int vector_decode_12(scalar *out, const uint8_t in[3 * DEGREE / 2], int rank)
crypto/openssl/crypto/ml_kem/ml_kem.c
1251
static void vector_compress(scalar *a, int bits, int rank)
crypto/openssl/crypto/ml_kem/ml_kem.c
1259
static void inner_product(scalar *out, const scalar *lhs, const scalar *rhs,
crypto/openssl/crypto/ml_kem/ml_kem.c
1272
matrix_mult_intt(scalar *out, const scalar *m, const scalar *a, int rank)
crypto/openssl/crypto/ml_kem/ml_kem.c
1274
const scalar *ar;
crypto/openssl/crypto/ml_kem/ml_kem.c
1287
matrix_mult_transpose_add(scalar *out, const scalar *m, const scalar *a, int rank)
crypto/openssl/crypto/ml_kem/ml_kem.c
1289
const scalar *mc = m, *mr, *ar;
crypto/openssl/crypto/ml_kem/ml_kem.c
1308
scalar *out = key->m;
crypto/openssl/crypto/ml_kem/ml_kem.c
1335
static __owur int cbd_2(scalar *out, uint8_t in[ML_KEM_RANDOM_BYTES + 1],
crypto/openssl/crypto/ml_kem/ml_kem.c
1375
static __owur int cbd_3(scalar *out, uint8_t in[ML_KEM_RANDOM_BYTES + 1],
crypto/openssl/crypto/ml_kem/ml_kem.c
1425
static __owur int gencbd_vector(scalar *out, CBD_FUNC cbd, uint8_t *counter,
crypto/openssl/crypto/ml_kem/ml_kem.c
1443
static __owur int gencbd_vector_ntt(scalar *out, CBD_FUNC cbd, uint8_t *counter,
crypto/openssl/crypto/ml_kem/ml_kem.c
1480
const uint8_t r[ML_KEM_RANDOM_BYTES], scalar *tmp,
crypto/openssl/crypto/ml_kem/ml_kem.c
1487
scalar *y = &tmp[0], *e1 = y, *e2 = y;
crypto/openssl/crypto/ml_kem/ml_kem.c
1489
scalar *u = &tmp[rank];
crypto/openssl/crypto/ml_kem/ml_kem.c
1490
scalar v;
crypto/openssl/crypto/ml_kem/ml_kem.c
1531
const uint8_t *ctext, scalar *u, const ML_KEM_KEY *key)
crypto/openssl/crypto/ml_kem/ml_kem.c
1534
scalar v, mask;
crypto/openssl/crypto/ml_kem/ml_kem.c
1714
CONSTTIME_DECLASSIFY(key->t, vinfo->rank * sizeof(scalar));
crypto/openssl/crypto/ml_kem/ml_kem.c
1760
scalar *tmp, EVP_MD_CTX *mdctx, const ML_KEM_KEY *key)
crypto/openssl/crypto/ml_kem/ml_kem.c
1794
const uint8_t *ctext, uint8_t *tmp_ctext, scalar *tmp,
crypto/openssl/crypto/ml_kem/ml_kem.c
1848
static __owur int add_storage(scalar *p, int private, ML_KEM_KEY *key)
crypto/openssl/crypto/ml_kem/ml_kem.c
1896
key->vinfo->rank * sizeof(scalar) + 2 * ML_KEM_RANDOM_BYTES);
crypto/openssl/crypto/ml_kem/ml_kem.c
2204
CONSTTIME_DECLASSIFY(key->s, vinfo->rank * sizeof(scalar));
crypto/openssl/crypto/ml_kem/ml_kem.c
2244
scalar tmp[2 * ML_KEM_##bits##_RANK]; \
crypto/openssl/crypto/ml_kem/ml_kem.c
2312
classify_bytes = 2 * sizeof(scalar) + ML_KEM_RANDOM_BYTES;
crypto/openssl/crypto/ml_kem/ml_kem.c
2325
scalar tmp[2 * ML_KEM_##bits##_RANK]; \
crypto/openssl/crypto/ml_kem/ml_kem.c
701
const scalar *t = key->t, *end = t + vinfo->rank;
crypto/openssl/crypto/ml_kem/ml_kem.c
756
static __owur int sample_scalar(scalar *out, EVP_MD_CTX *mdctx)
crypto/openssl/crypto/ml_kem/ml_kem.c
816
static void scalar_mult_const(scalar *s, uint16_t a)
crypto/openssl/crypto/ml_kem/ml_kem.c
835
static void scalar_ntt(scalar *s)
crypto/openssl/crypto/ml_kem/ml_kem.c
867
static void scalar_inverse_ntt(scalar *s)
crypto/openssl/crypto/ml_kem/ml_kem.c
893
static void scalar_add(scalar *lhs, const scalar *rhs)
crypto/openssl/crypto/ml_kem/ml_kem.c
902
static void scalar_sub(scalar *lhs, const scalar *rhs)
crypto/openssl/crypto/ml_kem/ml_kem.c
921
static void scalar_mult(scalar *out, const scalar *lhs,
crypto/openssl/crypto/ml_kem/ml_kem.c
922
const scalar *rhs)
crypto/openssl/crypto/ml_kem/ml_kem.c
939
static ossl_inline void scalar_mult_add(scalar *out, const scalar *lhs,
crypto/openssl/crypto/ml_kem/ml_kem.c
940
const scalar *rhs)
crypto/openssl/crypto/ml_kem/ml_kem.c
962
static void scalar_encode(uint8_t *out, const scalar *s, int bits)
crypto/openssl/crypto/ml_kem/ml_kem.c
988
static void scalar_encode_1(uint8_t out[DEGREE / 8], const scalar *s)
crypto/openssl/include/crypto/bn.h
30
signed char *bn_compute_wNAF(const BIGNUM *scalar, int w, size_t *ret_len);
crypto/openssl/test/ecstresstest.c
44
BIGNUM *scalar = NULL;
crypto/openssl/test/ecstresstest.c
47
if (!TEST_ptr(scalar = BN_new())
crypto/openssl/test/ecstresstest.c
48
|| !TEST_true(EC_POINT_get_affine_coordinates(group, point, scalar,
crypto/openssl/test/ecstresstest.c
53
if (!TEST_true(EC_POINT_mul(group, point, NULL, point, scalar, NULL))
crypto/openssl/test/ecstresstest.c
55
scalar,
crypto/openssl/test/ecstresstest.c
59
return scalar;
crypto/openssl/test/ecstresstest.c
62
BN_free(scalar);
lib/libpmc/libpmc.c
456
__K8MASK(scalar-sse-sse2, 3),