Question: In Java, implement the Permutation cipher over the alphabet, that is the encryption method public static String Enc(String plain, int[] enc_key) and decryption method public

![the encryption method public static String Enc(String plain, int[] enc_key) and decryption](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f395eb67bdb_65866f395eacf731.jpg)
In Java, implement the Permutation cipher over the alphabet, that is the encryption method public static String Enc(String plain, int[] enc_key) and decryption method public static String Dec(String cipher, int[] dec_key). In a permutation cipher, the encryption key is an int array of length m that instructs on how to build the ciphertext by permuting the plaintext. The decryption key (also length m ) is the "reverse" of that procedure. Consider a cryptosystem with P={a,b,c},K={K1,K2,K3}, and C={1,2,3,4}. Suppose the encryption function is as follows: Given that the keys are chosen equally likely, and the plaintext probability distribution is Pr[a]=1/2, Pr[b]=1/3, and Pr[c]=1/6,(i) either prove or disprove that the cryptosystem is perfectly secret, and (ii) compute H(P),H(K), and H(C). For (i), Show everything you have computed until a conclusion can be made. For (ii), around to 3 digits after the decimal points
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
