Searched refs:permutation_buf (Results 1 – 7 of 7) sorted by relevance
| /trusted-firmware-m-latest/platform/ext/accelerator/cc312/cc312-rom/ |
| D | cc3xx_stdlib.c | 79 static void fisher_yates_shuffle(uint8_t *permutation_buf, size_t len) in fisher_yates_shuffle() argument 93 temp_elem = permutation_buf[idx]; in fisher_yates_shuffle() 94 permutation_buf[idx] = permutation_buf[swap_idx]; in fisher_yates_shuffle() 95 permutation_buf[swap_idx] = temp_elem; in fisher_yates_shuffle() 100 void cc3xx_random_permutation_generate(uint8_t *permutation_buf, size_t len) in cc3xx_random_permutation_generate() argument 106 permutation_buf[idx] = idx; in cc3xx_random_permutation_generate() 110 fisher_yates_shuffle(permutation_buf, len); in cc3xx_random_permutation_generate() 130 uint8_t permutation_buf[word_count]; /* This is a VLA */ in cc3xx_dpa_hardened_word_copy() local 136 cc3xx_random_permutation_generate(permutation_buf, word_count); in cc3xx_dpa_hardened_word_copy() 139 dst[permutation_buf[idx]] = src[permutation_buf[idx]]; in cc3xx_dpa_hardened_word_copy()
|
| D | cc3xx_stdlib.h | 26 void cc3xx_random_permutation_generate(uint8_t *permutation_buf, size_t len);
|
| D | cc3xx_chacha.c | 308 uint8_t permutation_buf[tag_word_size]; in tag_cmp_or_copy() local 312 cc3xx_random_permutation_generate(permutation_buf, tag_word_size); in tag_cmp_or_copy() 315 are_different |= tag[permutation_buf[idx]] ^ calculated_tag[permutation_buf[idx]]; in tag_cmp_or_copy()
|
| D | cc3xx_aes.c | 931 uint8_t permutation_buf[tag_word_size]; in tag_cmp_or_copy() local 935 cc3xx_random_permutation_generate(permutation_buf, tag_word_size); in tag_cmp_or_copy() 938 are_different |= tag[permutation_buf[idx]] ^ calculated_tag[permutation_buf[idx]]; in tag_cmp_or_copy()
|
| /trusted-firmware-m-latest/platform/ext/target/arm/rse/common/ |
| D | dpa_hardened_word_copy.c | 83 static void fisher_yates_shuffle(uint8_t *permutation_buf, size_t len) in fisher_yates_shuffle() argument 97 temp_elem = permutation_buf[idx]; in fisher_yates_shuffle() 98 permutation_buf[idx] = permutation_buf[swap_idx]; in fisher_yates_shuffle() 99 permutation_buf[swap_idx] = temp_elem; in fisher_yates_shuffle() 106 uint8_t permutation_buf[word_count]; /* This is a VLA */ in dpa_hardened_word_copy() local 114 permutation_buf[idx] = idx; in dpa_hardened_word_copy() 117 fisher_yates_shuffle(permutation_buf, word_count); in dpa_hardened_word_copy() 120 dst[permutation_buf[idx]] = src[permutation_buf[idx]]; in dpa_hardened_word_copy()
|
| /trusted-firmware-m-latest/platform/ext/accelerator/cc312/cc312-rom/psa_driver_api/src/ |
| D | cc3xx_internal_cipher.c | 465 uint8_t permutation_buf[size_to_pre_process]; /* This is a VLA */ in cc3xx_internal_cipher_stream_pre_update() local 467 cc3xx_random_permutation_generate(permutation_buf, size_to_pre_process); in cc3xx_internal_cipher_stream_pre_update() 470 output[permutation_buf[idx]] = in cc3xx_internal_cipher_stream_pre_update() 471 stream->buf[stream->idx + permutation_buf[idx]] ^ input[permutation_buf[idx]]; in cc3xx_internal_cipher_stream_pre_update() 494 uint8_t permutation_buf[input_length - processed_length]; /* This is a VLA */ in cc3xx_internal_cipher_stream_post_update() local 507 cc3xx_random_permutation_generate(permutation_buf, input_length - processed_length); in cc3xx_internal_cipher_stream_post_update() 510 output[processed_length + permutation_buf[idx]] = in cc3xx_internal_cipher_stream_post_update() 511 stream->buf[permutation_buf[idx]] ^ input[processed_length + permutation_buf[idx]]; in cc3xx_internal_cipher_stream_post_update()
|
| D | cc3xx_psa_aead.c | 663 uint8_t permutation_buf[tag_word_size]; in cc3xx_aead_verify() local 687 cc3xx_random_permutation_generate(permutation_buf, tag_word_size); in cc3xx_aead_verify() 691 diff |= ((uint32_t *)tag)[permutation_buf[idx]] ^ local_tag[permutation_buf[idx]]; in cc3xx_aead_verify()
|