Home
last modified time | relevance | path

Searched refs:function (Results 1 – 25 of 89) sorted by relevance

1234

/mbedtls/scripts/mbedtls_dev/
A Dc_wrapper_generator.py155 return function.name
172 if function.returns_void():
186 if function.returns_void():
225 if self._skip_function(function):
231 guard=self._function_guard(function),
249 if function.arguments:
253 function.name,
268 wrapper = self._wrapper_info(function)
274 .format(function.name))
311 wrapper = self._wrapper_info(function)
[all …]
A Dtest_case.py32 self.function = None #type: Optional[str]
44 def set_function(self, function: str) -> None:
45 self.function = function
53 if self.function is None:
66 assert self.function is not None # guide mypy
73 out.write(self.function + ':' + ':'.join(self.arguments) + '\n')
A Dcrypto_data_tests.py69 function: str, note: str,
74 .format(function,
78 tc.set_function(function)
A Dmacro_collector.py497 def accept_test_case_line(self, function: str, argument: str) -> bool:
513 def add_test_case_line(self, function: str, argument: str) -> None:
516 if function.endswith('_algorithm'):
518 if function == 'key_agreement_algorithm' and \
523 function = 'other_algorithm'
524 sets += self.table_by_test_function[function]
525 if self.accept_test_case_line(function, argument):
/mbedtls/tests/suites/
A Dmain_test.function1 #line 2 "suites/main_test.function"
42 #line __MBEDTLS_TEST_TEMPLATE__LINE_NO "suites/main_test.function"
53 #line __MBEDTLS_TEST_TEMPLATE__LINE_NO "suites/main_test.function"
81 #line __MBEDTLS_TEST_TEMPLATE__LINE_NO "suites/main_test.function"
111 #line __MBEDTLS_TEST_TEMPLATE__LINE_NO "suites/main_test.function"
120 * \brief Function pointer type for test function wrappers.
123 * underlying test function. Both the wrapper and the underlying function
144 #line __MBEDTLS_TEST_TEMPLATE__LINE_NO "suites/main_test.function"
150 * \param func_idx Test function index.
190 * \param func_idx Test function index.
[all …]
A Dtest_suite_error.data7 error_strerror:-0x4080:"RSA - Bad input parameters to function"
11 error_strerror:-0x40A0:"RSA - Bad input parameters to function \: AES - Invalid key length"
A Dtest_suite_bignum_random.function31 * in mpi_random_many, which runs the function multiple times. This also
67 * This function returns 1 if, when drawing a number between 0 and b,
69 * This probability is (b - 2^n) / b and this function checks that this
103 * Testing x >= 2^4 amounts to picking A = 1/16 in the function
164 /* Call the legacy function and the core function with the same random
269 * This function assumes that the value of bound is at least 2 and
421 * the library function rejects that as expected. */
/mbedtls/tests/scripts/
A Dgenerate_psa_wrappers.py69 def _skip_function(self, function: c_wrapper_generator.FunctionInfo) -> bool:
70 if function.return_type != 'psa_status_t':
72 if function.name in self._SKIP_FUNCTIONS:
83 function: c_wrapper_generator.FunctionInfo) -> str:
85 if function.return_type == 'psa_status_t':
87 return super()._return_variable_name(function)
155 function: c_wrapper_generator.FunctionInfo,
159 for param in self._detect_buffer_parameters(function.arguments,
161 if self._parameter_should_be_copied(function.name,
162 function.arguments[param.index].name))
[all …]
A Dpsa_collect_statuses.py42 value, function, tail = line.split(':', 2)
43 if function not in self.functions:
44 self.functions[function] = {}
45 fdata = self.functions[function]
46 if value not in self.functions[function]:
64 for function in sorted(self.functions.keys()):
65 fdata = self.functions[function]
68 sys.stdout.write('{} {}\n'.format(function, name))
/mbedtls/docs/architecture/
A Dalternative-implementations.md12 …efine `MBEDTLS_PLATFORM_XXX_MACRO` to the name of a function to call instead of the standard funct…
24 …le(s)](#module-alternative-implementations) or [of specific functions](#function-alternative-imple…
54function that takes this context as an argument). (This is necessary, for example, to support appl…
64 …ter to a context or to a part of a context does not remain valid across function calls. Alternativ…
68 In some cases, it is possible to replace a single function or a small set of functions instead of […
72function name and appending `_ALT`. If the function name contains `_internal`, `_ext` or `_ret`, t…
82 …he process described here. To reconfigure how Mbed TLS calls the standard library function `xxx()`:
87 For example, to provide a custom `printf` function at run time, enable `MBEDTLS_PLATFORM_PRINTF_ALT…
89 …ALT` does not change the behavior: by default, `mbedtls_xxx` points to the standard function `xxx`.
A Dpsa-shared-memory.md21function. This document is concerned with environments where the arguments passed to a PSA Crypto …
242 * Write a small program that uses a PSA function which copies inputs or outputs.
360 * Those buffers that are inputs to a PSA function need to be unpoisoned right up until the function
361 * Those buffers that are outputs from a PSA function need to be unpoisoned straight after the funct…
434 1. Set up input and output buffers for a PSA function call.
437 4. Call the PSA function.
486 Then, write a careful-access test for this function and ensure that it fails.
584 … have copying added while keeping the code mostly unmodified. Consider a hypothetical PSA function:
678 …it would be best to write a test function that misbehaves and test it with memory poisoning. Speci…
680 * Read its input buffer and after calling the input-buffer-copying function to create a local copy …
[all …]
A Dpsa-crypto-implementation-structure.md52 …re generated in a psa_crypto_driver_wrappers_no_static.c C file and the function prototypes declar…
73 …r implements among other entry points the "import_key" entry point. The function implementing this…
87 * (If adding `PSA_IS_xxx`) `tests/suites/test_suite_psa_crypto_metadata.function` — [New functions …
88 * [ ] `tests/suites/test_suite_psa_crypto*.data`, `tests/suites/test_suite_psa_crypto*.function` — …
97 * [ ] `tests/suites/test_suite_psa_crypto.data`, `tests/suites/test_suite_psa_crypto.function`, `te…
121 …New `PSA_IS_xxx` macros must be declared in `tests/suites/test_suite_psa_crypto_metadata.function`.
139 The general structure of a cryptographic operation function is:
141 1. API function defined in `library/psa_crypto.c`. The entry point performs generic checks that don…
143 3. Built-in implementation in `library/psa_crypto_*.c` (with function declarations in the correspon…
150 Some mechanisms require state to be kept between function calls. Keys and key-like data is kept in …
[all …]
/mbedtls/
A D.uncrustify.cfg16 # Allow splitting function calls between arguments
102 # No spaces inside function parentheses
104 # (The case where the function has no parameters/arguments)
107 # No spaces inside the first parentheses in a function type
139 # Remove space after star in a function return type
191 # At least 1 space between a function return type and the function name
194 # No space between a function name and its arguments/parameters
A D.gitattributes1 # Classify all '.function' files as C for syntax highlighting purposes
2 *.function linguist-language=C
A DCONTRIBUTING.md37function with one that has a slightly different interface (different prototype, or different docum…
48 …t LTS branch. If a bug fix introduces a change to the API such as a new function, the fix should b…
60function file` (e.g. `suites/test_suite_rsa.function`) and a `data file` (e.g. `suites/test_suite_…
/mbedtls/tests/
A DCMakeLists.txt158 function(add_test_suite suite_name)
224 -f ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${suite_name}.function
226 -t ${CMAKE_CURRENT_SOURCE_DIR}/suites/main_test.function
227 -p ${CMAKE_CURRENT_SOURCE_DIR}/suites/host_test.function
229 --helpers-file ${CMAKE_CURRENT_SOURCE_DIR}/suites/helpers.function
233 ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${suite_name}.function
235 ${CMAKE_CURRENT_SOURCE_DIR}/suites/main_test.function
236 ${CMAKE_CURRENT_SOURCE_DIR}/suites/host_test.function
237 ${CMAKE_CURRENT_SOURCE_DIR}/suites/helpers.function
/mbedtls/docs/architecture/testing/
A Dinvasive-testing.md61 … to change the behavior, do it by function substitution.** See [“rules for function substitution”]…
63 #### Rules for function substitution
65 This section explains how to replace a library function `mbedtls_foo()` by alternative code for tes…
67 … defined to be a system function (like `mbedtls_calloc` or `mbedtls_fopen`), which we replace to m…
69function is a `static inline` function that does nothing (not a macro, to avoid accidentally skipp…
71function pointer type. This global variable is initialized to the system function, or to a functio…
75 * The test function (or the whole test file) must depend on `MBEDTLS_TEST_HOOKS`.
76 * At the beginning of the test function, set the global function pointers to the desired value.
77 * In the test function's cleanup code, restore the global function pointers to their default value.
226 … Changing the behavior should require some action at runtime (calling a function or changing a var…
[all …]
A Ddriver-interface-test-strategy.md21function provided by Mbed TLS (`psa_register_se_driver`) and many functions that drivers must impl…
25 …quirements; for example a “good case” test can validate that the proper function is called, that i…
39 For each API function that can lead to a driver call (more precisely, for each driver method call s…
52 For each API function that can lead to a driver call (more precisely, for each driver method call s…
55 * If the API function can take parameters that are invalid and must not reach the driver, call the …
60 For each API function that leads to a driver call, call it with parameters that cause a driver to b…
92 …d successive storage states and replay each of them. Each `psa_its_xxx` function call is assumed t…
/mbedtls/docs/
A Duse-psa-crypto.md15 `psa_crypto_init()` before calling any function from the SSL/TLS, X.509 or PK
30 `psa_crypto_init()` before you call any other `psa_xxx()` function. Other
38 calling any function from PK, X.509 or TLS; however it doesn't change anything
72 **New API function:** `mbedtls_pk_setup_opaque()` - can be used to
111 **New API function:** `mbedtls_ssl_set_hs_ecjpake_password_opaque()`.
112 Call this function from an application to register a PSA key for use with the
124 There is a new API function `mbedtls_cipher_setup_psa()` to set up a context
127 This function only worked for a small number of ciphers. It is now deprecated
131 **Warning:** This function will be removed in a future version of Mbed TLS. If
A Dpsa-driver-example-and-guide.md16 …third-party drivers. Operations that are completed within one step (one function call), such as ve…
22function in the driver wrapper. Using flags set at compile time, the driver wrapper ascertains whe…
76 **4. For each operation being accelerated, locate the function in the driver dispatch layer that co…
77 …_driver_wrapper` followed by the entry point name. So, for example, the function `psa_driver_wrapp…
79 **5. If a driver entry point function has been provided then ensure it has the same signature as th…
80 …hould have the same signature as the driver wrapper function. The purpose of the entry point funct…
86 **6. Modify the driver wrapper function** \
87 Each driver wrapper function contains a `switch` statement which checks the location of the key. If…
92 The diagram below shows the layout of a driver wrapper function which can dispatch to two transpare…
154 … PSA's, it is recommended to implement a status code translation function. The function `p256_to_p…
[all …]
/mbedtls/programs/test/
A Ddlopen.c28 #define CHECK_DLERROR(function, argument) \ argument
35 function, argument, CHECK_DLERROR_error); \
/mbedtls/scripts/data_files/driver_templates/
A DOS-template-opaque.jinja1 {# One Shot function's dispatch code for opaque drivers.
4 * entry_point: the name of the entry point that this function dispatches to.
A DOS-template-transparent.jinja1 {# One Shot function's dispatch code for transparent drivers.
4 * entry_point: the name of the entry point that this function dispatches to.
/mbedtls/pkgconfig/
A DJoinPaths.cmake2 # This module provides function for joining paths
15 function(join_paths joined_path first_path_segment)
/mbedtls/3rdparty/p256-m/p256-m/
A DREADME.md40 - Each public function fully validates its inputs and returns specific errors.
116 **Warning:** p256-m requires an externally-provided RNG function. If that
117 function is not cryptographically secure, then neither is p256-m's key
139 - Cleaning up secret values from the stack before returning from a function.
146 - A secure RNG function needs to be provided externally, see
162 that the externally-provided RNG function uses at most 384 bytes of stack).
166 Here are the timings of each public function in milliseconds measured on
331 internal `u32_muladd64()` function, as well as two pure C versions of this
332 function, depending on whether `MUL64_IS_CONSTANT_TIME`.
460 curves of various sizes, add a parameter to each function specifying the
[all …]

Completed in 42 milliseconds

1234