Lines Matching refs:shuffle
113 * This table contains the results of applying both the S-box and P-shuffle.
200 static uint64_t shuffle(uint64_t in, const uint8_t *shuffle, int shuffle_len) {
204 res += res + ((in >> *shuffle++) & 1);
208 static uint64_t shuffle_inv(uint64_t in, const uint8_t *shuffle, int shuffle_len) {
211 shuffle += shuffle_len - 1;
213 res |= (in & 1) << *shuffle--;
222 // rotate to get first part of E-shuffle in the lowest 6 bits
234 // get next 6 bits of E-shuffle and round key k into the lowest bits
239 out = shuffle(out, P_shuffle, sizeof(P_shuffle));
260 // discard parity bits from key and shuffle it into C and D parts
261 uint64_t CDn = shuffle(key, PC1_shuffle, sizeof(PC1_shuffle));
267 K[i] = shuffle(CDn, PC2_shuffle, sizeof(PC2_shuffle));
275 // shuffle irrelevant to security but to ease hardware implementations
276 in = shuffle(in, IP_shuffle, sizeof(IP_shuffle));
284 // reverse shuffle used to ease hardware implementations
433 v = shuffle(v, P_shuffle, sizeof(P_shuffle));