I am searching a fast cryptographically safe pseudo-random permutation algorithm with the following requirements.
Given a predefined set of values V and an integer k. Split V to k subset, and iterate over any subset in order.
In more detail, we need an n-length ordered value set V splitted to k (contiguous) partitions. Partitioning is represented by (1) the function part(v): V → N wich returns with the partition index of the value v, and (2) the function rng(p): N → V2 (p ∈ N, the partition index) which returns with the bounds of the partition associated to p. In the same time we need the permutation function perm(v): V → V, where partitions are stable:
v1 < v2 AND part(v1) = part(v2) ⇒ perm(v1) < perm(v2)
Partition number is predefined, there can be empty partitions. Permutation and partitioning must be key based: with a different key we get totally different results.
We are searching for such a part(v), rng(p) and perm(v).
It would be nice if partitions could be predefined, or at least controlled in some way (e. g. binomial distribution). It would be also nice if v (∈ V) could have an arbitrary length. The algorithms should be as fast as possible.
Here is an example visualization: