/mcuboot-3.4.0/ext/tinycrypt/tests/ |
D | test_sha256.c | 55 unsigned int result = TC_PASS; in test_1() local 70 result = check_result(1, expected, sizeof(expected), in test_1() 72 TC_END_RESULT(result); in test_1() 73 return result; in test_1() 81 unsigned int result = TC_PASS; in test_2() local 96 result = check_result(2, expected, sizeof(expected), in test_2() 98 TC_END_RESULT(result); in test_2() 99 return result; in test_2() 104 unsigned int result = TC_PASS; in test_3() local 119 result = check_result(3, expected, sizeof(expected), in test_3() [all …]
|
D | test_hmac.c | 56 unsigned int result = TC_PASS; in do_hmac_test() local 61 result = check_result(testnum, expected, expectedlen, in do_hmac_test() 63 return result; in do_hmac_test() 71 unsigned int result = TC_PASS; in test_1() local 91 result = do_hmac_test(&h, 1, data, sizeof(data),expected, in test_1() 93 TC_END_RESULT(result); in test_1() 94 return result; in test_1() 99 unsigned int result = TC_PASS; in test_2() local 119 result = do_hmac_test(&h, 2, data, sizeof(data), expected, in test_2() 121 TC_END_RESULT(result); in test_2() [all …]
|
D | test_aes.c | 69 int result = TC_PASS; in test_1() local 96 result = TC_FAIL; in test_1() 100 result = check_result(1, expected.words, sizeof(expected.words), s.words, in test_1() 104 TC_END_RESULT(result); in test_1() 105 return result; in test_1() 113 int result = TC_PASS; in test_2() local 135 result = TC_FAIL; in test_2() 139 result = check_result(2, expected, sizeof(expected), ciphertext, in test_2() 143 TC_END_RESULT(result); in test_2() 145 return result; in test_2() [all …]
|
D | test_ccm_mode.c | 77 int result = TC_PASS; in do_test() local 86 result = tc_ccm_config(&c, &sched, nonce, nlen, mlen); in do_test() 87 if (result == 0) { in do_test() 90 result = TC_FAIL; in do_test() 94 result = tc_ccm_generation_encryption(ciphertext, TC_CCM_MAX_CT_SIZE, hdr, in do_test() 96 if (result == 0) { in do_test() 99 result = TC_FAIL; in do_test() 110 result = TC_FAIL; in do_test() 114 result = tc_ccm_decryption_verification(decrypted, TC_CCM_MAX_PT_SIZE, hdr, in do_test() 116 if (result == 0) { in do_test() [all …]
|
D | test_ecc_dh.c | 78 unsigned int result = TC_PASS; in ecdh_vectors() local 103 result = TC_FAIL; in ecdh_vectors() 104 return result;; in ecdh_vectors() 109 result = check_ecc_result(i, "Z", exp_z, z, NUM_ECC_WORDS, verbose); in ecdh_vectors() 110 if (result == TC_FAIL) { in ecdh_vectors() 111 return result; in ecdh_vectors() 114 return result; in ecdh_vectors() 119 unsigned int result = TC_PASS; in cavp_ecdh() local 238 result = ecdh_vectors(x, y, d, Z, 25, verbose); in cavp_ecdh() 239 if(result == TC_FAIL) { in cavp_ecdh() [all …]
|
D | test_ctr_mode.c | 83 unsigned int result = TC_PASS; in test_1_and_2() local 93 result = TC_FAIL; in test_1_and_2() 99 result = TC_FAIL; in test_1_and_2() 102 result = check_result(1, ciphertext, sizeof(out), out, sizeof(out)); in test_1_and_2() 103 TC_END_RESULT(result); in test_1_and_2() 111 result = TC_FAIL; in test_1_and_2() 117 result = TC_FAIL; in test_1_and_2() 120 result = check_result(2, plaintext, sizeof(plaintext), in test_1_and_2() 124 TC_END_RESULT(result); in test_1_and_2() 125 return result; in test_1_and_2() [all …]
|
D | test_cbc_mode.c | 112 int result = TC_PASS; in test_1_and_2() local 123 result = TC_FAIL; in test_1_and_2() 127 result = check_result(1, ciphertext, sizeof(encrypted), encrypted, in test_1_and_2() 129 TC_END_RESULT(result); in test_1_and_2() 141 result = TC_FAIL; in test_1_and_2() 145 result = check_result(2, plaintext, sizeof(decrypted), decrypted, in test_1_and_2() 149 TC_END_RESULT(result); in test_1_and_2() 150 return result; in test_1_and_2() 158 int result = TC_PASS; in main() local 163 result = test_1_and_2(); in main() [all …]
|
D | test_ctr_prng.c | 254 unsigned int result = TC_PASS; in executePRNG_TestVector() local 298 result = TC_FAIL; in executePRNG_TestVector() 310 return result; in executePRNG_TestVector() 315 int result = TC_PASS; in test_reseed() local 330 result = TC_FAIL; in test_reseed() 337 result = TC_FAIL; in test_reseed() 346 result = TC_FAIL; in test_reseed() 352 result = TC_FAIL; in test_reseed() 364 result = TC_FAIL; in test_reseed() 373 result = TC_FAIL; in test_reseed() [all …]
|
D | test_cmac_mode.c | 70 int result = TC_PASS; in verify_gf_2_128_double() local 114 TC_END_RESULT(result); in verify_gf_2_128_double() 115 return result; in verify_gf_2_128_double() 120 int result = TC_PASS; in verify_cmac_null_msg() local 141 TC_END_RESULT(result); in verify_cmac_null_msg() 142 return result; in verify_cmac_null_msg() 147 int result = TC_PASS; in verify_cmac_1_block_msg() local 173 TC_END_RESULT(result); in verify_cmac_1_block_msg() 174 return result; in verify_cmac_1_block_msg() 179 int result = TC_PASS; in verify_cmac_320_bit_msg() local [all …]
|
D | test_hmac_prng.c | 82 unsigned int result = TC_PASS; in main() local 102 result = TC_FAIL; in main() 105 TC_END_RESULT(result); in main() 111 result = TC_FAIL; in main() 115 TC_END_RESULT(result); in main() 120 result = TC_FAIL; in main() 123 TC_END_RESULT(result); in main() 133 TC_END_RESULT(result); in main() 134 TC_END_REPORT(result); in main()
|
D | test_ecc_dsa.c | 88 unsigned int result = TC_PASS; in sign_vectors() local 114 result = TC_FAIL; in sign_vectors() 136 result = TC_FAIL; in sign_vectors() 143 result = check_ecc_result(i, "sig.r", exp_r, sig, NUM_ECC_WORDS, verbose); in sign_vectors() 144 if(result == TC_FAIL) { in sign_vectors() 147 result = check_ecc_result(i, "sig.s", exp_s, sig + NUM_ECC_WORDS, NUM_ECC_WORDS, verbose); in sign_vectors() 148 if(result == TC_FAIL) { in sign_vectors() 154 TC_END_RESULT(result); in sign_vectors() 155 return result; in sign_vectors() 354 unsigned int result = TC_PASS; in vrfy_vectors() local [all …]
|
D | test_ecc_utils.c | 229 unsigned int result = TC_PASS; in keygen_vectors() local 257 result = check_ecc_result(i, "prv ", exp_prv, prv, NUM_ECC_WORDS, verbose); in keygen_vectors() 258 if (result == TC_FAIL) { in keygen_vectors() 259 return result; in keygen_vectors() 261 result = check_ecc_result(i, "pub.x", exp_pub, pub, NUM_ECC_WORDS, verbose); in keygen_vectors() 262 if (result == TC_FAIL) { in keygen_vectors() 263 return result; in keygen_vectors() 265 …result = check_ecc_result(i, "pub.y", exp_pub + NUM_ECC_WORDS, pub + NUM_ECC_WORDS, NUM_ECC_WORDS… in keygen_vectors() 266 if (result == TC_FAIL) { in keygen_vectors() 267 return result; in keygen_vectors() [all …]
|
/mcuboot-3.4.0/boot/zcbor/src/ |
D | zcbor_decode.c | 117 void *const result, uint_fast32_t result_len) in value_extract() argument 121 zcbor_assert_state(result != NULL, NULL); in value_extract() 126 uint8_t *u8_result = (uint8_t *)result; in value_extract() 132 memset(result, 0, result_len); in value_extract() 200 bool zcbor_int32_decode(zcbor_state_t *state, int32_t *result) argument 202 return zcbor_int_decode(state, result, sizeof(*result)); 206 bool zcbor_int64_decode(zcbor_state_t *state, int64_t *result) argument 208 return zcbor_int_decode(state, result, sizeof(*result)); 212 bool zcbor_uint32_decode(zcbor_state_t *state, uint32_t *result) argument 216 if (!value_extract(state, result, sizeof(*result))) { [all …]
|
D | zcbor_encode.c | 58 static uint_fast32_t get_encoded_len(const void *const result, uint_fast32_t result_len); 64 const void *const result, uint_fast32_t result_len) in value_encode_len() argument 66 uint8_t *u8_result = (uint8_t *)result; in value_encode_len() 67 uint_fast32_t encoded_len = get_encoded_len(result, result_len); in value_encode_len() 126 static uint_fast32_t get_encoded_len(const void *const result, uint_fast32_t result_len) argument 128 const uint8_t *u8_result = (const uint8_t *)result; 143 const void *const result = get_result(input, max_result_len, result_len); local 145 return value_encode_len(state, major_type, result, result_len); 326 bool zcbor_bstr_end_encode(zcbor_state_t *state, struct zcbor_string *result) argument 331 if (result == NULL) { [all …]
|
/mcuboot-3.4.0/boot/zcbor/include/ |
D | zcbor_decode.h | 43 bool zcbor_int32_decode(zcbor_state_t *state, int32_t *result); 44 bool zcbor_int64_decode(zcbor_state_t *state, int64_t *result); 45 bool zcbor_uint32_decode(zcbor_state_t *state, uint32_t *result); 46 bool zcbor_uint64_decode(zcbor_state_t *state, uint64_t *result); 47 bool zcbor_size_decode(zcbor_state_t *state, size_t *result); 60 bool zcbor_int32_expect(zcbor_state_t *state, int32_t result); 61 bool zcbor_int64_expect(zcbor_state_t *state, int64_t result); 62 bool zcbor_uint32_expect(zcbor_state_t *state, uint32_t result); 63 bool zcbor_uint64_expect(zcbor_state_t *state, uint64_t result); 64 bool zcbor_size_expect(zcbor_state_t *state, size_t result); [all …]
|
/mcuboot-3.4.0/ext/tinycrypt/tests/include/ |
D | test_utils.h | 69 #define TC_END(result, fmt, ...) PRINT_DATA(fmt, ##__VA_ARGS__) argument 72 #define TC_END_RESULT(result) \ argument 75 TC_END(result, "%s - %s.\n", \ 76 result == TC_PASS ? PASS : FAIL, __func__); \ 79 #define TC_END_REPORT(result) \ argument 82 TC_END(result, \ 84 result == TC_PASS ? "SUCCESSFUL" : "FAILED"); \ 111 unsigned int result = TC_PASS; in check_result() local 116 result = TC_FAIL; in check_result() 119 result = TC_FAIL; in check_result() [all …]
|
/mcuboot-3.4.0/boot/cypress/libs/retarget_io_pdl/ |
D | cy_retarget_io_pdl.c | 200 cy_rslt_t result = CY_RSLT_TYPE_ERROR; in cy_retarget_io_pdl_setbaud() local 208 result = (cy_rslt_t) Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_16_BIT, 0); in cy_retarget_io_pdl_setbaud() 212 if (result == CY_RSLT_SUCCESS) in cy_retarget_io_pdl_setbaud() 214 result = (cy_rslt_t) Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_16_BIT, 0u, divider); in cy_retarget_io_pdl_setbaud() 217 if (result == CY_RSLT_SUCCESS) in cy_retarget_io_pdl_setbaud() 219 result = Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_16_BIT, 0u); in cy_retarget_io_pdl_setbaud() 224 return result; in cy_retarget_io_pdl_setbaud() 229 cy_rslt_t result = CY_RSLT_TYPE_ERROR; in cy_retarget_io_pdl_init() local 231 result = (cy_rslt_t)Cy_SCB_UART_Init(CYBSP_UART_HW, &CYBSP_UART_config, &CYBSP_UART_context); in cy_retarget_io_pdl_init() 233 if (result == CY_RSLT_SUCCESS) in cy_retarget_io_pdl_init() [all …]
|
/mcuboot-3.4.0/boot/cypress/platforms/retarget_io_pdl/ |
D | cy_retarget_io_pdl.c | 200 cy_rslt_t result = CY_RSLT_TYPE_ERROR; in cy_retarget_io_pdl_setbaud() local 208 result = (cy_rslt_t) Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_16_BIT, 0); in cy_retarget_io_pdl_setbaud() 212 if (result == CY_RSLT_SUCCESS) in cy_retarget_io_pdl_setbaud() 214 result = (cy_rslt_t) Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_16_BIT, 0u, divider); in cy_retarget_io_pdl_setbaud() 217 if (result == CY_RSLT_SUCCESS) in cy_retarget_io_pdl_setbaud() 219 result = Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_16_BIT, 0u); in cy_retarget_io_pdl_setbaud() 224 return result; in cy_retarget_io_pdl_setbaud() 229 cy_rslt_t result = CY_RSLT_TYPE_ERROR; in cy_retarget_io_pdl_init() local 231 result = (cy_rslt_t)Cy_SCB_UART_Init(CYBSP_UART_HW, &CYBSP_UART_config, &CYBSP_UART_context); in cy_retarget_io_pdl_init() 233 if (result == CY_RSLT_SUCCESS) in cy_retarget_io_pdl_init() [all …]
|
/mcuboot-3.4.0/sim/src/ |
D | tlv.rs | 434 let mut result: Vec<u8> = vec![]; in make_tlv() localVariable 437 result.extend_from_slice(&protected_tlv); in make_tlv() 440 let npro_pos = result.len(); in make_tlv() 441 result.push(0x07); in make_tlv() 442 result.push(0x69); in make_tlv() 444 result.write_u16::<LittleEndian>(0).unwrap(); in make_tlv() 469 result.write_u16::<LittleEndian>(TlvKinds::SHA256 as u16).unwrap(); in make_tlv() 470 result.write_u16::<LittleEndian>(32).unwrap(); in make_tlv() 471 result.extend_from_slice(hash); in make_tlv() 500 result.write_u16::<LittleEndian>(TlvKinds::KEYHASH as u16).unwrap(); in make_tlv() [all …]
|
/mcuboot-3.4.0/ext/tinycrypt/lib/source/ |
D | ecc.c | 191 uECC_word_t uECC_vli_sub(uECC_word_t *result, const uECC_word_t *left, in uECC_vli_sub() argument 201 result[i] = diff; in uECC_vli_sub() 208 static uECC_word_t uECC_vli_add(uECC_word_t *result, const uECC_word_t *left, in uECC_vli_add() argument 217 result[i] = sum; in uECC_vli_add() 259 static void uECC_vli_mult(uECC_word_t *result, const uECC_word_t *left, in uECC_vli_mult() argument 275 result[k] = r0; in uECC_vli_mult() 286 result[k] = r0; in uECC_vli_mult() 291 result[num_words * 2 - 1] = r0; in uECC_vli_mult() 294 void uECC_vli_modAdd(uECC_word_t *result, const uECC_word_t *left, in uECC_vli_modAdd() argument 298 uECC_word_t carry = uECC_vli_add(result, left, right, num_words); in uECC_vli_modAdd() [all …]
|
D | ctr_prng.c | 123 int result = TC_CRYPTO_FAIL; in tc_ctr_prng_init() local 159 result = TC_CRYPTO_SUCCESS; in tc_ctr_prng_init() 161 return result; in tc_ctr_prng_init() 171 int result = TC_CRYPTO_FAIL; in tc_ctr_prng_reseed() local 200 result = TC_CRYPTO_SUCCESS; in tc_ctr_prng_reseed() 202 return result; in tc_ctr_prng_reseed() 217 unsigned int result = TC_CRYPTO_FAIL; in tc_ctr_prng_generate() local 222 result = TC_CTR_PRNG_RESEED_REQ; in tc_ctr_prng_generate() 265 result = TC_CRYPTO_SUCCESS; in tc_ctr_prng_generate() 269 return result; in tc_ctr_prng_generate()
|
D | utils.c | 68 uint8_t result = 0; in _compare() local 71 result |= tempa[i] ^ tempb[i]; in _compare() 73 return result; in _compare()
|
/mcuboot-3.4.0/ext/tinycrypt/lib/include/tinycrypt/ |
D | ecc.h | 122 void (*x_side)(uECC_word_t *result, const uECC_word_t *x, uECC_Curve curve); 123 void (*mmod_fast)(uECC_word_t *result, uECC_word_t *product); 142 void x_side_default(uECC_word_t *result, const uECC_word_t *x, 151 void vli_mmod_fast_secp256r1(unsigned int *result, unsigned int *product); 276 uECC_word_t EccPoint_compute_public_key(uECC_word_t *result, 302 void EccPoint_mult(uECC_word_t * result, const uECC_word_t * point, 353 void uECC_vli_modSub(uECC_word_t *result, const uECC_word_t *left, 398 void uECC_vli_mmod(uECC_word_t *result, uECC_word_t *product, 408 void uECC_vli_modMult_fast(uECC_word_t *result, const uECC_word_t *left, 420 uECC_word_t uECC_vli_sub(uECC_word_t *result, const uECC_word_t *left, [all …]
|
/mcuboot-3.4.0/sim/mcuboot-sys/src/ |
D | c.rs | 21 result: i32, 36 matches!(self, BootGoResult::Normal { result: 0, .. }) in success() 42 result: 0, in success_no_asserts() 87 let result: i32 = unsafe { in boot_go() localVariable 105 if result == -0x13579 { in boot_go() 108 BootGoResult::Normal { result, asserts, resp: rsp } in boot_go()
|
/mcuboot-3.4.0/scripts/imgtool/ |
D | version.py | 39 result = SemiSemVersion( 44 return result
|