Home
last modified time | relevance | path

Searched refs:r (Results 1 – 25 of 101) sorted by relevance

12345

/mbedtls-3.6.0/scripts/mbedtls_dev/
Dcrypto_knowledge.py26 short = re.sub(r'\bPSA_(?:ALG|DH_FAMILY|ECC_FAMILY|KEY_[A-Z]+)_', r'', short)
27 short = re.sub(r' +', r'', short)
29 short = re.sub(r'PUBLIC_KEY\b', r'PUB', short)
30 short = re.sub(r'KEY_PAIR\b', r'PAIR', short)
31 short = re.sub(r'\bBRAINPOOL_P', r'BP', short)
32 short = re.sub(r'\bMONTGOMERY\b', r'MGM', short)
33 short = re.sub(r'AEAD_WITH_SHORTENED_TAG\b', r'AEAD_SHORT', short)
34 short = re.sub(r'\bDETERMINISTIC_', r'DET_', short)
35 short = re.sub(r'\bKEY_AGREEMENT\b', r'KA', short)
36 short = re.sub(r'_PSK_TO_MS\b', r'_PSK2MS', short)
[all …]
Dpsa_information.py58 return re.sub(r'_FAMILY_(.*)', r'_\1_' + str(bits), dep)
84 used.update(re.findall(r'PSA_(?:ALG|ECC_FAMILY|KEY_TYPE)_\w+', expr))
90 AES_128BIT_ONLY_DEP_REGEX = r'AES\s(192|256)'
114 for symbol in re.findall(r'\bPSA_WANT_\w+\b', line))
136 ret_list.append(re.sub(r'KEY_PAIR', r'KEY_PAIR_BASIC', dep))
137 ret_list.append(re.sub(r'KEY_PAIR', r'KEY_PAIR_IMPORT', dep))
138 ret_list.append(re.sub(r'KEY_PAIR', r'KEY_PAIR_EXPORT', dep))
140 ret_list.append(re.sub(r'KEY_PAIR', r'KEY_PAIR_GENERATE', dep))
Dmacro_collector.py147 _argument_split_re = re.compile(r' *, *')
258 if re.match(r'MAC(?:_|\Z)', name):
260 elif re.match(r'KDF(?:_|\Z)', name):
262 elif re.search(r'0x020000[0-9A-Fa-f]{2}', expansion):
264 elif re.search(r'0x03[0-9A-Fa-f]{6}', expansion):
266 elif re.search(r'0x05[0-9A-Fa-f]{6}', expansion):
268 elif re.search(r'0x09[0-9A-Fa-f]{2}0000', expansion):
270 elif re.search(r'0x08[0-9A-Fa-f]{6}', expansion):
277 _define_directive_re = re.compile(r'\s*#\s*define\s+(\w+)' +
278 r'(?:\s+|\((\w+)\)\s*)' +
[all …]
Dasymmetric_key_data.py27 private = 'PSA_KEY_TYPE_' + re.sub(r'(\(|\Z)', r'_KEY_PAIR\1', typ, 1)
28 public = 'PSA_KEY_TYPE_' + re.sub(r'(\(|\Z)', r'_PUBLIC_KEY\1', typ, 1)
/mbedtls-3.6.0/tests/scripts/
Dcheck_names.py53 PUBLIC_MACRO_PATTERN = r"^(MBEDTLS|PSA)_[0-9A-Z_]*[0-9A-Z]$"
54 INTERNAL_MACRO_PATTERN = r"^[0-9A-Za-z_]*[0-9A-Z]$"
56 IDENTIFIER_PATTERN = r"^(mbedtls|psa)_[0-9a-z_]*[0-9a-z]$"
377 macro_regex = re.compile(r"# *define +(?P<macro>\w+)")
414 mbed_regex = re.compile(r"\b(MBED.+?|PSA)_[A-Z0-9_]*")
415 exclusions = re.compile(r"// *no-check-names|#error")
466 optional_c_identifier = r"([_a-zA-Z][_a-zA-Z0-9]*)?"
468 re.search(r"^(typedef +)?enum " + \
470 r" *{", line)):
473 re.search(r"^(typedef +)?enum", line)):
[all …]
Dgenerate_test_code.py183 BEGIN_HEADER_REGEX = r'/\*\s*BEGIN_HEADER\s*\*/'
184 END_HEADER_REGEX = r'/\*\s*END_HEADER\s*\*/'
186 BEGIN_SUITE_HELPERS_REGEX = r'/\*\s*BEGIN_SUITE_HELPERS\s*\*/'
187 END_SUITE_HELPERS_REGEX = r'/\*\s*END_SUITE_HELPERS\s*\*/'
189 BEGIN_DEP_REGEX = r'BEGIN_DEPENDENCIES'
190 END_DEP_REGEX = r'END_DEPENDENCIES'
192 BEGIN_CASE_REGEX = r'/\*\s*BEGIN_CASE\s*(?P<depends_on>.*?)\s*\*/'
193 END_CASE_REGEX = r'/\*\s*END_CASE\s*\*/'
195 DEPENDENCY_REGEX = r'depends_on:(?P<dependencies>.*)'
196 C_IDENTIFIER_REGEX = r'!?[a-z_][a-z0-9_]*'
[all …]
Dtranslate_ciphers.py89 s_cipher = re.sub(r'\ATLS-', '+', s_cipher)
101 s_cipher = re.sub(r"GCM-SHA\d\d\d", "GCM", s_cipher)
121 s_cipher = re.sub(r'^TLS-', '', s_cipher)
130 s_cipher = re.sub(r'^RSA-', r'', s_cipher)
138 s_cipher = re.sub(r'(?<!DES-)CBC-', r'', s_cipher)
Dcheck_files.py106 r'docs/.*\.pdf\Z',
107 r'programs/fuzz/corpuses/[^.]+\Z',
108 r'tests/data_files/[^.]+\Z',
109 r'tests/data_files/.*\.(crt|csr|db|der|key|pubkey)\Z',
110 r'tests/data_files/.*\.req\.[^/]+\Z',
111 r'tests/data_files/.*malformed[^/]+\Z',
112 r'tests/data_files/format_pkcs12\.fmt\Z',
113 r'tests/data_files/.*\.bin\Z',
280 GOOD_CHARACTERS_RE = re.compile(r'[\w{}]+\Z'.format(GOOD_CHARACTERS))
/mbedtls-3.6.0/library/
Decdsa.c77 mbedtls_mpi r; /* r value */ member
93 mbedtls_mpi_init(&ctx->r); in ecdsa_restart_sig_init()
107 mbedtls_mpi_free(&ctx->r); in ecdsa_restart_sig_free()
244 mbedtls_mpi *r, mbedtls_mpi *s, in mbedtls_ecdsa_sign_restartable() argument
255 mbedtls_mpi *pk = &k, *pr = r; in mbedtls_ecdsa_sign_restartable()
278 pr = &rs_ctx->sig->r; in mbedtls_ecdsa_sign_restartable()
364 MBEDTLS_MPI_CHK(mbedtls_mpi_copy(r, pr)); 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 …]
Dbignum_mod.c25 int mbedtls_mpi_mod_residue_setup(mbedtls_mpi_mod_residue *r, in mbedtls_mpi_mod_residue_setup() argument
34 r->limbs = N->limbs; in mbedtls_mpi_mod_residue_setup()
35 r->p = p; in mbedtls_mpi_mod_residue_setup()
40 void mbedtls_mpi_mod_residue_release(mbedtls_mpi_mod_residue *r) in mbedtls_mpi_mod_residue_release() argument
42 if (r == NULL) { in mbedtls_mpi_mod_residue_release()
46 r->limbs = 0; in mbedtls_mpi_mod_residue_release()
47 r->p = NULL; in mbedtls_mpi_mod_residue_release()
317 int mbedtls_mpi_mod_read(mbedtls_mpi_mod_residue *r, in mbedtls_mpi_mod_read() argument
326 if (r->limbs == 0 || N->limbs == 0) { in mbedtls_mpi_mod_read()
329 if (r->limbs != N->limbs) { in mbedtls_mpi_mod_read()
[all …]
Dalignment.h44 uint16_t r; in mbedtls_get_unaligned_uint16() local
45 memcpy(&r, p, sizeof(r)); in mbedtls_get_unaligned_uint16()
46 return r; in mbedtls_get_unaligned_uint16()
70 uint32_t r; in mbedtls_get_unaligned_uint32() local
71 memcpy(&r, p, sizeof(r)); in mbedtls_get_unaligned_uint32()
72 return r; in mbedtls_get_unaligned_uint32()
96 uint64_t r; in mbedtls_get_unaligned_uint64() local
97 memcpy(&r, p, sizeof(r)); in mbedtls_get_unaligned_uint64()
98 return r; in mbedtls_get_unaligned_uint64()
Dcommon.h168 inline void mbedtls_xor(unsigned char *r, const unsigned char *a, const unsigned char *b, size_t n) in mbedtls_xor() argument
177 vst1q_u8(r + i, x); in mbedtls_xor()
183 mbedtls_put_unaligned_uint64(r + i, x); in mbedtls_xor()
188 mbedtls_put_unaligned_uint32(r + i, x); in mbedtls_xor()
193 r[i] = a[i] ^ b[i]; in mbedtls_xor()
211 static inline void mbedtls_xor_no_simd(unsigned char *r, in mbedtls_xor_no_simd() argument
222 mbedtls_put_unaligned_uint64(r + i, x); in mbedtls_xor_no_simd()
227 mbedtls_put_unaligned_uint32(r + i, x); in mbedtls_xor_no_simd()
232 r[i] = a[i] ^ b[i]; in mbedtls_xor_no_simd()
Daria.c50 uint32_t r; in aria_p1() local
51 __asm("rev16 %0, %1" : "=l" (r) : "l" (x)); in aria_p1()
52 return r; in aria_p1()
59 uint32_t r; in aria_p1() local
61 return r; in aria_p1()
280 static void aria_fo_xor(uint32_t r[4], const uint32_t p[4], in aria_fo_xor()
293 r[0] = a ^ x[0]; in aria_fo_xor()
294 r[1] = b ^ x[1]; in aria_fo_xor()
295 r[2] = c ^ x[2]; in aria_fo_xor()
296 r[3] = d ^ x[3]; in aria_fo_xor()
[all …]
Dpsa_crypto_ecp.c340 mbedtls_mpi r, s; in mbedtls_psa_ecdsa_sign_hash() local
352 mbedtls_mpi_init(&r); in mbedtls_psa_ecdsa_sign_hash()
365 &ecp->grp, &r, &s, in mbedtls_psa_ecdsa_sign_hash()
376 MBEDTLS_MPI_CHK(mbedtls_ecdsa_sign(&ecp->grp, &r, &s, &ecp->d, in mbedtls_psa_ecdsa_sign_hash()
382 MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&r, in mbedtls_psa_ecdsa_sign_hash()
389 mbedtls_mpi_free(&r); in mbedtls_psa_ecdsa_sign_hash()
425 mbedtls_mpi r, s; in mbedtls_psa_ecdsa_verify_hash() local
439 mbedtls_mpi_init(&r); in mbedtls_psa_ecdsa_verify_hash()
447 status = mbedtls_to_psa_error(mbedtls_mpi_read_binary(&r, in mbedtls_psa_ecdsa_verify_hash()
468 &r, &s)); in mbedtls_psa_ecdsa_verify_hash()
[all …]
/mbedtls-3.6.0/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_alignment.function44 uint64_t r = 0;
47 r = mbedtls_get_unaligned_uint16(x + offset);
50 r = mbedtls_get_unaligned_uint32(x + offset);
53 r = mbedtls_get_unaligned_uint64(x + offset);
77 TEST_EQUAL(r, expected);
89 mbedtls_put_unaligned_uint16(x + offset, r);
92 mbedtls_put_unaligned_uint32(x + offset, r);
95 mbedtls_put_unaligned_uint64(x + offset, r);
112 uint64_t r = 0;
115 r = MBEDTLS_BSWAP16(input);
[all …]
Dtest_suite_bignum_mod.function13 static int test_read_residue(mbedtls_mpi_mod_residue *r,
27 r->p = p;
28 r->limbs = limbs;
33 return mbedtls_mpi_mod_residue_setup(r, m, p, limbs);
546 mbedtls_mpi_mod_residue r;
556 TEST_EQUAL(ret, mbedtls_mpi_mod_residue_setup(&r, &m, R, r_limbs));
559 TEST_EQUAL(r.limbs, r_limbs);
560 TEST_ASSERT(r.p == R);
577 mbedtls_mpi_mod_residue r = { NULL, 0 };
589 mbedtls_mpi_mod_read(&r, &m, buf->x, buf->len, endian));
[all …]
Dtest_suite_ecjpake.data58 ECJPAKE round one: KKP1: zero-length r
61 ECJPAKE round one: KKP1: no data for r
64 ECJPAKE round one: KKP1: corrupted r
106 ECJPAKE round one: KKP2: zero-length r
109 ECJPAKE round one: KKP2: no data for r
112 ECJPAKE round one: KKP2: corrupted r
172 ECJPAKE round two client: zero-length r
175 ECJPAKE round two client: no data for r
178 ECJPAKE round two client: corrupted r
226 ECJPAKE round two server: zero-length r
[all …]
/mbedtls-3.6.0/scripts/
Dprepare_release.sh58 r=' yes'
60 r=''
62 sed -i 's/^\(GEN_FILES[ ?:]*=\)\([^#]*\)/\1'"$r/" Makefile */Makefile
66 r='ON'
68 r='OFF'
70 …ent/! s/^\( *option *( *GEN_FILES *"[^"]*" *\)\([A-Za-z0-9][A-Za-z0-9]*\)/\1'"$r/" CMakeLists.txt
Dgenerate_ssl_debug_helpers.py24 string_pattern = r"(?P<string>\".*?\"|\'.*?\')"
25 comment_pattern = r"(?P<comment>/\*.*?\*/|//[^\r\n]*$)"
26 pattern = re.compile(string_pattern + r'|' + comment_pattern,
53 pattern = re.compile(r"^[ \t]*#[ \t]*" +
54 r"(?P<directive>(if[ \t]|ifndef[ \t]|ifdef[ \t]|else|endif))" +
55 r"[ \t]*(?P<param>(.*\\\n)*.*$)",
145 enum_pattern = re.compile(r'enum\s*(?P<prefix_name>\w*)\s*' +
146 r'{\s*(?P<body>[^}]*)}' +
147 r'\s*(?P<suffix_name>\w*)\s*;',
234 sig_alg_pattern = re.compile(r'#define\s+(?P<name>MBEDTLS_TLS1_3_SIG_\w+)\s+' +
[all …]
Dconfig.py387 _define_line_regexp = (r'(?P<indentation>\s*)' +
388 r'(?P<commented_out>(//\s*)?)' +
389 r'(?P<define>#\s*define\s+)' +
390 r'(?P<name>\w+)' +
391 r'(?P<arguments>(?:\((?:\w|\s|,)*\))?)' +
392 r'(?P<separator>\s*)' +
393 r'(?P<value>.*)')
394 _section_line_regexp = (r'\s*/?\*+\s*[\\@]name\s+SECTION:\s*' +
395 r'(?P<section>.*)[ */]*')
396 _config_line_regexp = re.compile(r'|'.join([_define_line_regexp,
Dmin_requirements.py36 split_req[0] = re.sub(r'>=|~=', r'==', split_req[0])
50 line = re.sub(r'(\A|\s+)#.*', r'', line)
53 m = re.match(r'-r\s+', line)
/mbedtls-3.6.0/programs/x509/
Dcert_req.c146 char *p, *q, *r; in main() local
217 r = q; in main()
221 if ((semicolon = strchr(r, ';')) != NULL) { in main()
223 r = semicolon; in main()
231 r = semicolon; in main()
237 *r++ = '\0'; in main()
239 r = NULL; in main()
302 q = r; in main()
314 if ((r = strchr(q, ',')) != NULL) { in main()
315 *r++ = '\0'; in main()
[all …]
Dcert_write.c301 char *p, *q, *r; in main() local
474 if ((r = strchr(q, ',')) != NULL) { in main()
475 *r++ = '\0'; in main()
497 q = r; in main()
503 if ((r = strchr(q, ',')) != NULL) { in main()
504 *r++ = '\0'; in main()
531 q = r; in main()
539 r = q; in main()
543 if ((semicolon = strchr(r, ';')) != NULL) { in main()
545 r = semicolon; in main()
[all …]
/mbedtls-3.6.0/include/mbedtls/
Decdsa.h161 int mbedtls_ecdsa_sign(mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
206 int mbedtls_ecdsa_sign_det_ext(mbedtls_ecp_group *grp, mbedtls_mpi *r,
271 mbedtls_mpi *r, mbedtls_mpi *s,
334 mbedtls_mpi *r, mbedtls_mpi *s,
375 const mbedtls_ecp_point *Q, const mbedtls_mpi *r,
417 const mbedtls_mpi *r,

12345