/mbedtls-development/3rdparty/everest/library/kremlib/ |
A D | FStar_UInt128_extracted.c | 27 return (a ^ ((a ^ b) | ((a - b) ^ b))) >> (uint32_t)63U; in FStar_UInt128_constant_time_carry() 38 flat = { a.low + b.low, a.high + b.high + FStar_UInt128_carry(a.low + b.low, b.low) }; in FStar_UInt128_add() 60 flat = { a.low - b.low, a.high - b.high - FStar_UInt128_carry(a.low, a.low - b.low) }; in FStar_UInt128_sub() 68 flat = { a.low - b.low, a.high - b.high - FStar_UInt128_carry(a.low, a.low - b.low) }; in FStar_UInt128_sub_underspec() 76 flat = { a.low - b.low, a.high - b.high - FStar_UInt128_carry(a.low, a.low - b.low) }; in FStar_UInt128_sub_mod_impl() 131 flat = { a.low << s, FStar_UInt128_add_u64_shift_left_respec(a.high, a.low, s) }; in FStar_UInt128_shift_left_small() 201 return a.low == b.low && a.high == b.high; in FStar_UInt128_eq() 206 return a.high > b.high || (a.high == b.high && a.low > b.low); in FStar_UInt128_gt() 211 return a.high < b.high || (a.high == b.high && a.low < b.low); in FStar_UInt128_lt() 216 return a.high > b.high || (a.high == b.high && a.low >= b.low); in FStar_UInt128_gte() [all …]
|
A D | FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.c | 13 uint64_t FStar_UInt64_eq_mask(uint64_t a, uint64_t b) in FStar_UInt64_eq_mask() argument 15 uint64_t x = a ^ b; in FStar_UInt64_eq_mask() 24 uint64_t x = a; in FStar_UInt64_gte_mask() 37 uint32_t x = a ^ b; in FStar_UInt32_eq_mask() 46 uint32_t x = a; in FStar_UInt32_gte_mask() 59 uint16_t x = a ^ b; in FStar_UInt16_eq_mask() 68 uint16_t x = a; in FStar_UInt16_gte_mask() 79 uint8_t FStar_UInt8_eq_mask(uint8_t a, uint8_t b) in FStar_UInt8_eq_mask() argument 81 uint8_t x = a ^ b; in FStar_UInt8_eq_mask() 88 uint8_t FStar_UInt8_gte_mask(uint8_t a, uint8_t b) in FStar_UInt8_gte_mask() argument [all …]
|
/mbedtls-development/3rdparty/everest/include/everest/kremlib/ |
A D | FStar_UInt128.h | 29 FStar_UInt128_add_underspec(FStar_UInt128_uint128 a, FStar_UInt128_uint128 b); 36 FStar_UInt128_sub_underspec(FStar_UInt128_uint128 a, FStar_UInt128_uint128 b); 46 FStar_UInt128_uint128 FStar_UInt128_lognot(FStar_UInt128_uint128 a); 48 FStar_UInt128_uint128 FStar_UInt128_shift_left(FStar_UInt128_uint128 a, uint32_t s); 52 bool FStar_UInt128_eq(FStar_UInt128_uint128 a, FStar_UInt128_uint128 b); 54 bool FStar_UInt128_gt(FStar_UInt128_uint128 a, FStar_UInt128_uint128 b); 56 bool FStar_UInt128_lt(FStar_UInt128_uint128 a, FStar_UInt128_uint128 b); 58 bool FStar_UInt128_gte(FStar_UInt128_uint128 a, FStar_UInt128_uint128 b); 60 bool FStar_UInt128_lte(FStar_UInt128_uint128 a, FStar_UInt128_uint128 b); 66 FStar_UInt128_uint128 FStar_UInt128_uint64_to_uint128(uint64_t a); [all …]
|
/mbedtls-development/tests/data_files/ |
A D | dh.optlen.pem | 5 80:0a:bf:e7:dc:66:7a:a1:7b:cd:7c:04:61:4b:c2: 6 21:a6:54:82:cc:c0:4b:60:46:02:b0:e1:31:90:8a: 7 93:8e:a1:1b:48:dc:51:5d:ab:7a:bc:bb:1e:0c:7f: 9 43:57:e1:c4:ea:07:a7:ce:1e:38:1a:2f:ca:fd:ff: 16 c8:75:5c:7a:46:8d:47:f5:6d:6d:b9:ea:01:29:24: 18 8e:e5:4e:eb:59:45:48:28:5f:06:a9:73:cb:be:2a: 19 0c:b0:2e:90:f3:23:fe:04:55:21:f3:4c:68:35:4a: 20 6d:3e:95:db:ff:f1:eb:64:69:2e:dc:0a:44:f3:d3: 25 b3:12:6a:ea:f4:71:53:c7:d6:7f:40:30:30:b2:92: 26 b5:bd:5a:6c:9e:ae:1c:13:7a:f3:40:87:fc:e2:a3: [all …]
|
A D | server9-with-ca.crt | 36 58:08:94:a5:ec:9b:c5:8b:df:1a:1e:99:38:99:87: 40 ec:4a:63:c0:b8:29:00:74:9c:57:3b:a8:a5:04:90: 41 71:f1:bd:83:d9:3f:d6:a5:e2:3c:2a:8f:ef:27:60: 65 1d:87:89:4a:c4:78:11:d8:07:b5:d7:22:50:8e:48:eb:62:7a: 68 09:3a:24:e4:36:d9:e9:2c:da:38:d0:73:75:61:d7:c1:6c:26: 70 2a:ce:2c:0d:08:59:05:09:05:a6:39:9f:b3:67:1b:e2:83:e5: 71 e1:8f:53:f6:67:93:c7:f9:6f:76:44:58:12:e8:3a:d4:97:e7: 72 e9:c0:3e:a8:7a:72:3d:87:53:1f:e5:2c:84:84:e7:9a:9e:7f: 74 35:cc:58:19:d1:d2:99:ef:4d:73:f8:1f:89:d4:5a:d0:52:ce: 75 09:f5:b1:46:51:6a:00:8e:3b:cc:6f:63:01:00:99:ed:9d:a6: [all …]
|
A D | server10_int3_int-ca2_ca.crt | 57 58:08:94:a5:ec:9b:c5:8b:df:1a:1e:99:38:99:87: 61 ec:4a:63:c0:b8:29:00:74:9c:57:3b:a8:a5:04:90: 62 71:f1:bd:83:d9:3f:d6:a5:e2:3c:2a:8f:ef:27:60: 86 1d:87:89:4a:c4:78:11:d8:07:b5:d7:22:50:8e:48:eb:62:7a: 89 09:3a:24:e4:36:d9:e9:2c:da:38:d0:73:75:61:d7:c1:6c:26: 91 2a:ce:2c:0d:08:59:05:09:05:a6:39:9f:b3:67:1b:e2:83:e5: 92 e1:8f:53:f6:67:93:c7:f9:6f:76:44:58:12:e8:3a:d4:97:e7: 93 e9:c0:3e:a8:7a:72:3d:87:53:1f:e5:2c:84:84:e7:9a:9e:7f: 95 35:cc:58:19:d1:d2:99:ef:4d:73:f8:1f:89:d4:5a:d0:52:ce: 96 09:f5:b1:46:51:6a:00:8e:3b:cc:6f:63:01:00:99:ed:9d:a6: [all …]
|
A D | dh.1000.pem | 5 23:84:3c:0d:55:8c:b9:7d:a9:d5:9a:80:82:fb:50: 8 77:33:a9:8a:90:94:21:ff:84:d2:7b:36:39:9b:e5: 12 ce:45:66:72:07:64:8a:af:14:d8:ae:18:19:ba:25: 19 d0:1e:7c:4e:22:07:d2:b5:f9:9a:9e:52:e2:97:9d: 21 4a:1a:dc:b2:d4:29:23:ab:2e:8f:7f:6a:84:1d:82: 23 53:08:e4:e8:5a:04:ca:5f:8f:73:55:ac:e1:41:20:
|
A D | dh.998.pem | 3 39:5f:30:c0:7b:06:b7:6a:49:c6:c0:81:1f:39:77: 4 b3:35:e2:8d:66:fc:6a:6e:94:f3:df:97:f2:89:31: 6 48:2d:77:99:08:1d:67:38:37:0a:cd:cf:39:b6:3c: 7 9d:8a:e5:85:3c:71:e3:4b:3e:1e:b9:80:e3:cc:7a: 9 c7:11:b9:64:43:40:75:c7:4a:ef:a7:2d:00:e2:62:
|
/mbedtls-development/programs/ |
A D | README.md | 20 …ey.c`](pkey/gen_key.c): generates a key for any of the supported public-key algorithms (RSA or ECC… 24 …app_writer.c`](pkey/key_app_writer.c): loads a PEM or DER public key or private key file and write… 26 …_decrypt.c`](pkey/pk_decrypt.c): loads a PEM or DER public/private key file and uses the key to en… 28 …y/pk_verify.c`](pkey/pk_verify.c): loads a PEM or DER private/public key file and uses the key to … 69 …nt.c): a minimalistic SSL client, which sends a short string and disconnects. This is primarily in… 71 * [`ssl/ssl_client1.c`](ssl/ssl_client1.c): a simple HTTPS client that sends a fixed request and di… 73 …](ssl/ssl_fork_server.c): a simple HTTPS server using one process per client to send a fixed respo… 77 …_pthread_server.c`](ssl/ssl_pthread_server.c): a simple HTTPS server using one thread per client t… 79 …l/ssl_server.c`](ssl/ssl_server.c): a simple HTTPS server that sends a fixed response. It serves a… 111 * [`x509/cert_req.c`](x509/cert_req.c): generates a certificate signing request (CSR) for a private… [all …]
|
/mbedtls-development/ |
A D | CONTRIBUTING.md | 6 …ss there is a real justification for that. If there is an API change, the contribution, if accepte… 11 - The code should be written in a clean and readable style. 13 - The code should be secure, and will be reviewed from a security point of view as well. 15 Making a Contribution 17 …mbedtls/issues) or [start a discussion](https://lists.trustedfirmware.org/mailman/listinfo/mbed-tl… 34 When a build is made with the deprecation preprocessor symbols defined, a compiler warning will be … 36 …a function needs to be changed, a new function needs to be created alongside it, with a new name, … 47 …orrect a defect that is also present in an LTS branch must be backported to that LTS branch. If a … 48 1. If a contribution is a new feature or enhancement, no backporting is required. Exceptions to thi… 84 1. If needed, a Readme file is advised. [all …]
|
A D | .pylintrc | 7 argument-rgx=[a-z_][a-z0-9_]*$ 20 method-rgx=[a-z_][a-z0-9_]{2,}$ 22 # Allow module names containing a dash (but no underscore or uppercase letter). 25 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|[a-z][-0-9a-z]+)$ 33 variable-rgx=[a-z_][a-z0-9_]*$ 46 # * locally-disabled, locally-enabled: If we disable or enable a message 51 # This is of minor utility (mainly a performance gain when there are 64 # * unnecessary-pass: If we take the trouble of adding a line with "pass",
|
/mbedtls-development/docs/proposed/ |
A D | psa-driver-interface.md | 45 ### Deliverables for a driver 105 * If the mechanism involves a key: 108 * If the mechanism involves a key: 111 * If the mechanism involves a key: 175 …a capability of a driver, such as a cryptographic operation, a part of a cryptographic operation, … 207 Buffers of size 0 may be represented with either a null pointer or a non-null pointer. 367 * If a cryptographic operation involves a division by an integer which is provided as part of a key… 643 * For a symmetric key (not a key pair or public key): 866 ### Creating a key in a secure element 873 To declare a volatile key: [all …]
|
A D | psa-conditional-inclusion-c.md | 6 This is currently a proposal for Mbed TLS. It is not currently on track for standardization in PSA. 32 …vers] If a PSA driver is available in the build, a suitably configured Mbed TLS build must not inc… 40 …on.matrix] If a mechanism is defined by a combination of algorithms and key types, for example a b… 63 A PSA Crypto configuration symbol is a C preprocessor symbol whose name starts with `PSA_WANT_`. 71 …a symbol `PSA_WANT_xxx` in the Mbed TLS configuration determines whether a feature is available th… 91 …a deviation of the general principle that `PSA_ECC_FAMILY_xxx` would have a corresponding symbol `… 144 * (U) indicates a symbol that is defined by the user (application). 145 * (D) indicates a symbol that is deduced from other symbols by code that ships with Mbed TLS. 146 * (G) indicates a symbol that is generated from driver descriptions. 220 #### Algorithms without a key type or vice versa [all …]
|
A D | psa-driver-developer-guide.md | 4 **This is a specification of work in progress. The implementation is not yet merged into Mbed TLS.** 8 This document focuses on behavior that is specific to Mbed TLS. For a reference of the interface be… 16 The PSA cryptography driver interface provides a way to build Mbed TLS with additional code that im… 20 …a transparent driver is available for a particular combination of parameters (cryptographic algori… 21 …hat can only be used inside a protected environment such as a **secure element**, a hardware secur… 23 ### Deliverables for a driver 25 …a driver, you need to implement some functions with C linkage, and to declare these functions in a… 27 The concrete syntax for a driver description file is JSON. The structure of this JSON file is speci…
|
/mbedtls-development/docs/architecture/ |
A D | mbed-crypto-storage-specification.md | 31 > On Mbed OS, if a device has a nonvolatile random seed file produced with Mbed OS 5.11.x and is up… 45 There is a shared namespace for all callers. 51 The layout of a key file is: 183 The layout of a key file is: 205 * The layout of a key file now has a lifetime field before the type field. 242 The layout of a key file is: 264 All currently existing transactions concern a key in a secure element. 266 The layout of a transaction file is: 270 * lifetime (4 bytes): `psa_key_lifetime_t` value that corresponds to a key in a secure element. 295 * The type field has been split into a type and a bits field of 2 bytes each. [all …]
|
A D | tls13-experimental.md | 31 of AAD, IV, and the introduction of a flexible padding. 98 - If the TLS 1.3 MVP receives a HelloRetryRequest or a CertificateRequest 151 re-initiate a server handshake. 184 | MBEDTLS_SSL_ENCRYPT_THEN_MAC | n/a | 185 | MBEDTLS_SSL_EXTENDED_MASTER_SECRET | n/a | 187 | MBEDTLS_SSL_RENEGOTIATION | n/a | 290 - the macros to extract a byte from a multi-byte integer MBEDTLS_BYTE_{0-8}. 313 to read/write past the end of a data buffer. 354 places in the code. When a constant is used only locally in a function 377 If a line becomes too long due to a refactoring (for example renaming a [all …]
|
/mbedtls-development/docs/architecture/testing/ |
A D | driver-interface-test-strategy.md | 21 …a driver usable by Mbed Crypto, the initialization code must call `psa_register_se_driver` with a … 27 …rface unit tests could be covered by running the existing API tests with a key in a secure element. 34 * Make at least one failing call to `psa_register_se_driver` followed by a successful call. 42 * Make at least one test with a key that is not in a secure element that checks that the driver met… 43 * Make at least one test with a key in a secure element with a driver that does not have the requis… 44 * Make at least one test with a key in a secure element with a driver that does not have the substr… 48 Some methods only make sense as a group (for example a driver that provides the MAC methods must pr… 60 For each API function that leads to a driver call, call it with parameters that cause a driver to b… 64 * Expected errors (e.g. `PSA_ERROR_INVALID_SIGNATURE` from a signature verification method). 76 * Test that keys in a secure element survive `psa_close_key(); psa_open_key()`. [all …]
|
A D | psa-storage-format-testing.md | 5 The PSA crypto subsystem includes a persistent key store. It is possible to create a persistent key… 7 …a test strategy for the key store that not only validates that it's possible to load a key that wa… 13 ### Limitations of a direct approach 15 The goal of storage format stability testing is: as a user of Mbed TLS, I want to store a key under… 23 …a key is deterministic. Therefore we can ensure the stability of the storage format by creating te… 31 Use a similar approach for files other than keys where possible and relevant. 43 …age interface. The state of the storage is a mapping from file identifer (a 64-bit number) to file… 50 For a more detailed description, refer to the [Mbed Crypto storage specification](../mbed-crypto-st… 62 Method: Create a key with a given identifier (using `psa_import_key`) and verify that a file with t… 83 Method: Each test case creates a key with `psa_import_key`, purges it from memory, then reads it ba… [all …]
|
A D | test-framework.md | 13 …t case has a description which succinctly describes for a human audience what the test does. The f… 17 * Test descriptions must be unique within a `.data` file. If you can't think of a better descriptio… 18 …Rationale: make it easy to relate a failure log to the test data. Avoid confusion between cases in… 19 * Test descriptions should be a maximum of **66 characters**. <br> 20 …rs on an 80-column line). Longer descriptions may be truncated or may break a visual alignment. <b… 21 …We have a lot of test cases with longer descriptions, but they should be avoided. At least please … 23 * Avoid changing the description of an existing test case without a good reason. This breaks the tr… 33 Each test case in `ssl-opt.sh` has a description which succinctly describes for a human audience wh… 49 The outcome file is in a CSV format using `;` (semicolon) as the delimiter and no quoting. This mea… 53 * **Platform**: a description of the platform, e.g. `Linux-x86_64` or `Linux-x86_64-gcc7-msan`. [all …]
|
/mbedtls-development/docs/ |
A D | getting_started.md | 28 * [Importing a key](#importing-a-key) 29 * [Signing a message using RSA](#signing-a-message-using-RSA) 31 * [Hashing a message](#hashing-a-message) 33 * [Generating a random value](#generating-a-random-value) 64 ### Importing a key 193 **To encrypt a message with a symmetric cipher:** 230 /* Import a key */ 277 **To decrypt a message with a symmetric cipher:** 314 /* Import a key */ 377 ### Hashing a message [all …]
|
/mbedtls-development/tests/data_files/dir3/ |
A D | test-ca.crt | 17 58:08:94:a5:ec:9b:c5:8b:df:1a:1e:99:38:99:87: 21 ec:4a:63:c0:b8:29:00:74:9c:57:3b:a8:a5:04:90: 22 71:f1:bd:83:d9:3f:d6:a5:e2:3c:2a:8f:ef:27:60: 46 1d:87:89:4a:c4:78:11:d8:07:b5:d7:22:50:8e:48:eb:62:7a: 49 09:3a:24:e4:36:d9:e9:2c:da:38:d0:73:75:61:d7:c1:6c:26: 51 2a:ce:2c:0d:08:59:05:09:05:a6:39:9f:b3:67:1b:e2:83:e5: 52 e1:8f:53:f6:67:93:c7:f9:6f:76:44:58:12:e8:3a:d4:97:e7: 53 e9:c0:3e:a8:7a:72:3d:87:53:1f:e5:2c:84:84:e7:9a:9e:7f: 55 35:cc:58:19:d1:d2:99:ef:4d:73:f8:1f:89:d4:5a:d0:52:ce: 56 09:f5:b1:46:51:6a:00:8e:3b:cc:6f:63:01:00:99:ed:9d:a6: [all …]
|
/mbedtls-development/tests/data_files/dir1/ |
A D | test-ca.crt | 17 58:08:94:a5:ec:9b:c5:8b:df:1a:1e:99:38:99:87: 21 ec:4a:63:c0:b8:29:00:74:9c:57:3b:a8:a5:04:90: 22 71:f1:bd:83:d9:3f:d6:a5:e2:3c:2a:8f:ef:27:60: 46 1d:87:89:4a:c4:78:11:d8:07:b5:d7:22:50:8e:48:eb:62:7a: 49 09:3a:24:e4:36:d9:e9:2c:da:38:d0:73:75:61:d7:c1:6c:26: 51 2a:ce:2c:0d:08:59:05:09:05:a6:39:9f:b3:67:1b:e2:83:e5: 52 e1:8f:53:f6:67:93:c7:f9:6f:76:44:58:12:e8:3a:d4:97:e7: 53 e9:c0:3e:a8:7a:72:3d:87:53:1f:e5:2c:84:84:e7:9a:9e:7f: 55 35:cc:58:19:d1:d2:99:ef:4d:73:f8:1f:89:d4:5a:d0:52:ce: 56 09:f5:b1:46:51:6a:00:8e:3b:cc:6f:63:01:00:99:ed:9d:a6: [all …]
|
/mbedtls-development/tests/data_files/dir2/ |
A D | test-ca.crt | 17 58:08:94:a5:ec:9b:c5:8b:df:1a:1e:99:38:99:87: 21 ec:4a:63:c0:b8:29:00:74:9c:57:3b:a8:a5:04:90: 22 71:f1:bd:83:d9:3f:d6:a5:e2:3c:2a:8f:ef:27:60: 46 1d:87:89:4a:c4:78:11:d8:07:b5:d7:22:50:8e:48:eb:62:7a: 49 09:3a:24:e4:36:d9:e9:2c:da:38:d0:73:75:61:d7:c1:6c:26: 51 2a:ce:2c:0d:08:59:05:09:05:a6:39:9f:b3:67:1b:e2:83:e5: 52 e1:8f:53:f6:67:93:c7:f9:6f:76:44:58:12:e8:3a:d4:97:e7: 53 e9:c0:3e:a8:7a:72:3d:87:53:1f:e5:2c:84:84:e7:9a:9e:7f: 55 35:cc:58:19:d1:d2:99:ef:4d:73:f8:1f:89:d4:5a:d0:52:ce: 56 09:f5:b1:46:51:6a:00:8e:3b:cc:6f:63:01:00:99:ed:9d:a6: [all …]
|
/mbedtls-development/library/ |
A D | aria.c | 215 *a = ( (uint32_t) sa[ MBEDTLS_BYTE_0( *a ) ] ) ^ in aria_sl() 346 uint32_t a, b, c, d; in aria_fo_xor() local 348 a = p[0] ^ k[0]; in aria_fo_xor() 356 r[0] = a ^ x[0]; in aria_fo_xor() 368 uint32_t a, b, c, d; in aria_fe_xor() local 370 a = p[0] ^ k[0]; in aria_fe_xor() 378 r[0] = a ^ x[0]; in aria_fe_xor() 523 uint32_t a, b, c, d; in mbedtls_aria_crypt_ecb() local 536 a ^= ctx->rk[i][0]; in mbedtls_aria_crypt_ecb() 545 a ^= ctx->rk[i][0]; in mbedtls_aria_crypt_ecb() [all …]
|
/mbedtls-development/ChangeLog.d/ |
A D | 00README.md | 6 ## What requires a changelog entry? 8 Write a changelog entry if there is a user-visible change. This includes: 10 * Bug fixes in the library or in sample programs: fixing a security hole, 26 Looking at older changelog entries is good practice for how to write a 40 * Yet another change description. This is a long change description that 61 ## How to write a changelog entry 63 Each entry starts with three spaces, an asterisk and a space. Continuation 67 the present tense. Use the imperative where applicable. For example: “Fix a 77 library, not its developers. In particular, for a bug fix, explain the 78 consequences of the bug, not how the bug was fixed. For a new feature, explain [all …]
|