Home
last modified time | relevance | path

Searched refs:permutation_buf (Results 1 – 7 of 7) sorted by relevance

/trusted-firmware-m-latest/platform/ext/accelerator/cc312/cc312-rom/
Dcc3xx_stdlib.c79 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()
Dcc3xx_stdlib.h26 void cc3xx_random_permutation_generate(uint8_t *permutation_buf, size_t len);
Dcc3xx_chacha.c308 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()
Dcc3xx_aes.c931 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/
Ddpa_hardened_word_copy.c83 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/
Dcc3xx_internal_cipher.c465 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()
Dcc3xx_psa_aead.c663 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()