Lines Matching defs:shuffle
108 * This table contains the results of applying both the S-box and P-shuffle.
179 static uint64_t shuffle(uint64_t in, const uint8_t *shuffle, int shuffle_len)
184 res += res + ((in >> *shuffle++) & 1);
188 static uint64_t shuffle_inv(uint64_t in, const uint8_t *shuffle, int shuffle_len)
192 shuffle += shuffle_len - 1;
194 res |= (in & 1) << *shuffle--;
204 // rotate to get first part of E-shuffle in the lowest 6 bits
217 // get next 6 bits of E-shuffle and round key k into the lowest bits
222 out = shuffle(out, P_shuffle, sizeof(P_shuffle));
245 // discard parity bits from key and shuffle it into C and D parts
246 uint64_t CDn = shuffle(key, PC1_shuffle, sizeof(PC1_shuffle));
252 K[i] = shuffle(CDn, PC2_shuffle, sizeof(PC2_shuffle));
261 // shuffle irrelevant to security but to ease hardware implementations
262 in = shuffle(in, IP_shuffle, sizeof(IP_shuffle));
270 // reverse shuffle used to ease hardware implementations