Home
last modified time | relevance | path

Searched refs:s (Results 1 – 25 of 201) sorted by relevance

123456789

/mbedtls/library/
A Dsha3.c113 lane[i] = s[i] ^ s[i + 5] ^ s[i + 10] ^ s[i + 15] ^ s[i + 20]; in keccak_f1600()
120 lane[0] = s[0] ^ s[5] ^ s[10] ^ s[15] ^ s[20]; in keccak_f1600()
121 lane[1] = s[1] ^ s[6] ^ s[11] ^ s[16] ^ s[21]; in keccak_f1600()
122 lane[2] = s[2] ^ s[7] ^ s[12] ^ s[17] ^ s[22]; in keccak_f1600()
123 lane[3] = s[3] ^ s[8] ^ s[13] ^ s[18] ^ s[23]; in keccak_f1600()
124 lane[4] = s[4] ^ s[9] ^ s[14] ^ s[19] ^ s[24]; in keccak_f1600()
127 s[0] ^= t; s[5] ^= t; s[10] ^= t; s[15] ^= t; s[20] ^= t; in keccak_f1600()
130 s[1] ^= t; s[6] ^= t; s[11] ^= t; s[16] ^= t; s[21] ^= t; in keccak_f1600()
133 s[2] ^= t; s[7] ^= t; s[12] ^= t; s[17] ^= t; s[22] ^= t; in keccak_f1600()
136 s[3] ^= t; s[8] ^= t; s[13] ^= t; s[18] ^= t; s[23] ^= t; in keccak_f1600()
[all …]
A Dbn_mul.h530 : "=m" (c), "=m" (d), "=m" (s) \
531 : "m" (s), "m" (d), "m" (c), "m" (b) \
562 : "=m" (c), "=m" (d), "=m" (s) \
563 : "m" (s), "m" (d), "m" (c), "m" (b) \
654 : "=m" (c), "=m" (d), "=m" (s) \
655 : "m" (s), "m" (d), "m" (c), "m" (b) \
745 : "=m" (c), "=m" (d), "=m" (s) \
945 __asm mov s, esi
1020 __asm mov s, esi
1056 s0 = ( *s << biH ) >> biH; \
[all …]
A Dbignum.c164 s = X->s; in mbedtls_mpi_safe_cond_swap()
166 Y->s = mbedtls_ct_mpi_sign_if(do_swap, s, Y->s); in mbedtls_mpi_safe_cond_swap()
330 X->s = Y->s; in mbedtls_mpi_copy()
1117 s = A->s; in add_sub_mpi()
1129 X->s = -s; in add_sub_mpi()
1133 X->s = s; in add_sub_mpi()
1239 X->s = A->s * B->s; in mbedtls_mpi_mul_mpi()
1429 X.s = Y.s = 1; in mbedtls_mpi_div_mpi()
1490 Q->s = A->s * B->s; in mbedtls_mpi_div_mpi()
1495 X.s = A->s; in mbedtls_mpi_div_mpi()
[all …]
A Decdsa.c358 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(s, s, &e)); in mbedtls_ecdsa_sign_restartable()
359 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(s, s, &grp->N)); in mbedtls_ecdsa_sign_restartable()
360 } while (mbedtls_mpi_cmp_int(s, 0) == 0); in mbedtls_ecdsa_sign_restartable()
528 mbedtls_mpi_cmp_int(s, 1) < 0 || mbedtls_mpi_cmp_mpi(s, &grp->N) >= 0) { in mbedtls_ecdsa_verify_restartable()
600 const mbedtls_mpi *s) in mbedtls_ecdsa_verify() argument
648 mbedtls_mpi r, s; in mbedtls_ecdsa_write_signature_restartable() local
654 mbedtls_mpi_init(&s); in mbedtls_ecdsa_write_signature_restartable()
680 mbedtls_mpi_free(&s); in mbedtls_ecdsa_write_signature_restartable()
723 mbedtls_mpi r, s; in mbedtls_ecdsa_read_signature_restartable() local
725 mbedtls_mpi_init(&s); in mbedtls_ecdsa_read_signature_restartable()
[all …]
A Dconstant_time_impl.h151 [s] "=&r" (s), in mbedtls_ct_bool()
158 uint32_t s; in mbedtls_ct_bool()
165 [s] "=&l" (s), in mbedtls_ct_bool()
173 uint64_t s; in mbedtls_ct_bool()
179 [s] "=&a" (s) in mbedtls_ct_bool()
186 uint32_t s; in mbedtls_ct_bool()
192 [s] "=&c" (s), in mbedtls_ct_bool()
330 uint64_t s; in mbedtls_ct_uint_lt()
340 [s] "=&a" (s), in mbedtls_ct_uint_lt()
348 uint32_t s; in mbedtls_ct_uint_lt()
[all …]
A Dx509_create.c37 #define ADD_STRLEN(s) s, sizeof(s) - 1 argument
144 const char *end = s + len; in parse_attribute_value_string()
285 const char *s = name, *c = s; in mbedtls_x509_string_to_names() local
286 const char *end = s + strlen(s); in mbedtls_x509_string_to_names()
300 if ((attr_descr = x509_attr_descr_from_name(s, (size_t) (c - s))) == NULL) { in mbedtls_x509_string_to_names()
301 if ((mbedtls_oid_from_numeric_string(&oid, s, (size_t) (c - s))) != 0) { in mbedtls_x509_string_to_names()
313 s = c + 1; in mbedtls_x509_string_to_names()
318 if (s == c) { in mbedtls_x509_string_to_names()
325 s + 1, (size_t) (c - s) - 1, in mbedtls_x509_string_to_names()
337 parse_attribute_value_string(s, (int) (c - s), data, in mbedtls_x509_string_to_names()
[all …]
A Dplatform.c76 ret = mbedtls_vsnprintf(s, n, fmt, argp); in mbedtls_platform_win32_snprintf()
88 static int platform_snprintf_uninit(char *s, size_t n, in platform_snprintf_uninit() argument
91 ((void) s); in platform_snprintf_uninit()
100 int (*mbedtls_snprintf)(char *s, size_t n,
120 if (s == NULL || n == 0 || fmt == NULL) { in mbedtls_platform_win32_vsnprintf()
125 ret = vsnprintf_s(s, n, _TRUNCATE, fmt, arg); in mbedtls_platform_win32_vsnprintf()
127 ret = vsnprintf(s, n, fmt, arg); in mbedtls_platform_win32_vsnprintf()
129 s[n-1] = '\0'; in mbedtls_platform_win32_vsnprintf()
143 static int platform_vsnprintf_uninit(char *s, size_t n, in platform_vsnprintf_uninit() argument
146 ((void) s); in platform_vsnprintf_uninit()
[all …]
A Dpem.c47 static int pem_get_iv(const unsigned char *s, unsigned char *iv, in pem_get_iv() argument
54 for (i = 0; i < iv_len * 2; i++, s++) { in pem_get_iv()
55 if (*s >= '0' && *s <= '9') { in pem_get_iv()
56 j = *s - '0'; in pem_get_iv()
58 if (*s >= 'A' && *s <= 'F') { in pem_get_iv()
59 j = *s - '7'; in pem_get_iv()
61 if (*s >= 'a' && *s <= 'f') { in pem_get_iv()
62 j = *s - 'W'; in pem_get_iv()
A Dpsa_crypto_ecp.c375 mbedtls_mpi r, s; in mbedtls_psa_ecdsa_sign_hash() local
388 mbedtls_mpi_init(&s); in mbedtls_psa_ecdsa_sign_hash()
400 &ecp->grp, &r, &s, in mbedtls_psa_ecdsa_sign_hash()
411 MBEDTLS_MPI_CHK(mbedtls_ecdsa_sign(&ecp->grp, &r, &s, &ecp->d, in mbedtls_psa_ecdsa_sign_hash()
420 MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&s, in mbedtls_psa_ecdsa_sign_hash()
425 mbedtls_mpi_free(&s); in mbedtls_psa_ecdsa_sign_hash()
460 mbedtls_mpi r, s; in mbedtls_psa_ecdsa_verify_hash() local
475 mbedtls_mpi_init(&s); in mbedtls_psa_ecdsa_verify_hash()
489 status = mbedtls_to_psa_error(mbedtls_mpi_read_binary(&s, in mbedtls_psa_ecdsa_verify_hash()
503 &r, &s)); in mbedtls_psa_ecdsa_verify_hash()
[all …]
A Dx509.c823 char s[MBEDTLS_X509_MAX_DN_NAME_SIZE], *p; in mbedtls_x509_dn_gets() local
826 memset(s, 0, sizeof(s)); in mbedtls_x509_dn_gets()
864 s[0] = '#'; in mbedtls_x509_dn_gets()
877 if (j + 1 >= sizeof(s) - 1) { in mbedtls_x509_dn_gets()
887 if (j + 1 >= sizeof(s) - 1) { in mbedtls_x509_dn_gets()
898 if (j >= sizeof(s) - 1) { in mbedtls_x509_dn_gets()
913 s[j++] = '\\'; in mbedtls_x509_dn_gets()
920 s[j++] = '\\'; in mbedtls_x509_dn_gets()
926 s[j] = c; in mbedtls_x509_dn_gets()
930 s[j] = '\0'; in mbedtls_x509_dn_gets()
[all …]
A Dpoly1305.c213 d = (uint64_t) acc0 + ctx->s[0]; in poly1305_compute_mac()
215 d = (uint64_t) acc1 + ctx->s[1] + (d >> 32U); in poly1305_compute_mac()
217 d = (uint64_t) acc2 + ctx->s[2] + (d >> 32U); in poly1305_compute_mac()
219 acc3 += ctx->s[3] + (uint32_t) (d >> 32U); in poly1305_compute_mac()
251 ctx->s[0] = MBEDTLS_GET_UINT32_LE(key, 16); in mbedtls_poly1305_starts()
252 ctx->s[1] = MBEDTLS_GET_UINT32_LE(key, 20); in mbedtls_poly1305_starts()
253 ctx->s[2] = MBEDTLS_GET_UINT32_LE(key, 24); in mbedtls_poly1305_starts()
254 ctx->s[3] = MBEDTLS_GET_UINT32_LE(key, 28); in mbedtls_poly1305_starts()
/mbedtls/3rdparty/p256-m/p256-m/
A Dp256-m.c878 m256_mul_p(s, z, z); in point_double()
879 m256_add_p(m, x, s); in point_double()
882 m256_add_p(m, s, s); in point_double()
889 m256_add_p(s, s, s); in point_double()
1216 zeroize(s, sizeof s); in p256_gen_keypair()
1260 zeroize(s, sizeof s); in p256_ecdh_shared_secret()
1425 m256_inv(s, s, &p256_n); /* s = s^-1 mod n */ in p256_ecdsa_verify()
1485 uint32_t s[8]; in p256_validate_privkey() local
1487 zeroize(s, sizeof(s)); in p256_validate_privkey()
1495 uint32_t s[8]; in p256_public_from_private() local
[all …]
A DREADME.md2 only a subset of p256-m's files are present in Mbed TLS, this README may refer
136 **What's included:**
144 **What's excluded:**
308 compiler's runtime library).
309 - TinyCrypt uses a specialised routine based on Shamir's trick for
334 This layer's API consists of:
350 Modular inversion is computed using Fermat's little theorem to get
353 This layer's API consists of:
371 This layer's API consists of:
391 This layer's API consists of:
[all …]
/mbedtls/3rdparty/everest/library/kremlib/
A DFStar_UInt128_extracted.c113 return (hi << s) + (lo >> (FStar_UInt128_u32_64 - s)); in FStar_UInt128_add_u64_shift_left()
124 if (s == (uint32_t)0U) in FStar_UInt128_shift_left_small()
131 flat = { a.low << s, FStar_UInt128_add_u64_shift_left_respec(a.high, a.low, s) }; in FStar_UInt128_shift_left_small()
145 if (s < FStar_UInt128_u32_64) in FStar_UInt128_shift_left()
147 return FStar_UInt128_shift_left_small(a, s); in FStar_UInt128_shift_left()
151 return FStar_UInt128_shift_left_large(a, s); in FStar_UInt128_shift_left()
157 return (lo >> s) + (hi << (FStar_UInt128_u32_64 - s)); in FStar_UInt128_add_u64_shift_right()
168 if (s == (uint32_t)0U) in FStar_UInt128_shift_right_small()
175 flat = { FStar_UInt128_add_u64_shift_right_respec(a.high, a.low, s), a.high >> s }; in FStar_UInt128_shift_right_small()
189 if (s < FStar_UInt128_u32_64) in FStar_UInt128_shift_right()
[all …]
/mbedtls/tests/suites/
A Dtest_suite_ecdsa.function15 mbedtls_mpi d, r, s;
47 mbedtls_mpi d, r, s;
85 mbedtls_mpi d, r, s, r_check, s_check, zero;
132 /* Invalid signatures: r or s or both one off */
153 /* Invalid signatures: r, s or both are == N */
198 mbedtls_mpi d, r, s, r_check, s_check;
212 mbedtls_ecdsa_sign_det_ext(&grp, &r, &s, &d,
282 /* try modifying s */
351 /* try modifying s */
403 /* try modifying s */
[all …]
A Dtest_suite_psa_crypto_util.data13 ECDSA Raw -> DER, 256bit, Null s
21 ECDSA Raw -> DER, 256bit, s with MSb set
25 ECDSA Raw -> DER, 256bit, both r and s with MSb set
29 ECDSA Raw -> DER, 256bit, r and s only 1 byte of data
33 ECDSA Raw -> DER, 256bit, r and s only 1 byte of data with MSb set
41 ECDSA Raw -> DER, 256bit, Invalid raw signature (r and s 1 byte shorter)
49 ECDSA Raw -> DER, 256bit, Invalid raw signature (r and s 1 byte longer)
101 ECDSA DER -> Raw, 256bit, Invalid s all zeros
109 ECDSA DER -> Raw, 256bit, Valid s only 1 zero byte
117 ECDSA DER -> Raw, 256bit, Invalid 0-length s
[all …]
A Dhost_test.function48 mbedtls_fprintf(stderr, "Integer out of range: %s\n", str);
61 "Usage: %s [OPTIONS] files...\n\n" \
66 " %s\n\n" \
289 ret = mbedtls_snprintf(buf, n, "%s", "123");
361 mbedtls_fprintf(outcome_file, "%s;%s;%s;%s;",
410 mbedtls_fprintf(outcome_file, "FAIL;%s:%d:%s",
464 mbedtls_fprintf(stderr, "%s: note: chdir(\"%s\") failed.\n",
595 mbedtls_fprintf(stderr, "Failed to open test file: %s\n",
615 mbedtls_fprintf(stdout, "%s%.66s",
727 mbedtls_fprintf(stdout, " %s\n at ",
[all …]
A Dtest_suite_bignum_core.function636 TEST_EQUAL(1, A.s);
637 TEST_EQUAL(1, B.s);
638 TEST_EQUAL(1, X.s);
708 /* We are testing A += B * s; A, B are MPIs, s is a scalar.
747 TEST_EQUAL(1, A.s);
748 TEST_EQUAL(1, B.s);
749 TEST_EQUAL(1, S.s);
821 TEST_EQUAL(1, N.s);
872 TEST_EQUAL(1, A.s);
956 N.s = -1;
[all …]
/mbedtls/tests/src/
A Dbignum_helpers.c79 const char *s, in mbedtls_test_read_mpi_modulus() argument
87 int ret = mbedtls_test_read_mpi_core(&p, &limbs, s); in mbedtls_test_read_mpi_modulus()
116 int mbedtls_test_read_mpi(mbedtls_mpi *X, const char *s) in mbedtls_test_read_mpi() argument
122 if (s[0] == '-') { in mbedtls_test_read_mpi()
123 ++s; in mbedtls_test_read_mpi()
128 if (s[0] == 0) { in mbedtls_test_read_mpi()
132 int ret = mbedtls_mpi_read_string(X, 16, s); in mbedtls_test_read_mpi()
140 X->s = -1; in mbedtls_test_read_mpi()
/mbedtls/include/mbedtls/
A Decdsa.h161 int mbedtls_ecdsa_sign(mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
207 mbedtls_mpi *s, const mbedtls_mpi *d,
271 mbedtls_mpi *r, mbedtls_mpi *s,
334 mbedtls_mpi *r, mbedtls_mpi *s,
376 const mbedtls_mpi *s);
418 const mbedtls_mpi *s,
A Dplatform.h234 int mbedtls_platform_win32_snprintf(char *s, size_t n, const char *fmt, ...);
238 extern int (*mbedtls_snprintf)(char *s, size_t n, const char *format, ...);
248 int mbedtls_platform_set_snprintf(int (*snprintf_func)(char *s, size_t n,
271 int mbedtls_platform_win32_vsnprintf(char *s, size_t n, const char *fmt, va_list arg);
276 extern int (*mbedtls_vsnprintf)(char *s, size_t n, const char *format, va_list arg);
285 int mbedtls_platform_set_vsnprintf(int (*vsnprintf_func)(char *s, size_t n,
/mbedtls/tests/scripts/
A Dtranslate_ciphers.py65 for s, g_exp, o_exp, m_exp in ciphers:
68 g = translate_gnutls(s)
72 o = translate_ossl(s)
76 m = translate_mbedtls(s)
/mbedtls/docs/architecture/
A Dpsa-storage-resilience.md76 4. The core calls the driver's key creation entry point, passing it the driver's chosen identifier …
169 1. Call the driver's `"allocate_key"` entry point.
172 4. Call the driver's key creation entry point.
183 2. Call the driver's `"destroy_key"` entry point.
198 1. Call the driver's `"allocate_key"` entry point.
200 3. Call the driver's key creation entry point.
208 3. Call the driver's `"destroy_key"` entry point.
223 1. Call the driver's `"allocate_key"` entry point.
226 4. Call the driver's key creation entry point.
232 2. Call the driver's `"destroy_key"` entry point.
[all …]
/mbedtls/docs/proposed/
A Dpsa-driver-wrappers-codegen-migration-guide.md22 ### What's critical for a migrating user
24 …a2 ) to render templates based on drivers that are defined using a Driver description JSON file(s).
26 While that is the larger goal, for version 1.1 here's what's changed
28 #### What's changed
/mbedtls/programs/psa/
A Dpsa_constant_names.c17 int snprintf(char *s, size_t n, const char *fmt, ...) in snprintf() argument
23 if (s == NULL || n == 0 || fmt == NULL) { in snprintf()
29 ret = _vsnprintf_s(s, n, _TRUNCATE, fmt, argp); in snprintf()
31 ret = _vsnprintf(s, n, fmt, argp); in snprintf()
33 s[n-1] = '\0'; in snprintf()

Completed in 69 milliseconds

123456789