
write a java program for random permutation function..the algorithm is given below.according to algorithm java program is needed..
A. Key Generation : Perfun : It is a random permutation function {1,2,...P,P+1...2P}? {1,2,...P,P+1...2P} Step 1: Let si is a starting bit of a key. For j=1 to 2P sj = perfun(j) mod |K| . It is in the range of [0, |K|-1]. Step 2: Sj is the starting bit of the Key ?K?.