1 mod 19 = {1,10,5,12,6,3,11,15,17,18,9,14,7,13,16,8,4,2,1} (s)
Using (s) constructed mixing array is {1,10,5,12,6,3,11,15,17,18,9,14,7,13,16,8,4,2,19}
Mixed array A is : {A,J,E,L,F,C,K,P,R,S,I,N,G,M,Q,H,D,B,T}
2.
Then rotation position is selected. Here it's 9
We can say
. So 9 is selected for rotation.
Rotated array A = {S,I,N,G,M,Q,H,D,B,T,A,J,E,L,F,C,K,P,R}
Rotated array A is the encrypted array.
DECODE Process
The inverse of encode process is done. first back-rotate process and than back-mix process is done. At the end original data is constructed.
Used variables:
Asil[] : Contains NPNs.
src[] : Source file name.
dst[] : Target file name.
Asil_2[] : Contains selected NPN's residual numbers. This will be used in mix and back-mix process.
inD[] : Original data array.
mix1[] : Contains mixed data in encode process.
mix2[] : Contains rotated data in encode process.
copy[] : in the end of audio file there can be data that doesn't exactly fit the inD array.
Asil_Asal : Number of NPNs in array Asil[]. In this program it is 136.
as : Selected NPN.
d_len : Data size in the audio file.
The Algorithm


C Source Code
Because the source code is too long, you better download it from here and binary from here.
Example wave file is here.
Encrypted wave file is here.