1-to-1 cryptographically secure bit shuffling Given an input item (N bytes), I'm looking for a function that will map this to an output (still N bytes).  The function should have the following qualities:


It should be 1-to-1 so that all inputs map to some output and so that no two inputs map to the same output.
Given an output element it should be difficult to guess the input that lead to that output, even when the mapping is completely known.


Does such a function exist? Where can I learn more?
This is known as a one-way permutation.  The "permutation" refers to the first of your two requirements; the "one-way" refers to the second of your two requirements.  There are various candidate constructions for one-way permutations, e.g., based on raising to the third power modulo an RSA modulus or other schemes.