Lines Matching refs:nonce
695 uint8_t nonce[16]; in boot_enc_encrypt() local
702 memset(nonce, 0, 12); in boot_enc_encrypt()
704 nonce[12] = (uint8_t)(off >> 24); in boot_enc_encrypt()
705 nonce[13] = (uint8_t)(off >> 16); in boot_enc_encrypt()
706 nonce[14] = (uint8_t)(off >> 8); in boot_enc_encrypt()
707 nonce[15] = (uint8_t)off; in boot_enc_encrypt()
710 bootutil_aes_ctr_encrypt(&enc->aes_ctr, nonce, buf, sz, blk_off, buf); in boot_enc_encrypt()
718 uint8_t nonce[16]; in boot_enc_decrypt() local
725 memset(nonce, 0, 12); in boot_enc_decrypt()
727 nonce[12] = (uint8_t)(off >> 24); in boot_enc_decrypt()
728 nonce[13] = (uint8_t)(off >> 16); in boot_enc_decrypt()
729 nonce[14] = (uint8_t)(off >> 8); in boot_enc_decrypt()
730 nonce[15] = (uint8_t)off; in boot_enc_decrypt()
733 bootutil_aes_ctr_decrypt(&enc->aes_ctr, nonce, buf, sz, blk_off, buf); in boot_enc_decrypt()