secret and unique random number generator within a range I am trying to think of a way to generate secret and unique random numbers within a range.

Say we have a public range [1-n], how could we have a maximum of n users choose a random number within this range and ensure that no one else chooses the same number. 

The difference between this question and others is that we want to keep the chosen number a secret this time.

It would be okay to have a third party facilitate the process, however, I would still like the third party to not learn anything about the final number generated for the user.

Is this feasible?
A first cursory reading suggests that a format-preserving cipher like NIST SP 800-38G FF1, which makes an easy way to pick permutations of odd-sized blocks with short keys, might help.  But you asked that nobody learn anything about the final number generated by the user.  Here's a simple-minded protocol with approximately five minutes of effort put into it.  Maybe if you put more effort into it you could find a secure multiparty computation that doesn't require a trusted third party.

Pick an authenticated cipher $E_k$ like crypto_secretbox_xsalsa20poly1305.  Pick a DH function $(a, P) \mapsto [a]P$ with standard base point $B$, like X25519.  Enlist the help of a dealer Dale and an independent trusted third party Trent.


Each user generates secret scalar $p_i$ and publishes $P_i = [p_i]B$.
Dale picks a permutation $\pi$ of $\{1,2,\dots,n\}$ uniformly at random.  (You could use FF1 for this, but you might as well just do a Knuth shuffle unless $n$ is so gigantic this protocol isn't feasible anyway.)
Trent picks a permutation $\tau$ of $\{1,2,\dots,n\}$ uniformly at random.
For each $i$, Dale picks a blinding factor $b_i$ uniformly at random and sends $P'_i = [b_i] P_i$ and $\pi(i)$ to Trent.  Dale should make sure to send these messages to Trent in the order given by $\pi$.
On receipt of $P'_i$ and $\pi(i)$, Trent computes $u_i = \tau(\pi(i))$, picks $q_i$ uniformly at random, computes $k_i = H([q_i]P'_i) = H([p_i q_i b_i]B)$, computes $c_i = E_{k_i}(u_i)$, and returns $Q_i = [q_i]B$ and $c_i$ to Dale.
Dale sends $Q_i$, $b_i$, and $c_i$ to the corresponding user, encrypted with their respective public key the usual way if need be.
Each user computes $k_i = H([p_i b_i]Q_i) = H([p_i q_i b_i]B)$ and opens $c_i$ with $k_i$ revealing their unique number $u_i$.


In this protocol:


Each user learns only their own number $u_i = \tau(\pi(i))$: without knowledge of $\tau$ or $\pi$, which are independent uniform random permutations, they can't invert $\tau$ or $\pi$; and without the other users' secret keys or blinding factors $b_i$ they can't decrypt any traffic over the channels between Dale, Trent, and the other users even if eavesdropped.
Dale, knowing only $\pi$, $P_i$, $b_i$,  $Q_i$, and $c_i$, can't compute any $u_i$ without knowledge of $p_i$, $q_i$, $\tau$, or $k_i$: the number is chosen by a uniform random permutation $\tau$ known only to Trent, and encrypted with the user's public key $P_i$ using an ephemeral key pair $(q_i, Q_i)$ known only to Trent and a secret session key $k_i$ shared only by Trent and the user.
Trent, knowing only $\tau$, $P'_i$, and $\pi(i)$, can't compute $i$ or which $P_i$ the blinded key $P'_i$ corresponds to without knowledge of $\pi$ or $b_i$, and so can't tell which user $i$ gets $u_i$: the number $\pi(i)$ is chosen by a uniform random permutation $\pi$ known only to Dale, and the public key $P'_i$ is blinded with the uniform random secret $b_i$ known only to Dale.


CAVEAT CRYPTATOR: I'm a pseudonymous bird on the internet and scratched this out without review or careful thought about it.