Home
last modified time | relevance | path

Searched refs:key (Results 1 – 25 of 304) sorted by relevance

12345678910>>...13

/openthread-latest/tests/unit/
Dtest_flash.cpp65 for (uint16_t key = 0; key < 16; key++) in TestFlash() local
67 uint16_t length = key; in TestFlash()
69 SuccessOrQuit(flash.Add(key, writeBuffer, length)); in TestFlash()
72 for (uint16_t key = 0; key < 16; key++) in TestFlash() local
74 uint16_t length = key; in TestFlash()
76 SuccessOrQuit(flash.Get(key, 0, readBuffer, &length)); in TestFlash()
77 VerifyOrQuit(length == key, "Get() did not return expected length"); in TestFlash()
81 for (uint16_t key = 0; key < 16; key++) in TestFlash() local
83 SuccessOrQuit(flash.Delete(key, 0)); in TestFlash()
86 for (uint16_t key = 0; key < 16; key++) in TestFlash() local
[all …]
/openthread-latest/third_party/mbedtls/repo/library/
Dssl_ticket.c69 mbedtls_ssl_ticket_key *key = ctx->keys + index; in ssl_ticket_gen_key() local
76 key->generation_time = mbedtls_time(NULL); in ssl_ticket_gen_key()
81 key->lifetime = ctx->ticket_lifetime; in ssl_ticket_gen_key()
83 if ((ret = ctx->f_rng(ctx->p_rng, key->name, sizeof(key->name))) != 0) { in ssl_ticket_gen_key()
94 psa_set_key_algorithm(&attributes, key->alg); in ssl_ticket_gen_key()
95 psa_set_key_type(&attributes, key->key_type); in ssl_ticket_gen_key()
96 psa_set_key_bits(&attributes, key->key_bits); in ssl_ticket_gen_key()
100 PSA_BITS_TO_BYTES(key->key_bits), in ssl_ticket_gen_key()
101 &key->key)); in ssl_ticket_gen_key()
104 ret = mbedtls_cipher_setkey(&key->ctx, buf, in ssl_ticket_gen_key()
[all …]
Dpkwrite.c412 const mbedtls_pk_context *key) in mbedtls_pk_write_pubkey() argument
418 if (mbedtls_pk_get_type(key) == MBEDTLS_PK_RSA) { in mbedtls_pk_write_pubkey()
419 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_rsa_write_pubkey(mbedtls_pk_rsa(*key), start, p)); in mbedtls_pk_write_pubkey()
423 if (mbedtls_pk_get_type(key) == MBEDTLS_PK_ECKEY) { in mbedtls_pk_write_pubkey()
424 MBEDTLS_ASN1_CHK_ADD(len, pk_write_ec_pubkey(p, start, key)); in mbedtls_pk_write_pubkey()
428 if (mbedtls_pk_get_type(key) == MBEDTLS_PK_OPAQUE) { in mbedtls_pk_write_pubkey()
429 MBEDTLS_ASN1_CHK_ADD(len, pk_write_opaque_pubkey(p, start, key)); in mbedtls_pk_write_pubkey()
437 int mbedtls_pk_write_pubkey_der(const mbedtls_pk_context *key, unsigned char *buf, size_t size) in mbedtls_pk_write_pubkey_der() argument
452 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_pk_write_pubkey(&c, buf, key)); in mbedtls_pk_write_pubkey_der()
469 pk_type = pk_get_type_ext(key); in mbedtls_pk_write_pubkey_der()
[all …]
/openthread-latest/third_party/mbedtls/repo/tests/suites/
Dtest_suite_pkwrite.data1 Public key write check RSA
5 Public key write check RSA (DER)
9 Public key write check RSA 4096
13 Public key write check RSA 4096 (DER)
17 Public key write check EC 192 bits
21 Public key write check EC 192 bits (DER)
25 Public key write check EC 521 bits
29 Public key write check EC 521 bits (DER)
33 Public key write check EC Brainpool 512 bits
37 Public key write check EC Brainpool 512 bits (DER)
[all …]
Dtest_suite_psa_crypto_persistent_key.data2 # stored, this may indicate that the key store is changing in a
6 Format for storage: RSA private key
9 Format for storage: AES-128 key
12 Parse storage: RSA private key
15 Parse storage: AES-128 key
33 Parse storage: truncated key
37 Save maximum-size persistent raw key
41 Save larger than maximum-size persistent raw key
44 Persistent key destroy
48 Persistent key destroy after restart
[all …]
Dtest_suite_nist_kw.function21 unsigned char key[16];
30 memset(key, 0, sizeof(key));
40 key, sizeof(key) * 8,
51 key, sizeof(key) * 8,
75 key, sizeof(key) * 8,
93 key, sizeof(key) * 8,
129 unsigned char key[32];
134 memset(key, 0x2A, sizeof(key));
135 TEST_ASSERT((unsigned) key_size <= 8 * sizeof(key));
137 ret = mbedtls_nist_kw_setkey(&ctx, cipher_id, key, key_size, is_wrap);
[all …]
Dtest_suite_psa_crypto_se_driver_hal_mocks.data13 SE key importing mock test
16 SE key importing mock test: max key bits
19 SE key importing mock test: more than max key bits
22 SE key importing mock test: alloc failed
25 SE key importing mock test: import failed
28 SE key exporting mock test
31 SE key exporting mock test: export failed
34 SE public key exporting mock test
37 SE public key exporting mock test: export failed
40 SE key generating mock test
[all …]
Dtest_suite_x509write.data3 x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha1":MBEDTLS_MD_SHA1:0:0:0:0:0
7 x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha224":MBEDTLS_MD_SHA224:0:0:0:0:0
11 x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha256":MBEDTLS_MD_SHA256:0:0:0:0:0
15 x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha384":MBEDTLS_MD_SHA384:0:0:0:0:0
19 x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha512":MBEDTLS_MD_SHA512:0:0:0:0:0
23 x509_csr_check:"data_files/server1.key":"data_files/server1.req.md5":MBEDTLS_MD_MD5:0:0:0:0:0
27 x509_csr_check:"data_files/server1.key":"data_files/server1.req.key_usage":MBEDTLS_MD_SHA1:MBEDTLS_…
31 x509_csr_check_opaque:"data_files/server1.key":MBEDTLS_MD_SHA1:MBEDTLS_X509_KU_DIGITAL_SIGNATURE | …
35 x509_csr_check:"data_files/server1.key":"data_files/server1.req.key_usage_empty":MBEDTLS_MD_SHA1:0:…
39 x509_csr_check:"data_files/server1.key":"data_files/server1.req.cert_type":MBEDTLS_MD_SHA1:0:0:MBED…
[all …]
Dtest_suite_lmots.data2 # This test uses a fixed message, and then generates a private key, signs the
7 # This test uses a fixed message, and then generates a private key, signs the
12 # This test uses a NULL zero-length message, and then generates a private key,
20 # key is stored in data_files/lms_hsslms_sha256_m32_h5_lmots_sha256_n32_w8_prv.
21 # This test uses the same OTS key as the LMS hsslms interop test 1 (leaf 0 of
22 # the LMS key), and the same message.
24 # To produce another signature with this message and key (note that the actual
45 # key is stored in data_files/lms_hsslms_sha256_m32_h5_lmots_sha256_n32_w8_prv.
46 # This test uses the same OTS key as the LMS hsslms interop test 2 (leaf 1 of
47 # the LMS key), and the same message.
[all …]
Dtest_suite_psa_crypto_attributes.data1 PSA key attributes structure
5 PSA key attributes: id only
8 PSA key attributes: lifetime=3 only
11 PSA key attributes: id then back to volatile
14 PSA key attributes: id then back to non local volatile
17 PSA key attributes: id then lifetime
20 PSA key attributes: lifetime then id
23 PSA key attributes: non local volatile lifetime then id
26 PSA key attributes: slot number
Dtest_suite_psa_crypto.data55 PSA import AES: bad key size
59 PSA import/export RSA public key: good, 1024-bit
63 PSA import/export RSA public key: good, larger buffer (+1 byte)
67 PSA import/export RSA public key: good, larger buffer (*2-1)
71 PSA import/export RSA public key: good, larger buffer (*2)
75 PSA import/export RSA public key: good, larger buffer (*2+1)
79 PSA import/export RSA public key: export buffer too small
111 PSA import/export RSA public key: good, 1024-bit, opaque
115 PSA import/export RSA public key: good, larger buffer (+1 byte), opaque
119 PSA import/export RSA public key: good, larger buffer (*2-1), opaque
[all …]
Dtest_suite_psa_crypto_slot_management.function8 /**< Close key(s) */
11 /**< Destroy key(s) */
14 /**< Purge key(s) */
20 /**< Close key(s) then terminate and re-initialize */
23 /**< Destroy key(s) then terminate and re-initialize */
26 /**< Purge key(s) then terminate and re-initialize */
43 /** Apply \p invalidate_method to invalidate the specified key:
47 mbedtls_svc_key_id_t key)
50 /* Closing the key invalidate only volatile keys, not persistent ones. */
53 PSA_ASSERT(psa_close_key(key));
[all …]
Dtest_suite_lms.data2 # This test uses a fixed message, and then generates a private key, signs the
7 # This test uses a NULL zero-length message, and then generates a private key,
13 # limited amount of available test vectors for LMS. The private key is stored in
15 # uses leaf key 0, so must be the first signature generated by the key if the
18 # word at the start of the key/sig. We strip these 4 bytes from the signature
19 # and the public key before including them in a the test data.
21 # To produce another signature with this message and key (note that the actual
39 # The signature uses leaf key 1, so must be the second signature generated by
40 # the key if the signature is to be reproduced.
42 # To produce another signature with this message and key (note that the actual
[all …]
Dtest_suite_rsa.data37 # Bad padding after performing the public key operation
279 RSA Check empty private key
282 RSA Check Private key #1 (Correct)
285 RSA Check Private key #2 (No P)
288 RSA Check Private key #3 (No Q)
291 RSA Check Private key #4 (No N)
294 RSA Check Private key #5 (No E)
297 RSA Check Private key #6 (No D)
300 RSA Check Private key #7 (No DP)
304 RSA Check Private key #8 (No DQ)
[all …]
/openthread-latest/third_party/mbedtls/repo/docs/architecture/
Dmbed-crypto-storage-specification.md28 * [Persistent transparent keys](#key-file-format-for-0.1.0) designated by a [slot number](#key-name…
35 We do not make any promises regarding key storage, or regarding the nonvolatile random seed file on…
39key is stored in a dedicated file whose name is constructed from the key identifier. The way in wh…
41 The valid values for a key identifier are the range from 1 to 0xfffeffff. This limitation on the ra…
53 The layout of a key file is:
60 * key material length (4 bytes)
61 * key material: output of `psa_export_key`
75 … 1 through 0xfffeffff: [content](#key-file-format-for-0.1.0) of the [key whose identifier is the f…
83 …time configuration value `CRYPTO_STORAGE_FILE_LOCATION` allows storing the key files in a director…
86 …ATION "psa_key_slot_%lu", key_id)` [content](#key-file-format-for-0.1.0) of the [key whose identif…
[all …]
Dpsa-storage-resilience.md5key store. It is possible to create a persistent key and read it back later. This must work even i…
19key creation function in the PSA Crypto API reports to the application that a key has been created…
34key, all key management operations (creation or destruction) on persistent keys rely on a single c…
38 * [Key management for stateful secure element keys](#designing-key-management-for-secure-element-ke…
44 ## Designing key management for secure element keys
46key” to mean a key stored in a stateful secure element, i.e. a secure element that stores keys. Th…
50 **Assumption: driver calls for key management in stateful secure elements are atomic and committing…
56 For a secure element key, key management requires a commitment on both sites. For example, consider…
58 1. The core sends a request to the secure element to create a key.
59 2. The secure element modifies its key store to create the key.
[all …]
/openthread-latest/third_party/mbedtls/repo/include/psa/
Dcrypto.h134 mbedtls_svc_key_id_t key);
378 psa_status_t psa_get_key_attributes(mbedtls_svc_key_id_t key,
422 psa_status_t psa_purge_key(mbedtls_svc_key_id_t key);
567 psa_status_t psa_destroy_key(mbedtls_svc_key_id_t key);
649 mbedtls_svc_key_id_t *key);
741 psa_status_t psa_export_key(mbedtls_svc_key_id_t key,
816 psa_status_t psa_export_public_key(mbedtls_svc_key_id_t key,
1211 psa_status_t psa_mac_compute(mbedtls_svc_key_id_t key,
1252 psa_status_t psa_mac_verify(mbedtls_svc_key_id_t key,
1359 mbedtls_svc_key_id_t key,
[all …]
/openthread-latest/third_party/mbedtls/repo/programs/psa/
Dkey_ladder_demo.sh10 create a master key, derive a key from it and use that derived key to
18 if [ -e master.key ]; then
23 "$program" generate master=master.key
29 "$program" wrap master=master.key label=hello label=world \
34 "$program" unwrap master=master.key label=hello label=world \
41 …"$program" unwrap master=master.key input=hello_world.wrap output=hellow_orld.txt label=hellow lab…
45 "$program" save master=master.key label=hello \
46 input=hello_world.wrap output=hello.key
48 "$program" unwrap master=hello.key label=world \
Dcrypto_examples.c84 static psa_status_t cipher_encrypt(psa_key_id_t key, in cipher_encrypt() argument
100 status = psa_cipher_encrypt_setup(&operation, key, alg); in cipher_encrypt()
115 static psa_status_t cipher_decrypt(psa_key_id_t key, in cipher_decrypt() argument
130 status = psa_cipher_decrypt_setup(&operation, key, alg); in cipher_decrypt()
157 psa_key_id_t key = 0; in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block() local
173 status = psa_generate_key(&attributes, &key); in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block()
176 status = cipher_encrypt(key, alg, iv, sizeof(iv), in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block()
181 status = cipher_decrypt(key, alg, iv, sizeof(iv), in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block()
190 psa_destroy_key(key); in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block()
207 psa_key_id_t key = 0; in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi() local
[all …]
/openthread-latest/third_party/mbedtls/repo/include/mbedtls/
Ddes.h125 void mbedtls_des_key_set_parity(unsigned char key[MBEDTLS_DES_KEY_SIZE]);
142 int mbedtls_des_key_check_key_parity(const unsigned char key[MBEDTLS_DES_KEY_SIZE]);
156 int mbedtls_des_key_check_weak(const unsigned char key[MBEDTLS_DES_KEY_SIZE]);
171 int mbedtls_des_setkey_enc(mbedtls_des_context *ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE]);
186 int mbedtls_des_setkey_dec(mbedtls_des_context *ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE]);
202 const unsigned char key[MBEDTLS_DES_KEY_SIZE * 2]);
218 const unsigned char key[MBEDTLS_DES_KEY_SIZE * 2]);
234 const unsigned char key[MBEDTLS_DES_KEY_SIZE * 3]);
250 const unsigned char key[MBEDTLS_DES_KEY_SIZE * 3]);
367 const unsigned char key[MBEDTLS_DES_KEY_SIZE]);
/openthread-latest/third_party/mbedtls/repo/tests/src/
Dpsa_exercise_key.c41 static int check_key_attributes_sanity(mbedtls_svc_key_id_t key, in check_key_attributes_sanity() argument
50 psa_status_t status = psa_get_key_attributes(key, &attributes); in check_key_attributes_sanity()
120 static int exercise_mac_key(mbedtls_svc_key_id_t key, in exercise_mac_key() argument
136 status = psa_mac_sign_setup(&operation, key, alg); in exercise_mac_key()
155 status = psa_mac_verify_setup(&operation, key, alg); in exercise_mac_key()
175 static int exercise_cipher_key(mbedtls_svc_key_id_t key, in exercise_cipher_key() argument
192 PSA_ASSERT(psa_get_key_attributes(key, &attributes)); in exercise_cipher_key()
197 status = psa_cipher_encrypt_setup(&operation, key, alg); in exercise_cipher_key()
225 status = psa_cipher_decrypt_setup(&operation, key, alg); in exercise_cipher_key()
263 static int exercise_aead_key(mbedtls_svc_key_id_t key, in exercise_aead_key() argument
[all …]
Dpsa_crypto_stubs.c25 psa_status_t psa_export_key(mbedtls_svc_key_id_t key, in psa_export_key() argument
30 (void) key; in psa_export_key()
37 psa_status_t psa_export_public_key(mbedtls_svc_key_id_t key, in psa_export_public_key() argument
42 (void) key; in psa_export_public_key()
49 psa_status_t psa_get_key_attributes(mbedtls_svc_key_id_t key, in psa_get_key_attributes() argument
52 (void) key; in psa_get_key_attributes()
66 mbedtls_svc_key_id_t *key) in psa_import_key() argument
71 (void) key; in psa_import_key()
/openthread-latest/third_party/mbedtls/repo/docs/proposed/
Dpsa-driver-interface.md16 … of a **core** and zero or more **drivers**. The core handles key management, enforces key usage p…
24 …lable for a particular combination of parameters (cryptographic algorithm, key type and size, etc.…
25 …oked for the specific [key location](#lifetimes-and-locations) that the driver is registered for: …
35 …ap keys with a built-in keys but not store user keys; and cryptoprocessors that store key material.
82 …atory for opaque drivers): information about the [representation of keys](#key-format-for-opaque-d…
90 … certain class of cryptographic mechanisms. The capability specifies which key types and algorithm…
96key type specification](#key-type-specifications). If specified, the core will invoke this capabil…
97 … involving a key with one of the specified key sizes. If omitted, the core will invoke this capabi…
111 * If the mechanism involves a key:
112 …* either the key is transparent (its location is `PSA_KEY_LOCATION_LOCAL_STORAGE`) and the driver …
[all …]
/openthread-latest/third_party/mbedtls/repo/programs/pkey/
Dkey_app_writer.c92 static int write_public_key(mbedtls_pk_context *key, const char *output_file) in write_public_key() argument
104 if ((ret = mbedtls_pk_write_pubkey_pem(key, output_buf, 16000)) != 0) { in write_public_key()
112 if ((ret = mbedtls_pk_write_pubkey_der(key, output_buf, 16000)) < 0) { in write_public_key()
134 static int write_private_key(mbedtls_pk_context *key, const char *output_file) in write_private_key() argument
146 if ((ret = mbedtls_pk_write_key_pem(key, output_buf, 16000)) != 0) { in write_private_key()
154 if ((ret = mbedtls_pk_write_key_der(key, output_buf, 16000)) < 0) { in write_private_key()
255 mbedtls_pk_context key; in main() local
266 mbedtls_pk_init(&key); in main()
366 ret = mbedtls_pk_parse_keyfile(&key, opt.filename, NULL, in main()
382 if (mbedtls_pk_get_type(&key) == MBEDTLS_PK_RSA) { in main()
[all …]
/openthread-latest/third_party/mbedtls/repo/docs/
Dpsa-transition.md35 * Mbed TLS legacy APIs require key material to be present in the application memory. The PSA Crypto…
80 Apart from keys, as described in “[Key management](#key-management)” below, APIs that need to prese…
88key take a parameter of type [`psa_key_id_t`](https://mbed-tls.readthedocs.io/projects/api/en/deve…
90 To use a key:
92key object with a key creation function. The two most common ones are [`psa_import_key`](https://m…
93 2. Use the key as desired, passing the key identifier obtained during the key creation.
94 3. Finally destroy the key object with [`psa_destroy_key`](https://mbed-tls.readthedocs.io/projects…
96key management](#cipher-key-management)”, “[MAC key management](#mac-key-management)”, “[Key lifec…
98key material, call [`psa_export_key`](https://mbed-tls.readthedocs.io/projects/api/en/development/…
100 Note that a key consumes a key store entry, which is distinct from heap memory, until it is destroy…
[all …]

12345678910>>...13