permutations.c 488 Bytes
Newer Older
Ferdinand Bachmann committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#include "endian.h"
#include "permutations.h"

// Credit to Henry S. Warren, Hacker's Delight, Addison-Wesley, 2002
u32_2 to_bit_interleaving_big(u64 in) {
  u32_2 out;
  to_bit_interleaving_big_immediate(out, in);
  return out;
}

// Credit to Henry S. Warren, Hacker's Delight, Addison-Wesley, 2002
u64 from_bit_interleaving_big(u32_2 in) {
  u64 out;
  from_bit_interleaving_big_immediate(out, in);
  return out;
}

/*
void P(state *p, u8 start_round) {
    // implemented in asm
}
*/