Home
last modified time | relevance | path

Searched full:counter (Results 1 – 25 of 44) sorted by relevance

12

/mcuboot-latest/boot/cypress/platforms/PSOC_062_2M/CM4/GCC_ARM/
Dstartup_psoc6_02_cm4.S114 .long srss_interrupt_mcwdt_0_IRQHandler /* Multi Counter Watchdog Timer interrupt */
115 .long srss_interrupt_mcwdt_1_IRQHandler /* Multi Counter Watchdog Timer interrupt */
218 .long tcpwm_0_interrupts_0_IRQHandler /* TCPWM #0, Counter #0 */
219 .long tcpwm_0_interrupts_1_IRQHandler /* TCPWM #0, Counter #1 */
220 .long tcpwm_0_interrupts_2_IRQHandler /* TCPWM #0, Counter #2 */
221 .long tcpwm_0_interrupts_3_IRQHandler /* TCPWM #0, Counter #3 */
222 .long tcpwm_0_interrupts_4_IRQHandler /* TCPWM #0, Counter #4 */
223 .long tcpwm_0_interrupts_5_IRQHandler /* TCPWM #0, Counter #5 */
224 .long tcpwm_0_interrupts_6_IRQHandler /* TCPWM #0, Counter #6 */
225 .long tcpwm_0_interrupts_7_IRQHandler /* TCPWM #0, Counter #7 */
[all …]
/mcuboot-latest/boot/bootutil/include/bootutil/
Dsecurity_cnt.h16 * When a counter incrementation was interrupted it must be able to
19 * (every counter incrementation operation has finished), from that point
22 * @note A security counter might be implemented using non-volatile OTP memory
24 * code to map each possible security counter values onto the fuse bits
25 * as the direct usage of counter values can be costly / impractical.
43 * Reads the stored value of a given image's security counter.
46 * @param security_cnt Pointer to store the security counter value.
53 * Updates the stored value of a given image's security counter with a new
54 * security counter value if the new one is greater.
57 * @param img_security_cnt New security counter value. The new value must be
[all …]
Dfault_injection_hardening.h29 * FIH_ENABLE_CFI (Control Flow Integrity) creates a global counter that is
31 * return the counter is decremented, and after the return it is verified that
32 * the counter has the same value as before this process. This can be used to
53 * as otherwise the CFI counter will not be decremented and the CFI check will
291 * counter and saves it to a local variable, and then increments the counter.
296 * which will decrement the counter.
298 * The postcall step gets the value of the counter and compares it to the
347 * CFI precall function saves the CFI counter and then increments it - the
348 * postcall then checks if the counter is equal to the saved value. In order for
350 * function in order to decrement the counter, so the function must have been
/mcuboot-latest/sim/mcuboot-sys/csupport/
Dsecurity_cnt.c13 * the storage area where the security counter values reside
27 uint32_t counter = 0; in boot_nv_security_counter_get() local
29 fih_rc = fih_ret_encode_zero_equality(sim_get_nv_counter_for_image(image_id, &counter)); in boot_nv_security_counter_get()
31 MCUBOOT_LOG_INF("Read security counter value (%d) for image: %d\n", counter, image_id); in boot_nv_security_counter_get()
32 *security_cnt = fih_int_encode(counter); in boot_nv_security_counter_get()
38 …MCUBOOT_LOG_INF("Writing security counter value (%d) for image: %d\n", img_security_cnt, image_id); in boot_nv_security_counter_update()
/mcuboot-latest/boot/bootutil/include/bootutil/crypto/
Daes_ctr.h64 static inline int bootutil_aes_ctr_encrypt(bootutil_aes_ctr_context *ctx, uint8_t *counter, const u… in bootutil_aes_ctr_encrypt() argument
67 return mbedtls_aes_crypt_ctr(ctx, mlen, &blk_off, counter, stream_block, m, c); in bootutil_aes_ctr_encrypt()
70 static inline int bootutil_aes_ctr_decrypt(bootutil_aes_ctr_context *ctx, uint8_t *counter, const u… in bootutil_aes_ctr_decrypt() argument
73 return mbedtls_aes_crypt_ctr(ctx, clen, &blk_off, counter, stream_block, c, m); in bootutil_aes_ctr_decrypt()
99 static int _bootutil_aes_ctr_crypt(bootutil_aes_ctr_context *ctx, uint8_t *counter, const uint8_t *… in _bootutil_aes_ctr_crypt() argument
102 rc = tc_ctr_mode(out, inlen, in, inlen, counter, &blk_off, ctx); in _bootutil_aes_ctr_crypt()
109 static inline int bootutil_aes_ctr_encrypt(bootutil_aes_ctr_context *ctx, uint8_t *counter, const u… in bootutil_aes_ctr_encrypt() argument
111 return _bootutil_aes_ctr_crypt(ctx, counter, m, mlen, blk_off, c); in bootutil_aes_ctr_encrypt()
114 static inline int bootutil_aes_ctr_decrypt(bootutil_aes_ctr_context *ctx, uint8_t *counter, const u… in bootutil_aes_ctr_decrypt() argument
116 return _bootutil_aes_ctr_crypt(ctx, counter, c, clen, blk_off, m); in bootutil_aes_ctr_decrypt()
/mcuboot-latest/ext/tinycrypt/lib/include/tinycrypt/
Dctr_mode.h37 * Overview: CTR (pronounced "counter") mode is a NIST approved mode of
42 * Security: CTR mode achieves confidentiality only if the counter value is
43 * never reused with a same encryption key. If the counter is
46 * A usual method to ensure different counter values refers to
47 * initialize the counter in a given value (0, for example) and
50 * enciphered using a same key: q < 2^(counter size).
52 * TinyCrypt uses a counter of 32 bits. This means that after 2^32
53 * block encryptions, the counter will be reused (thus losing CBC
92 * - ctr is an integer counter in littleEndian format
98 * @param ctr IN/OUT -- the current counter value
Dccm_mode.h37 * Overview: CCM (for "Counter with CBC-MAC") mode is a NIST approved mode of
137 * b = [FLAGS | nonce | counter ], where:
140 * counter is 2 bytes long
183 * b = [FLAGS | nonce | counter ], where:
186 * counter is 2 bytes long
/mcuboot-latest/boot/bootutil/src/
Dimage_validate.c296 * Reads the value of an image's security counter.
301 * @param security_cnt Pointer to store the security counter value.
322 /* The security counter TLV is in the protected part of the TLV area. */ in bootutil_get_img_security_cnt()
333 * the security counter TLV. in bootutil_get_img_security_cnt()
338 /* Security counter TLV has not been found. */ in bootutil_get_img_security_cnt()
343 /* Security counter is not valid. */ in bootutil_get_img_security_cnt()
539 * Verify the image's security counter. in bootutil_img_validate()
543 /* Security counter is not valid. */ in bootutil_img_validate()
560 /* Compare the new image's security counter value against the in bootutil_img_validate()
561 * stored security counter value. in bootutil_img_validate()
[all …]
Dfault_injection_hardening.c29 /* Increment the CFI counter by one, and return the value before the increment.
39 * counter. For this to be the case, a fih_ret must have been called between
49 /* Decrement the global CFI counter by one, so that it has the same value as
Dimage_rsa.c82 * byte of the counter.
90 uint8_t counter[4] = { 0, 0, 0, 0 }; in pss_mgf1() local
98 bootutil_sha_update(&ctx, counter, 4); in pss_mgf1()
101 counter[3]++; in pss_mgf1()
Dencrypted.c249 uint8_t counter; in hkdf() local
286 counter = 1; in hkdf()
288 for (off = 0; len > 0; off += BOOTUTIL_CRYPTO_SHA256_DIGEST_SIZE, ++counter) { in hkdf()
310 rc = bootutil_hmac_sha256_update(&hmac, &counter, 1); in hkdf()
456 uint8_t counter[BOOTUTIL_CRYPTO_AES_CTR_BLOCK_SIZE]; in boot_decrypt_key() local
615 memset(counter, 0, BOOTUTIL_CRYPTO_AES_CTR_BLOCK_SIZE); in boot_decrypt_key()
616 …rc = bootutil_aes_ctr_decrypt(&aes_ctr, counter, &buf[EC_CIPHERKEY_INDEX], BOOTUTIL_CRYPTO_AES_CTR… in boot_decrypt_key()
Dloader.c821 * Validate image hash/signature and optionally the security counter in a slot.
1168 * Updates the stored security counter value with the image's security counter
1173 * counter to update.
1542 /* Update the stored security counter with the new image's security counter
1550 BOOT_LOG_ERR("Security counter update failed after image upgrade.");
1777 /* Update the stored security counter with the new image's security
1778 * counter value. The primary slot holds the new image at this point,
1784 * counter must be increased right after the image upgrade.
1791 BOOT_LOG_ERR("Security counter update failed after "
2099 * Updates the security counter for the current image.
[all …]
/mcuboot-latest/ci/fih_test_docker/
Dutils.py38 test_stats = collections.Counter()
39 failed_boot_last_lines = collections.Counter()
40 exec_fail_reasons = collections.Counter()
/mcuboot-latest/ext/tinycrypt/lib/source/
Dccm_mode.c89 * mode (the counter is increased before encryption, instead of after
90 * encryption). Besides, it is assumed that the counter is stored in the last
113 /* copy the counter to the nonce */ in ccm_ctr_mode()
131 /* update the counter */ in ccm_ctr_mode()
186 b[14] = b[15] = TC_ZERO_BYTE; /* restoring initial counter for ctr_mode (0):*/ in tc_ccm_generation_encryption()
226 b[14] = b[15] = TC_ZERO_BYTE; /* initial counter value is 0 */ in tc_ccm_decryption_verification()
231 b[14] = b[15] = TC_ZERO_BYTE; /* restoring initial counter value (0) */ in tc_ccm_decryption_verification()
/mcuboot-latest/boot/mynewt/mcuboot_config/
Dsyscfg.yml90 security counter is used for version eligibility check instead of pure
92 equal security counter value.
111 set, any upgrade must have greater or equal security counter value.
/mcuboot-latest/sim/mcuboot-sys/src/
Dc.rs72 counter: Option<&mut i32>, image_index: Option<i32>, in boot_go()
80 flash_counter: match counter { in boot_go()
105 if let Some(c) = counter { in boot_go()
/mcuboot-latest/docs/
Dimgtool.md66 -s, --security-counter TEXT Specify the value of security counter. Use
DPORTING.md174counter of the number of times a given flash area has been opened by MCUboot. The `flash_area_clos…
/mcuboot-latest/boot/espressif/port/esp32s2/
Dbootloader.conf18 # counter (defined using imgtool) instead of only image version
/mcuboot-latest/sim/src/
Dimage.rs408 …/// If security_cnt is None then do not add a security counter TLV, otherwise add the specified va…
1336 // set the "stored" security counter to a fixed value. in run_hw_rollback_prot()
1347 warn!("Counter was changed when it did not suppose to!"); in run_hw_rollback_prot()
1423 let mut counter = stop.unwrap_or(0); in try_upgrade() localVariable
1427 Some(&mut counter), in try_upgrade()
1430 x if x.success() => (false, -counter), in try_upgrade()
1434 counter = 0; in try_upgrade()
1437 match c::boot_go(&mut flash, &self.areadesc, Some(&mut counter), in try_upgrade()
1445 (flash, count - counter) in try_upgrade()
1463 let mut counter = stop; in try_revert_with_fail_at() localVariable
[all …]
/mcuboot-latest/boot/espressif/port/esp32c2/
Dbootloader.conf18 # counter (defined using imgtool) instead of only image version
/mcuboot-latest/boot/espressif/port/esp32c3/
Dbootloader.conf18 # counter (defined using imgtool) instead of only image version
/mcuboot-latest/boot/espressif/port/esp32c6/
Dbootloader.conf18 # counter (defined using imgtool) instead of only image version
/mcuboot-latest/boot/espressif/port/esp32h2/
Dbootloader.conf18 # counter (defined using imgtool) instead of only image version
/mcuboot-latest/boot/zephyr/
DKconfig714 bool "Use image security counter instead of version number"
718 Security counter is used for version eligibility check instead of pure
720 equal security counter value.
728 set, any upgrade must have greater or equal security counter value.

12