/crypto/fipsmodule/bn/ |
A D | bn_test_to_fuzzer.go | 53 s.lineNo++ 81 s.test = test{ 90 if len(s.scanner.Text()) != 0 && s.scanner.Text()[0] != '#' { 96 s.test.Type, ok = s.addAttribute(s.scanner.Text()) 100 s.test.LineNumber = s.lineNo 102 for s.scanLine() { 111 if _, ok := s.addAttribute(s.scanner.Text()); !ok { 119 return s.test 123 if s.err != nil { 124 return s.err [all …]
|
A D | check_bn_tests.go | 50 s.lineNo++ 78 s.test = test{ 87 if len(s.scanner.Text()) != 0 && s.scanner.Text()[0] != '#' { 93 s.test.Type, ok = s.addAttribute(s.scanner.Text()) 97 s.test.LineNumber = s.lineNo 99 for s.scanLine() { 108 if _, ok := s.addAttribute(s.scanner.Text()); !ok { 116 return s.test 120 if s.err != nil { 121 return s.err [all …]
|
/crypto/ |
A D | cpu_arm_linux.h | 76 if (s->len == 0) { in STRING_PIECE_get_delimited() 79 if (!STRING_PIECE_split(out, s, s, sep)) { in STRING_PIECE_get_delimited() 81 *out = *s; in STRING_PIECE_get_delimited() 82 s->data += s->len; in STRING_PIECE_get_delimited() 83 s->len = 0; in STRING_PIECE_get_delimited() 90 while (s->len != 0 && (s->data[0] == ' ' || s->data[0] == '\t')) { in STRING_PIECE_trim() 91 s->data++; in STRING_PIECE_trim() 92 s->len--; in STRING_PIECE_trim() 94 while (s->len != 0 && in STRING_PIECE_trim() 95 (s->data[s->len - 1] == ' ' || s->data[s->len - 1] == '\t')) { in STRING_PIECE_trim() [all …]
|
/crypto/curve25519/ |
A D | curve25519.cc | 378 uint8_t s[32]; in fe_isnonzero() local 388 uint8_t s[32]; in fe_isnegative() local 390 return s[0] & 1; in fe_isnegative() 810 ge_p2 s; in x25519_ge_scalarmult_base() local 1339 s[0] = s0 >> 0; in x25519_sc_reduce() 1340 s[1] = s0 >> 8; in x25519_sc_reduce() 1342 s[3] = s1 >> 3; in x25519_sc_reduce() 1345 s[6] = s2 >> 6; in x25519_sc_reduce() 1347 s[8] = s3 >> 1; in x25519_sc_reduce() 1348 s[9] = s3 >> 9; in x25519_sc_reduce() [all …]
|
/crypto/asn1/ |
A D | a_gentm.cc | 51 if (s != NULL) { in ASN1_GENERALIZEDTIME_set_string() 52 if (!ASN1_STRING_set(s, str, len)) { in ASN1_GENERALIZEDTIME_set_string() 55 s->type = V_ASN1_GENERALIZEDTIME; in ASN1_GENERALIZEDTIME_set_string() 62 return ASN1_GENERALIZEDTIME_adj(s, posix_time, 0, 0); in ASN1_GENERALIZEDTIME_set() 93 if (s == NULL) { in ASN1_GENERALIZEDTIME_adj() 95 s = ASN1_UTCTIME_new(); in ASN1_GENERALIZEDTIME_adj() 96 if (s == NULL) { in ASN1_GENERALIZEDTIME_adj() 101 if (!ASN1_STRING_set(s, buf, strlen(buf))) { in ASN1_GENERALIZEDTIME_adj() 103 ASN1_UTCTIME_free(s); in ASN1_GENERALIZEDTIME_adj() 107 s->type = V_ASN1_GENERALIZEDTIME; in ASN1_GENERALIZEDTIME_adj() [all …]
|
A D | a_utctm.cc | 55 if (s != NULL) { in ASN1_UTCTIME_set_string() 56 if (!ASN1_STRING_set(s, str, len)) { in ASN1_UTCTIME_set_string() 59 s->type = V_ASN1_UTCTIME; in ASN1_UTCTIME_set_string() 65 return ASN1_UTCTIME_adj(s, posix_time, 0, 0); in ASN1_UTCTIME_set() 93 if (s == NULL) { in ASN1_UTCTIME_adj() 95 s = ASN1_UTCTIME_new(); in ASN1_UTCTIME_adj() 96 if (s == NULL) { in ASN1_UTCTIME_adj() 101 if (!ASN1_STRING_set(s, buf, strlen(buf))) { in ASN1_UTCTIME_adj() 103 ASN1_UTCTIME_free(s); in ASN1_UTCTIME_adj() 107 s->type = V_ASN1_UTCTIME; in ASN1_UTCTIME_adj() [all …]
|
A D | a_time.cc | 36 ASN1_TIME *ASN1_TIME_set_posix(ASN1_TIME *s, int64_t posix_time) { in IMPLEMENT_ASN1_MSTRING() 37 return ASN1_TIME_adj(s, posix_time, 0, 0); in IMPLEMENT_ASN1_MSTRING() 40 ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t time) { in ASN1_TIME_set() argument 41 return ASN1_TIME_adj(s, time, 0, 0); in ASN1_TIME_set() 131 int ASN1_TIME_set_string(ASN1_TIME *s, const char *str) { in ASN1_TIME_set_string() argument 132 return ASN1_UTCTIME_set_string(s, str) || in ASN1_TIME_set_string() 133 ASN1_GENERALIZEDTIME_set_string(s, str); in ASN1_TIME_set_string() 136 int ASN1_TIME_set_string_X509(ASN1_TIME *s, const char *str) { in ASN1_TIME_set_string_X509() argument 155 if (s != NULL) { in ASN1_TIME_set_string_X509() 156 if (!ASN1_STRING_set(s, CBS_data(&cbs), CBS_len(&cbs))) { in ASN1_TIME_set_string_X509() [all …]
|
A D | asn1_test.cc | 920 ASSERT_TRUE(s); in TEST() 947 switch (ASN1_STRING_type(s)) { in ASN1Time_check_posix() 949 if (!asn1_generalizedtime_to_tm(&stm, s)) { in ASN1Time_check_posix() 1068 bssl::UniquePtr<ASN1_STRING> s(ASN1_STRING_new()); in TEST() local 1069 ASSERT_TRUE(s); in TEST() 1072 EXPECT_EQ(V_ASN1_UTCTIME, ASN1_STRING_type(s.get())); in TEST() 1120 EXPECT_FALSE(ASN1_TIME_set_string(s.get(), "nope")); in TEST() 1149 bssl::UniquePtr<ASN1_STRING> s(ASN1_STRING_new()); in TEST() local 1150 ASSERT_TRUE(s); in TEST() 1166 ASSERT_TRUE(ASN1_UTCTIME_check(s.get())); in TEST() [all …]
|
/crypto/blake2/ |
A D | blake2.cc | 83 const uint8_t *const s = &kSigma[16 * (round % 10)]; in blake2b_transform() local 84 blake2b_mix(v, 0, 4, 8, 12, blake2b_load(block, s[0]), in blake2b_transform() 85 blake2b_load(block, s[1])); in blake2b_transform() 86 blake2b_mix(v, 1, 5, 9, 13, blake2b_load(block, s[2]), in blake2b_transform() 87 blake2b_load(block, s[3])); in blake2b_transform() 89 blake2b_load(block, s[5])); in blake2b_transform() 91 blake2b_load(block, s[7])); in blake2b_transform() 93 blake2b_load(block, s[9])); in blake2b_transform() 95 blake2b_load(block, s[11])); in blake2b_transform() 97 blake2b_load(block, s[13])); in blake2b_transform() [all …]
|
/crypto/ecdsa/ |
A D | ecdsa_asn1.cc | 45 !BN_bin2bn(in + scalar_len, scalar_len, ret->s)) { in ecdsa_sig_from_fixed() 65 BN_is_negative(sig->s) || in ecdsa_sig_to_fixed() 92 if (s == nullptr) { in ECDSA_sign() 116 if (s == nullptr) { in ECDSA_verify() 161 sig->s = BN_new(); in ECDSA_SIG_new() 162 if (sig->r == NULL || sig->s == NULL) { in ECDSA_SIG_new() 175 BN_free(sig->s); in ECDSA_SIG_free() 189 *out_s = sig->s; in ECDSA_SIG_get0() 194 if (r == NULL || s == NULL) { in ECDSA_SIG_set0() 198 BN_free(sig->s); in ECDSA_SIG_set0() [all …]
|
/crypto/x509/ |
A D | t_x509.cc | 244 char *s, *c, *b; in X509_NAME_print() local 255 s = b + 1; // skip the first slash in X509_NAME_print() 257 c = s; in X509_NAME_print() 259 if (((*s == '/') && ((s[1] >= 'A') && (s[1] <= 'Z') && in X509_NAME_print() 260 ((s[2] == '=') || ((s[2] >= 'A') && (s[2] <= 'Z') && in X509_NAME_print() 262 (*s == '\0')) { in X509_NAME_print() 263 i = s - c; in X509_NAME_print() 267 c = s + 1; // skip following slash in X509_NAME_print() 268 if (*s != '\0') { in X509_NAME_print() 274 if (*s == '\0') { in X509_NAME_print() [all …]
|
/crypto/dsa/ |
A D | dsa.cc | 489 BN_free(sig->s); in DSA_SIG_free() 508 BN_free(sig->s); in DSA_SIG_set0() 510 sig->s = s; in DSA_SIG_set0() 546 s = BN_new(); in DSA_do_sign() 595 !mod_mul_consttime(s, s, kinv, dsa->method_mont_q, ctx)) { in DSA_do_sign() 619 ret->s = s; in DSA_do_sign() 626 BN_free(s); in DSA_do_sign() 674 if (BN_is_zero(sig->s) || BN_is_negative(sig->s) || in DSA_do_check_signature() 752 DSA_SIG *s; in DSA_sign() local 755 if (s == NULL) { in DSA_sign() [all …]
|
/crypto/perlasm/ |
A D | x86_64-xlate.pl | 157 sprintf "%s%s%s",$self->{op},$self->{sz},shift; 226 sprintf "%s",$value; 302 sprintf "%s%s(%s,%%%s,%d)%s", 308 sprintf "%s%s(%%%s)%s", $self->{asterisk},$self->{label}, 326 sprintf "%s[%s%s*%d%s]%s",$szmap{$sz}, 332 sprintf "%s[%s]",$szmap{$sz},$self->{label}; 334 sprintf "%s[%s%s]%s", $szmap{$sz}, 376 if ($gas) { sprintf "%s%%%s%s", $self->{asterisk}, 1397 printf "%s",$directive->out(); 1430 printf "\t%s\t%s",$insn,join(",",@args); [all …]
|
/crypto/fipsmodule/aes/asm/ |
A D | bsaes-armv7.pl | 298 vand @s[2], @t[3], @s[0] 300 veor @s[0], @s[0], @t[1] 303 vand @s[3], @s[3], @s[0] 304 vand @s[1], @s[1], @t[1] 309 vand @s[1], @t[1], @s[0] 333 veor @s[1], @t[2], @s[2] 334 veor @s[3], @t[0], @s[2] 335 veor @s[2], @t[0], @s[2] @ @s[2]=@s[3] 341 vbsl @s[0], @s[1], @s[2] 342 vbsl @t[0], @s[2], @s[1] [all …]
|
/crypto/fipsmodule/bn/asm/ |
A D | x86_64-gcc.cc.inc | 39 * sign verify sign/s verify/s 40 * rsa 512 bits 0.0006s 0.0001s 1683.8 18456.2 41 * rsa 1024 bits 0.0028s 0.0002s 356.0 6407.0 42 * rsa 2048 bits 0.0172s 0.0005s 58.0 1957.8 43 * rsa 4096 bits 0.1155s 0.0018s 8.7 555.6 44 * sign verify sign/s verify/s 45 * dsa 512 bits 0.0005s 0.0006s 2100.8 1768.3 46 * dsa 1024 bits 0.0014s 0.0018s 692.3 559.2 47 * dsa 2048 bits 0.0049s 0.0061s 204.7 165.0 51 * sign verify sign/s verify/s [all …]
|
/crypto/hrss/ |
A D | hrss.cc | 443 poly2_reverse_700(&out->s, &in->s); in poly3_reverse_700() 517 poly2_cswap(&a->s, &b->s, swap); in poly3_cswap() 543 poly3_word_add(&out->s[i], &out->a[i], a->s[i], a->a[i], b->s[i], b->a[i]); in poly3_span_add() 551 poly3_word_sub(&a->s[i], &a->a[i], a->s[i], a->a[i], b->s[i], b->a[i]); in poly3_span_sub() 620 a_cross_sum.s[low_len] = a_high.s[low_len]; in poly3_mul_aux() 622 b_cross_sum.s[low_len] = b_high.s[low_len]; in poly3_mul_aux() 1361 s >>= 1; in poly3_from_poly() 1363 s |= s_bit; in poly3_from_poly() 1380 *words_s = s; in poly3_from_poly() 1404 s >>= 1; in poly3_from_poly_checked() [all …]
|
A D | hrss_test.cc | 29 p->s.v[WORDS_PER_POLY - 1] &= (UINT64_C(1) << BITS_IN_LAST_WORD) - 1; in poly3_rand() 33 p->a.v[j] |= p->s.v[j]; in poly3_rand() 51 p.s.v[0] = 0; in TEST() 67 p.s.v[0] = 1; in TEST() 74 p.s.v[0] = 0; in TEST() 103 r.s.v[WORDS_PER_POLY - 1] &= (UINT64_C(1) << (BITS_IN_LAST_WORD - 1)) - 1; in TEST() 115 poly3_word_add(&r.s.v[0], &r.a.v[0], 1, 1); in TEST() 116 poly3_word_add(&r.s.v[WORDS_PER_POLY - 1], &r.a.v[WORDS_PER_POLY - 1], 0, in TEST() 130 EXPECT_EQ(CONSTTIME_TRUE_W, result.s.v[i]); in TEST() 134 result.s.v[WORDS_PER_POLY - 1]); in TEST() [all …]
|
/crypto/kyber/ |
A D | kyber.cc | 170 static void scalar_ntt(scalar *s) { in scalar_ntt() argument 181 uint16_t even = s->c[j]; in scalar_ntt() 182 s->c[j] = reduce_once(odd + even); in scalar_ntt() 211 uint16_t odd = s->c[j + offset]; in scalar_inverse_ntt() 212 uint16_t even = s->c[j]; in scalar_inverse_ntt() 220 s->c[i] = reduce(s->c[i] * kInverseDegree); in scalar_inverse_ntt() 399 uint16_t element = s->c[i]; in scalar_encode() 555 s->c[i] = compress(s->c[i], bits); in scalar_compress() 561 s->c[i] = decompress(s->c[i], bits); in scalar_decompress() 597 vector s; member [all …]
|
/crypto/fipsmodule/ecdsa/ |
A D | ecdsa.cc.inc | 70 EC_SCALAR r, s, u1, u2, s_inv_mont, m; 75 ec_scalar_is_zero(group, &s)) { 80 // s_inv_mont = s^-1 in the Montgomery domain. 86 // u1 = m * s^-1 mod order 87 // u2 = r * s^-1 mod order 152 EC_SCALAR s; 153 ec_scalar_to_montgomery(group, &s, &r); 154 ec_scalar_mul_montgomery(group, &s, priv_key, &s); 156 // s = m + priv_key * r. 159 ec_scalar_add(group, &s, &s, &tmp); [all …]
|
A D | ecdsa_test.cc | 117 size_t s_len = BN_num_bytes(ecdsa_sig->s); in TestTamperedSig() 133 ASSERT_TRUE(BN_bin2bn(raw_buf.data() + bn_len, bn_len, ecdsa_sig->s)); in TestTamperedSig() 256 BN_set_negative(ecdsa_sig->s, 1); in TEST() 258 BN_set_negative(ecdsa_sig->s, 0); in TEST() 277 ASSERT_TRUE(BN_bin2bn(bytes.data(), bytes.size(), sig->s)); in TEST() 366 bssl::UniquePtr<BIGNUM> s = GetBIGNUM(t, "S"); in TEST() local 367 ASSERT_TRUE(s); in TEST() 382 ASSERT_TRUE(BN_copy(sig->s, s.get())); in TEST() 412 bssl::UniquePtr<BIGNUM> s = GetBIGNUM(t, "S"); in TEST() local 413 ASSERT_TRUE(s); in TEST() [all …]
|
/crypto/conf/ |
A D | conf.cc | 123 CONF_SECTION *s = in NCONF_new_section() local 125 if (!s) { in NCONF_new_section() 130 if (s->name == NULL || s->values == NULL) { in NCONF_new_section() 139 return s; in NCONF_new_section() 142 section_free(s); in NCONF_new_section() 374 char *s, *p, *end; in NCONF_load_bio() local 453 s = eat_ws(buf); in NCONF_load_bio() 454 if (*s == '\0') { in NCONF_load_bio() 457 if (*s == '[') { in NCONF_load_bio() 460 s++; in NCONF_load_bio() [all …]
|
/crypto/cipher/test/nist_cavp/ |
A D | make_cavp.go | 48 func (t *Test) parseKeyValue(s string) (key, value string) { 50 i := strings.IndexAny(s, "=:") 52 t.kvDelim = rune(s[i]) 55 if i := strings.IndexRune(s, t.kvDelim); t.kvDelim != 0 && i != -1 { 56 key, value = s[:i], s[i+1:] 63 key = s 92 s := bufio.NewScanner(r) 117 for s.Scan() { 119 line := s.Text()
|
/crypto/fipsmodule/mldsa/ |
A D | mldsa.cc.inc | 358 uint32_t even = s->c[j]; 360 // |step_root| < kPrime because it's static data. |s->c[...]| is < 387 uint32_t even = s->c[j]; 403 s->c[i] = reduce_montgomery((uint64_t)s->c[i] * 731 uint32_t a = s->c[2 * i]; 732 uint32_t b = s->c[2 * i + 1]; 744 uint32_t a = s->c[4 * i]; 745 uint32_t b = s->c[4 * i + 1]; 746 uint32_t c = s->c[4 * i + 2]; 763 uint32_t a = s->c[4 * i]; [all …]
|
/crypto/md5/asm/ |
A D | md5-x86_64.pl | 30 my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_; 40 rol \$$s, $dst /* dst <<< s */ 54 my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_; 68 rol \$$s, $dst /* dst <<< s */ 80 my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_; 89 rol \$$s, $dst /* dst <<< s */ 102 my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_; 114 rol \$$s, $dst /* dst <<< s */
|
/crypto/fipsmodule/ec/ |
A D | ec_montgomery.cc.inc | 335 // s = 2*((x_in + yy)^2 - xx - yyyy) 336 EC_FELEM s; 337 ec_felem_add(group, &s, &a->X, &yy); 338 ec_GFp_mont_felem_sqr(group, &s, &s); 339 ec_felem_sub(group, &s, &s, &xx); 340 ec_felem_sub(group, &s, &s, &yyyy); 341 ec_felem_add(group, &s, &s, &s); 351 // x_out = m^2 - 2*s 353 ec_felem_sub(group, &r->X, &r->X, &s); 354 ec_felem_sub(group, &r->X, &r->X, &s); [all …]
|