Home
last modified time | relevance | path

Searched refs:plaintext (Results 1 – 23 of 23) sorted by relevance

/Zephyr-latest/tests/crypto/tinycrypt/src/
Dctr_mode.c67 const uint8_t plaintext[64] = { in test_ctr_sp_800_38a_encrypt_decrypt() local
107 sizeof(plaintext), plaintext, sizeof(plaintext), in test_ctr_sp_800_38a_encrypt_decrypt()
122 result = check_result(2, plaintext, sizeof(plaintext), in test_ctr_sp_800_38a_encrypt_decrypt()
123 decrypted, sizeof(plaintext), 1); in test_ctr_sp_800_38a_encrypt_decrypt()
Dcbc_mode.c82 const uint8_t plaintext[64] = { variable
125 sizeof(plaintext) + TC_AES_BLOCK_SIZE, in ZTEST()
126 plaintext, sizeof(plaintext), iv_buffer, &a), in ZTEST()
144 result = check_result(2, plaintext, sizeof(decrypted), in ZTEST()
Daes.c1098 const uint8_t plaintext[NUM_OF_NIST_KEYS] = { in var_key_test() local
1107 (void)tc_aes_encrypt(ciphertext, plaintext, &s); in var_key_test()
/Zephyr-latest/tests/bluetooth/host/crypto/bt_encrypt_be/src/
Dtest_suite_invalid_inputs.c29 const uint8_t plaintext[16] = {0}; in ZTEST() local
33 bt_encrypt_le(NULL, plaintext, enc_data); in ZTEST()
68 const uint8_t plaintext[16] = {0}; in ZTEST() local
71 bt_encrypt_le(key, plaintext, NULL); in ZTEST()
87 const uint8_t plaintext[16] = {0}; in ZTEST() local
92 err = bt_encrypt_le(key, plaintext, enc_data); in ZTEST()
111 const uint8_t plaintext[16] = {0}; in ZTEST() local
117 err = bt_encrypt_le(key, plaintext, enc_data); in ZTEST()
Dmain.c41 const uint8_t plaintext[16] = {0}; in ZTEST() local
47 err = bt_encrypt_be(key, plaintext, enc_data); in ZTEST()
/Zephyr-latest/tests/bluetooth/host/crypto/bt_encrypt_le/src/
Dtest_suite_invalid_inputs.c29 const uint8_t plaintext[16] = {0}; in ZTEST() local
33 bt_encrypt_le(NULL, plaintext, enc_data); in ZTEST()
68 const uint8_t plaintext[16] = {0}; in ZTEST() local
71 bt_encrypt_le(key, plaintext, NULL); in ZTEST()
87 const uint8_t plaintext[16] = {0}; in ZTEST() local
92 err = bt_encrypt_le(key, plaintext, enc_data); in ZTEST()
111 const uint8_t plaintext[16] = {0}; in ZTEST() local
117 err = bt_encrypt_le(key, plaintext, enc_data); in ZTEST()
Dmain.c41 const uint8_t plaintext[16] = {0}; in ZTEST() local
47 err = bt_encrypt_le(key, plaintext, enc_data); in ZTEST()
/Zephyr-latest/samples/psa/persistent_key/src/
Dmain.c53 static uint8_t plaintext[] = in use_persistent_key() local
56 sizeof(plaintext))]; in use_persistent_key()
57 static uint8_t decrypted_text[sizeof(plaintext)]; in use_persistent_key()
59 ret = psa_cipher_encrypt(SAMPLE_KEY_ID, SAMPLE_ALG, plaintext, sizeof(plaintext), in use_persistent_key()
72 __ASSERT_NO_MSG(decrypted_text_len == sizeof(plaintext)); in use_persistent_key()
75 if (memcmp(plaintext, decrypted_text, sizeof(plaintext))) { in use_persistent_key()
76 LOG_HEXDUMP_INF(plaintext, sizeof(plaintext), "Plaintext:"); in use_persistent_key()
/Zephyr-latest/subsys/bluetooth/controller/crypto/
Dcrypto.c23 int bt_encrypt_le(const uint8_t key[16], const uint8_t plaintext[16], in bt_encrypt_le()
27 LOG_DBG("plaintext %s", bt_hex(plaintext, 16)); in bt_encrypt_le()
29 ecb_encrypt(key, plaintext, enc_data, NULL); in bt_encrypt_le()
36 int bt_encrypt_be(const uint8_t key[16], const uint8_t plaintext[16], in bt_encrypt_be()
40 LOG_DBG("plaintext %s", bt_hex(plaintext, 16)); in bt_encrypt_be()
42 ecb_encrypt_be(key, plaintext, enc_data); in bt_encrypt_be()
/Zephyr-latest/subsys/bluetooth/host/
Dcrypto_psa.c60 int bt_encrypt_le(const uint8_t key[16], const uint8_t plaintext[16], in bt_encrypt_le()
69 CHECKIF(key == NULL || plaintext == NULL || enc_data == NULL) { in bt_encrypt_le()
74 LOG_DBG("plaintext %s", bt_hex(plaintext, 16)); in bt_encrypt_le()
87 sys_memcpy_swap(tmp, plaintext, 16); in bt_encrypt_le()
111 int bt_encrypt_be(const uint8_t key[16], const uint8_t plaintext[16], in bt_encrypt_be()
119 CHECKIF(key == NULL || plaintext == NULL || enc_data == NULL) { in bt_encrypt_be()
124 LOG_DBG("plaintext %s", bt_hex(plaintext, 16)); in bt_encrypt_be()
136 plaintext, 16, enc_data, 16, &out_len); in bt_encrypt_be()
Daes_ccm.c193 size_t aad_len, uint8_t *plaintext, size_t mic_size) in bt_ccm_decrypt() argument
201 ccm_crypt(key, nonce, enc_data, plaintext, len); in bt_ccm_decrypt()
203 ccm_auth(key, nonce, plaintext, len, aad, aad_len, mic, mic_size); in bt_ccm_decrypt()
213 const uint8_t *plaintext, size_t len, const uint8_t *aad, in bt_ccm_encrypt() argument
220 LOG_DBG("msg (len %zu) %s", len, bt_hex(plaintext, len)); in bt_ccm_encrypt()
228 ccm_auth(key, nonce, plaintext, len, aad, aad_len, mic, mic_size); in bt_ccm_encrypt()
230 ccm_crypt(key, nonce, plaintext, enc_data, len); in bt_ccm_encrypt()
/Zephyr-latest/include/zephyr/bluetooth/
Dcrypto.h53 int bt_encrypt_le(const uint8_t key[16], const uint8_t plaintext[16],
68 int bt_encrypt_be(const uint8_t key[16], const uint8_t plaintext[16],
94 uint8_t *plaintext, size_t mic_size);
117 const uint8_t *plaintext, size_t len, const uint8_t *aad,
Dhci_types.h1212 uint8_t plaintext[16]; member
/Zephyr-latest/tests/subsys/secure_storage/psa/crypto/src/
Dmain.c101 static uint8_t plaintext[1024]; in ZTEST() local
102 static uint8_t ciphertext[PSA_CIPHER_ENCRYPT_OUTPUT_SIZE(KEY_TYPE, ALG, sizeof(plaintext))]; in ZTEST()
103 static uint8_t decrypted_text[sizeof(plaintext)]; in ZTEST()
106 fill_data(plaintext, sizeof(plaintext)); in ZTEST()
107 ret = psa_cipher_encrypt(ID, ALG, plaintext, sizeof(plaintext), in ZTEST()
117 zassert_equal(output_length, sizeof(plaintext)); in ZTEST()
118 zassert_mem_equal(plaintext, decrypted_text, sizeof(plaintext)); in ZTEST()
/Zephyr-latest/subsys/bluetooth/mesh/
Dcrypto_tc.c36 int bt_mesh_encrypt(const struct bt_mesh_key *key, const uint8_t plaintext[16], in bt_mesh_encrypt()
39 return bt_encrypt_be(key->key, plaintext, enc_data); in bt_mesh_encrypt()
42 int bt_mesh_ccm_encrypt(const struct bt_mesh_key *key, uint8_t nonce[13], const uint8_t *plaintext, in bt_mesh_ccm_encrypt() argument
46 return bt_ccm_encrypt(key->key, nonce, plaintext, len, aad, aad_len, enc_data, mic_size); in bt_mesh_ccm_encrypt()
50 size_t len, const uint8_t *aad, size_t aad_len, uint8_t *plaintext, in bt_mesh_ccm_decrypt() argument
53 return bt_ccm_decrypt(key->key, nonce, enc_data, len, aad, aad_len, plaintext, mic_size); in bt_mesh_ccm_decrypt()
Dcrypto_psa.c60 int bt_mesh_encrypt(const struct bt_mesh_key *key, const uint8_t plaintext[16], in bt_mesh_encrypt()
68 plaintext, 16, in bt_mesh_encrypt()
80 const uint8_t *plaintext, size_t len, const uint8_t *aad, in bt_mesh_ccm_encrypt() argument
91 plaintext, len, in bt_mesh_ccm_encrypt()
104 size_t aad_len, uint8_t *plaintext, size_t mic_size) in bt_mesh_ccm_decrypt() argument
115 plaintext, len, in bt_mesh_ccm_decrypt()
Dcrypto.h23 int bt_mesh_encrypt(const struct bt_mesh_key *key, const uint8_t plaintext[16],
26 int bt_mesh_ccm_encrypt(const struct bt_mesh_key *key, uint8_t nonce[13], const uint8_t *plaintext,
31 size_t len, const uint8_t *aad, size_t aad_len, uint8_t *plaintext,
/Zephyr-latest/samples/drivers/crypto/src/
Dmain.c47 static uint8_t plaintext[64] __aligned(IO_ALIGNMENT_BYTES) = { variable
219 .in_buf = plaintext, in cbc_mode()
220 .in_len = sizeof(plaintext), in cbc_mode()
274 if (memcmp(decrypt.out_buf, plaintext, sizeof(plaintext))) { in cbc_mode()
277 print_buffer_comparison(plaintext, decrypt.out_buf, in cbc_mode()
278 sizeof(plaintext)); in cbc_mode()
310 .in_buf = plaintext, in ctr_mode()
311 .in_len = sizeof(plaintext), in ctr_mode()
363 if (memcmp(decrypt.out_buf, plaintext, sizeof(plaintext))) { in ctr_mode()
366 print_buffer_comparison(plaintext, in ctr_mode()
[all …]
/Zephyr-latest/subsys/bluetooth/common/
Drpa.c43 static int internal_encrypt_le(const uint8_t key[16], const uint8_t plaintext[16], in internal_encrypt_le()
48 ecb_encrypt(key, plaintext, enc_data, NULL); in internal_encrypt_le()
51 return bt_encrypt_le(key, plaintext, enc_data); in internal_encrypt_le()
/Zephyr-latest/samples/boards/espressif/flash_encryption/
DREADME.rst10 Once this feature is enabled, firmware is flashed as plaintext and then the data is encrypted
88 Then, it dumps 32-bytes of the same memory area in plaintext mode. The content is encrypted, meaning
/Zephyr-latest/doc/services/smf/
Dindex.rst536 "smf_set_initial()" [shape=plaintext fontname=Courier];
/Zephyr-latest/subsys/bluetooth/controller/hci/
Dhci.c1490 ecb_encrypt(cmd->key, cmd->plaintext, enc_data, NULL); in le_encrypt()
/Zephyr-latest/doc/
Dzephyr.doxyfile.in2647 # around nodes set 'shape=plain' or 'shape=plaintext' <a