Home
last modified time | relevance | path

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

1234567891011

/openthread-latest/third_party/mbedtls/repo/library/
Dsha3.c104 uint64_t *s = ctx->state; in keccak_f1600() local
113 lane[i] = s[i] ^ s[i + 5] ^ s[i + 10] ^ s[i + 15] ^ s[i + 20]; in keccak_f1600()
117 s[i] ^= t; s[i + 5] ^= t; s[i + 10] ^= t; s[i + 15] ^= t; s[i + 20] ^= t; 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()
[all …]
Dbn_mul.h126 : "=m" (t), "=m" (c), "=m" (d), "=m" (s) \
127 : "m" (t), "m" (s), "m" (d), "m" (c), "m" (b) \
204 : "=m" (t), "=m" (c), "=m" (d), "=m" (s) \
205 : "m" (t), "m" (s), "m" (d), "m" (c), "m" (b) \
232 : "+c" (c), "+D" (d), "+S" (s), "+m" (*(uint64_t (*)[16]) d) \
233 : "b" (b), "m" (*(const uint64_t (*)[16]) s) \
251 do { uintptr_t muladdc_d = (uintptr_t) d, muladdc_s = (uintptr_t) s; asm(
269 : "r" (b), "m" (*(const uint64_t (*)[16]) s) \
271 ); d = (mbedtls_mpi_uint *)muladdc_d; s = (mbedtls_mpi_uint *)muladdc_s; } while (0);
298 : "=m" (c), "=m" (d), "=m" (s) \
[all …]
Dbignum.c70 X_is_negative = mbedtls_ct_bool((X->s & 2) >> 1); in mbedtls_mpi_lt_mpi_ct()
71 Y_is_negative = mbedtls_ct_bool((Y->s & 2) >> 1); in mbedtls_mpi_lt_mpi_ct()
128 X->s = mbedtls_ct_mpi_sign_if(do_assign, Y->s, X->s); in mbedtls_mpi_safe_cond_assign()
153 int s; in mbedtls_mpi_safe_cond_swap() local
164 s = X->s; in mbedtls_mpi_safe_cond_swap()
165 X->s = mbedtls_ct_mpi_sign_if(do_swap, Y->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()
182 X->s = 1; in mbedtls_mpi_init()
200 X->s = 1; in mbedtls_mpi_free()
290 X->s = 1; in mbedtls_mpi_resize_clear()
[all …]
Dconstant_time_impl.h146 mbedtls_ct_uint_t s; in mbedtls_ct_bool() local
151 [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()
184 return (mbedtls_ct_condition_t) 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()
[all …]
Dplatform.c70 int mbedtls_platform_win32_snprintf(char *s, size_t n, const char *fmt, ...) in mbedtls_platform_win32_snprintf() argument
76 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,
104 int mbedtls_platform_set_snprintf(int (*snprintf_func)(char *s, size_t n, in mbedtls_platform_set_snprintf() argument
115 int mbedtls_platform_win32_vsnprintf(char *s, size_t n, const char *fmt, va_list arg) in mbedtls_platform_win32_vsnprintf() argument
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()
[all …]
Decdsa.c244 mbedtls_mpi *r, mbedtls_mpi *s, in mbedtls_ecdsa_sign_restartable() argument
352 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(s, pr, d)); in mbedtls_ecdsa_sign_restartable()
353 MBEDTLS_MPI_CHK(mbedtls_mpi_add_mpi(&e, &e, s)); in mbedtls_ecdsa_sign_restartable()
357 MBEDTLS_MPI_CHK(mbedtls_mpi_inv_mod(s, pk, &grp->N)); in mbedtls_ecdsa_sign_restartable()
358 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()
380 int mbedtls_ecdsa_sign(mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s, in mbedtls_ecdsa_sign() argument
385 return mbedtls_ecdsa_sign_restartable(grp, r, s, d, buf, blen, in mbedtls_ecdsa_sign()
398 mbedtls_mpi *r, mbedtls_mpi *s, in mbedtls_ecdsa_sign_det_restartable() argument
[all …]
Dx509_create.c37 #define ADD_STRLEN(s) s, sizeof(s) - 1 argument
138 static int parse_attribute_value_string(const char *s, in parse_attribute_value_string() argument
144 const char *end = s + len; in parse_attribute_value_string()
148 for (c = s; c < end; c++) { in parse_attribute_value_string()
202 static int parse_attribute_value_hex_der_encoded(const char *s, in parse_attribute_value_hex_der_encoded() argument
235 int c = hexpair_to_int(s + 2 * i); in parse_attribute_value_hex_der_encoded()
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()
[all …]
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()
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 …]
/openthread-latest/tests/scripts/thread-cert/pktverify/
Dbytes.py36 def __init__(self, s: Union[str, bytearray, 'Bytes', Any]):
37 if isinstance(s, str):
39 s = Bytes._parse_compact(s)
42 s = Bytes._parse_octets(s)
44 s = Bytes._parse_hextets(s)
46 super().__init__(s)
76 def _parse_compact(s: str) -> bytearray:
78 assert len(s) % 2 == 0
79 return bytearray(int(s[i:i + 2], 16) for i in range(0, len(s), 2))
81 raise ValueError(s)
[all …]
/openthread-latest/third_party/mbedtls/repo/3rdparty/everest/library/kremlib/
DFStar_UInt128_extracted.c111 static uint64_t FStar_UInt128_add_u64_shift_left(uint64_t hi, uint64_t lo, uint32_t s) in FStar_UInt128_add_u64_shift_left() argument
113 return (hi << s) + (lo >> (FStar_UInt128_u32_64 - s)); in FStar_UInt128_add_u64_shift_left()
116 static uint64_t FStar_UInt128_add_u64_shift_left_respec(uint64_t hi, uint64_t lo, uint32_t s) in FStar_UInt128_add_u64_shift_left_respec() argument
118 return FStar_UInt128_add_u64_shift_left(hi, lo, s); in FStar_UInt128_add_u64_shift_left_respec()
122 FStar_UInt128_shift_left_small(FStar_UInt128_uint128 a, uint32_t s) in FStar_UInt128_shift_left_small() argument
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()
137 FStar_UInt128_shift_left_large(FStar_UInt128_uint128 a, uint32_t s) in FStar_UInt128_shift_left_large() argument
139 FStar_UInt128_uint128 flat = { (uint64_t)0U, a.low << (s - FStar_UInt128_u32_64) }; in FStar_UInt128_shift_left_large()
143 FStar_UInt128_uint128 FStar_UInt128_shift_left(FStar_UInt128_uint128 a, uint32_t s) in FStar_UInt128_shift_left() argument
[all …]
/openthread-latest/third_party/mbedtls/repo/3rdparty/p256-m/p256-m/
Dp256-m.c875 uint32_t m[8], s[8], u[8]; in point_double() local
878 m256_mul_p(s, z, z); in point_double()
879 m256_add_p(m, x, s); in point_double()
880 m256_sub_p(u, x, s); in point_double()
881 m256_mul_p(s, m, u); in point_double()
882 m256_add_p(m, s, s); in point_double()
883 m256_add_p(m, m, s); in point_double()
888 m256_mul_p(s, x, u); in point_double()
889 m256_add_p(s, s, s); in point_double()
897 m256_sub_p(x, x, s); in point_double()
[all …]
/openthread-latest/tests/scripts/thread-cert/
Dmcast6.py88 s = socket.socket(addrinfo[0], socket.SOCK_DGRAM)
89 s.setsockopt(socket.SOL_SOCKET, socket.SO_BINDTODEVICE, (ifname + '\0').encode('ascii'))
94 s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_MULTICAST_HOPS, ttl_bin)
98 s.sendto((data + '\0').encode('ascii'), (addrinfo[4][0], MYPORT))
108 s = socket.socket(addrinfo[0], socket.SOCK_DGRAM)
109 s.setsockopt(socket.SOL_SOCKET, socket.SO_BINDTODEVICE, (ifname + '\0').encode('ascii'))
113 s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
116 s.bind(('', MYPORT))
123 s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_JOIN_GROUP, mreq)
127 data, sender = s.recvfrom(1500)
/openthread-latest/tools/harness-simulation/posix/
Dlaunch_testbed.py72 s = socket.socket(addrinfo[0], socket.SOCK_DGRAM)
73 s.setsockopt(socket.SOL_SOCKET, socket.SO_BINDTODEVICE, (ifname + '\0').encode('ascii'))
76 s.bind((group, port))
82 s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_JOIN_GROUP, mreq)
84 return s
87 def _advertise(s: socket.socket, dst, info):
89 s.sendto(json.dumps(info).encode('utf-8'), dst)
92 def advertise_devices(s: socket.socket, dst, ven: str, add: str, nodeids: Iterable[int], tag: str):
101 _advertise(s, dst, info)
104 def advertise_sniffers(s: socket.socket, dst, add: str, ports: Iterable[int]):
[all …]
/openthread-latest/third_party/mbedtls/repo/tests/src/
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()
/openthread-latest/third_party/mbedtls/repo/tests/suites/
Dtest_suite_ecdsa.function15 mbedtls_mpi d, r, s;
21 mbedtls_mpi_init(&d); mbedtls_mpi_init(&r); mbedtls_mpi_init(&s);
30 TEST_ASSERT(mbedtls_ecdsa_sign(&grp, &r, &s, &d, buf, sizeof(buf),
33 TEST_ASSERT(mbedtls_ecdsa_verify(&grp, buf, sizeof(buf), &Q, &r, &s) == 0);
38 mbedtls_mpi_free(&d); mbedtls_mpi_free(&r); mbedtls_mpi_free(&s);
47 mbedtls_mpi d, r, s;
53 mbedtls_mpi_init(&d); mbedtls_mpi_init(&r); mbedtls_mpi_init(&s);
65 TEST_ASSERT(mbedtls_ecdsa_sign(&grp, &r, &s, &d, buf, sizeof(buf),
68 TEST_ASSERT(mbedtls_ecdsa_verify(&grp, buf, sizeof(buf), &Q, &r, &s) == 0);
73 mbedtls_mpi_free(&d); mbedtls_mpi_free(&r); mbedtls_mpi_free(&s);
[all …]
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)
81 ECDSA DER -> Raw, 256bit, Wrong s integer length (1 byte smaller than the actual size)
85 ECDSA DER -> Raw, 256bit, Wrong s integer length (1 byte larger than the actual size)
101 ECDSA DER -> Raw, 256bit, Invalid s all zeros
[all …]
/openthread-latest/third_party/tcplp/bsdtcp/
Dtcp_fsm.h78 #define TCPS_HAVERCVDSYN(s) ((s) >= TCPS_SYN_RECEIVED) argument
79 #define TCPS_HAVEESTABLISHED(s) ((s) >= TCPS_ESTABLISHED) argument
80 #define TCPS_HAVERCVDFIN(s) ((s) >= TCPS_TIME_WAIT) argument
Dtcp_reass.c128 char *s = NULL;
166 if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) {
168 "segment dropped\n", s, __func__);
169 free(s, M_TCPLOG);
188 if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL,
191 "reached, segment dropped\n", s, __func__);
192 free(s, M_TCPLOG);
198 if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL,
202 "stack for missing segment\n", s, __func__);
203 free(s, M_TCPLOG);
/openthread-latest/examples/platforms/utils/
Ddebug_uart.c76 void otPlatDebugUart_puts_no_nl(const char *s) in otPlatDebugUart_puts_no_nl() argument
78 while (*s) in otPlatDebugUart_puts_no_nl()
80 otPlatDebugUart_putchar(*s); in otPlatDebugUart_puts_no_nl()
81 s++; in otPlatDebugUart_puts_no_nl()
86 void otPlatDebugUart_puts(const char *s) in otPlatDebugUart_puts() argument
88 otPlatDebugUart_puts_no_nl(s); in otPlatDebugUart_puts()
/openthread-latest/third_party/mbedtls/repo/include/mbedtls/
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,
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,
/openthread-latest/tests/scripts/misc/
Dtest_multicast_join.py49 with socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) as s:
50 s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_MULTICAST_IF, if_index)
51 s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_JOIN_GROUP,
59 s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_LEAVE_GROUP,
/openthread-latest/third_party/mbedtls/repo/tests/scripts/
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)
/openthread-latest/tools/otci/otci/
Dconnectors.py44 def writeline(self, s: str) -> None:
87 def writeline(self, s: str):
89 self.__otcli_proc.stdin.write(s + '\n')
166 def writeline(self, s: str):
167 self.__serial.write((s + '\n').encode('utf-8'))

1234567891011