5 void tf_tweak_set(void *key, const void *tweak)
7 TF_UNIT_TYPE *ukey = key;
8 TF_UNIT_TYPE *twe = ukey+TF_TWEAK_WORD1;
9 TF_UNIT_TYPE c = THREEFISH_CONST;
12 for (x = 0; x < TF_NR_BLOCK_UNITS; x++) c ^= ukey[x];
16 memset(twe, 0, (TF_NR_TWEAK_UNITS+1)*TF_SIZE_UNIT);
20 memcpy(twe, tweak, TF_NR_TWEAK_UNITS*TF_SIZE_UNIT);
21 data_to_words(twe, TF_NR_TWEAK_UNITS*TF_SIZE_UNIT);
22 ukey[TF_TWEAK_WORD3] = ukey[TF_TWEAK_WORD1] ^ ukey[TF_TWEAK_WORD2];